Skip to contents

Play-by-play of one match: goals, penalties, goalie changes and timeouts, one row per event.

Wraps GET https://s3.eu-west-1.amazonaws.com/den.hokejovyzapis.cz/matches/{match_id}/period-events.json of the Metal Ligaen eSports bucket. Example: https://s3.eu-west-1.amazonaws.com/den.hokejovyzapis.cz/matches/575/period-events.json. Seasons are END years (2027 = 2026/27); every request waits at least one second after the last one to the same host.

Usage

metal_pbp(match_id, return_parsed = TRUE)

Arguments

match_id

Match id (per-bucket match key space: match_id in metal_schedule). Not the league website's game id.

return_parsed

Parse the payload into a tibble (default TRUE); FALSE returns the raw decoded JSON body (a nested list).

Value

A tibble::tibble() with one row per row of the file (zero rows, carrying the documented columns, for an empty frame); the raw JSON list when return_parsed = FALSE. Columns:

col_nametypedescription
event_indexintegerRow order of the event within the game (0-based), across periods.
periodcharacterPeriod key as the body sends it: 1, 2, 3, OT (overtime) or SO (shootout).
period_numberintegerPeriod number: 1-3, 4 = overtime, 5 = shootout.
timeintegerGame second of the event from the opening face-off (0-3600 in regulation, continuing through overtime).
event_typecharacterEvent type: goal, penalty, goalkeeperChange, timeout, periodStart, periodEnd, videoReview, ...
event_idintegerEvent id within its event type.
team_sidecharacterTeam of the row: home or visitor.
goalie_player_idintegerPlayer id (playerId key space) of the goalie entering the game (goalkeeperChange).
goalie_jerseyintegerJersey number of the goalie entering the game (goalkeeperChange).
goalie_namecharacterFull name of the goalie entering the game (goalkeeperChange).
create_timeintegerGame second at which the event was entered (unverified).
penalized_player_idintegerPlayer id (playerId key space) of the penalized player.
penalized_jerseyintegerJersey number of the penalized player.
penalized_namecharacterFull name of the penalized player.
penalty_from_real_timecharacterPenalty start, local wall clock YYYY-MM-DD HH:MM:SS.
penalty_from_scoreboard_timeintegerPenalty start, game second.
penalty_to_real_timecharacterPenalty end, local wall clock YYYY-MM-DD HH:MM:SS.
penalty_to_scoreboard_timeintegerPenalty end, game second.
durationintegerPenalty length in seconds (120 = minor).
shootinglogicalTrue for a goal scored on a penalty shot.
disciplined_functionarylogicalTrue when the penalty was assessed to a team official.
disciplined_bmlogicalTrue when the penalty was a bench minor.
codenamecharacterPenalty code, e.g. HOOK, TRIP, ROUGH, BOARD, DELAY.
current_scorecharacterScore after the goal, as home:visitor text, e.g. 1:0.
real_timecharacterWall-clock local time, YYYY-MM-DD HH:MM:SS.
scoreboard_timeintegerSeconds of game time from the opening face-off (0-3600 in regulation, continuing through overtime).
balancecharacterGoal strength: EQ even, PP1 / PP2 power play, SH1 / SH2 shorthanded.
extra_attackerlogicalTrue when the scoring team had an extra attacker on (goalie pulled).
empty_netlogicalTrue when the goal went into an empty net.
technicallogicalTrue for a technical penalty (unverified).
scorer_player_idintegerPlayer id (playerId key space) of the goal scorer.
scorer_jerseyintegerJersey number of the goal scorer.
scorer_namecharacterFull name of the goal scorer.
assist1_player_idintegerPlayer id (playerId key space) of the first assist.
assist1_jerseyintegerJersey number of the first assist.
assist1_namecharacterFull name of the first assist.
assist2_player_idintegerPlayer id (playerId key space) of the second assist.
assist2_jerseyintegerJersey number of the second assist.
assist2_namecharacterFull name of the second assist.
plus_player_idscharacterComma-separated player ids (playerId key space) of the scoring team's players on ice.
minus_player_idscharacterComma-separated player ids (playerId key space) of the conceding team's players on ice.
replaced_player_idintegerPlayer id (playerId key space) of the player serving the penalty in the penalized player's place.
replaced_jerseyintegerJersey number of the player serving the penalty in the penalized player's place.
replaced_namecharacterFull name of the player serving the penalty in the penalized player's place.
outgoing_goalie_player_idintegerPlayer id (playerId key space) of the goalie leaving the game (goalkeeperChange).
outgoing_goalie_jerseyintegerJersey number of the goalie leaving the game (goalkeeperChange).
outgoing_goalie_namecharacterFull name of the goalie leaving the game (goalkeeperChange).
team_idintegerTeam id (team key space, per bucket, stable across seasons); joins to league-matches home.id / guest.id and the {team_id} path param.
team_shortcutcharacterThree-letter team code.
goal_reviewcharacterVideo review subject, e.g. a goal (EIHL videoReview events).
on_ice_decisioncharacterCall on the ice before the review.
reason_for_reviewcharacterWhy the play was reviewed (free text).
decision_after_reviewcharacterFinal call after the review.

Errors

Signalled as classed conditions: fastRhockey_no_data when the bucket has no such key (S3 404 NoSuchKey: unknown season, competition, match or team) or the file holds no rows (an unplayed game, an empty shot shell); fastRhockey_asset_fetch for any other non-2xx answer (403 AccessDenied), a connection failure after retries, an empty or unreadable 200 body, an error envelope, a body of the wrong shape, or a body for another season or game; fastRhockey_bad_request for an HTTP 400/422 or an invalid argument. All three also inherit fastRhockey_error. Wrappers raise; they never warn and return an empty frame.

See also

Metal Ligaen (the league site whose widgets read this public eSports bucket)

Other Metal Ligaen eSports functions: metal_game_center(), metal_game_info(), metal_goalie_box(), metal_player_box(), metal_schedule(), metal_standings(), metal_top_scorers()

Examples

# \donttest{
  try(metal_pbp(match_id = 575))
#> ── Metal Ligaen pbp from the eSports hokejovyzapis bucket ──────────────────────
#> ℹ Data updated: 2026-10-13 01:56:58 UTC
#> # A tibble: 23 × 53
#>    event_index period period_number  time event_type       event_id team_side
#>          <int> <chr>          <int> <int> <chr>               <int> <chr>    
#>  1           0 1                  1     0 goalkeeperChange     2673 visitor  
#>  2           1 1                  1     0 goalkeeperChange     2672 home     
#>  3           2 1                  1   268 penalty              2613 home     
#>  4           3 1                  1   326 goal                 2221 visitor  
#>  5           4 1                  1  1017 penalty              2614 home     
#>  6           5 1                  1  1017 goal                 2222 visitor  
#>  7           6 1                  1  1037 penalty              2615 visitor  
#>  8           7 2                  2  1285 penalty              2616 home     
#>  9           8 2                  2  1317 goal                 2223 visitor  
#> 10           9 2                  2  1349 penalty              2617 home     
#> # ℹ 13 more rows
#> # ℹ 46 more variables: goalie_player_id <int>, goalie_jersey <int>,
#> #   goalie_name <chr>, create_time <int>, penalized_player_id <int>,
#> #   penalized_jersey <int>, penalized_name <chr>, penalty_from_real_time <chr>,
#> #   penalty_from_scoreboard_time <int>, penalty_to_real_time <chr>,
#> #   penalty_to_scoreboard_time <int>, duration <int>, shooting <lgl>,
#> #   disciplined_functionary <lgl>, disciplined_bm <lgl>, codename <chr>, …
# }