Skip to contents

One game's penalties, both teams: player, fault, minutes, start and end.

Usage

liiga_game_penalties(season, game_id)

Arguments

season

Season END year (2026 = 2025-26). Game ids repeat across seasons, so a game is (season, game_id).

game_id

Game id (game_id in liiga_schedule or liiga_games), e.g. 1; unique only within a season.

Value

A fastRhockey_data tibble (17 columns; zero rows when a valid payload has none).

col_nametypedescription
seasonintegerSeason END year (2026 = 2025-26).
game_idintegerGame id, unique only within a season: key a game as (season, game_id).
sidecharacterWhich team of the game the row belongs to: home or away.
team_idintegerTeam id, the number of Liiga's <num>:<slug> team key (sent as that string, a bare integer or a digit string depending on the route).
team_slugcharacterTeam slug, the part of Liiga's <num>:<slug> team key after the colon (e.g. hpk).
player_idintegerPlayer id; the same number in lineups, rosters, stat tables and the profile (fihaId).
sufferer_player_idintegerPlayer who served the penalty.
event_idintegerEvent id within the game.
log_timecharacterWall-clock time the event was logged, ISO 8601 UTC.
game_timeintegerSeconds from the start of the game. Regular season: 3900 (65:00) = the end of the 5-minute overtime; playoff overtime runs past it.
periodintegerPeriod number: 1-3 are regulation, 4 and up overtime (or the shootout).
penalty_begintimeintegerPenalty start, seconds from game start.
penalty_endtimeintegerPenalty end, seconds from game start.
penalty_fault_namecharacterInfraction, in Finnish.
penalty_fault_typecharacterInfraction code.
penalty_infocharacterExtra penalty code (” or a letter such as K; meaning unverified).
penalty_minutesintegerLength of the penalty in minutes (2, 5, 10, 20, ...).

Details

Endpoint: GET https://liiga.fi/api/v2/games/{season}/{game_id}

Seasons are END years (2026 = 2025-26), the same key as sdv-py. Requests to liiga.fi are spaced at least one second apart. A request Liiga answers with nothing (an unknown game, a tournament not played that season, a shot map before 2016) raises fastRhockey_no_data; a failed fetch or an error-shaped answer raises fastRhockey_asset_fetch; a bad argument raises fastRhockey_bad_request.

Examples

# \donttest{
  try(liiga_game_penalties(game_id = 1, season = 2026))
#> ── Liiga game penalties Information from liiga.fi ──── fastRhockey 1.0.0.9000 ──
#> ℹ Data updated: 2026-10-13 01:55:14 UTC
#> # A tibble: 11 × 17
#>    season game_id side   team_id team_slug player_id sufferer_player_id event_id
#>     <int>   <int> <chr>    <int> <chr>         <int>              <int>    <int>
#>  1   2026       1 home    5.58e7 hpk        60954495           60954495      100
#>  2   2026       1 home    5.58e7 hpk        30851669           30851669      125
#>  3   2026       1 home    5.58e7 hpk        40115108           40115108      130
#>  4   2026       1 home    5.58e7 hpk        31585390           31585390      162
#>  5   2026       1 home    5.58e7 hpk        22709389           22709389      289
#>  6   2026       1 home    5.58e7 hpk               0           40039427      400
#>  7   2026       1 away    6.51e8 tps        25541395           25541395       13
#>  8   2026       1 away    6.51e8 tps        30969140           30969140      163
#>  9   2026       1 away    6.51e8 tps        40048503           40048503      340
#> 10   2026       1 away    6.51e8 tps               0           40373820      387
#> 11   2026       1 away    6.51e8 tps        60953550           60953550      496
#> # ℹ 9 more variables: log_time <chr>, game_time <int>, period <int>,
#> #   penalty_begintime <int>, penalty_endtime <int>, penalty_fault_name <chr>,
#> #   penalty_fault_type <chr>, penalty_info <chr>, penalty_minutes <int>
# }