Skip to contents

Returns information on game pbp for a given game id

Usage

nhl_game_pbp(game_id)

Arguments

game_id

Game unique ID

Value

Returns a named list of data frames: all_plays

Examples

# \donttest{
   try(nhl_game_pbp(game_id=2021020182))
#> ── NHL Game Plays Information from NHL.com ──────────────── fastRhockey 0.6.0 ──
#>  Data updated: 2023-03-08 07:47:30 UTC
#> # A tibble: 627 × 107
#>    event_…¹ event secon…² event…³ event…⁴ descr…⁵ period perio…⁶ perio…⁷ game_…⁸
#>    <chr>    <chr> <chr>   <chr>   <chr>   <chr>    <int>   <dbl>   <dbl>   <dbl>
#>  1 GAME_SC… Game… NA      NA      NA      Game S…      1       0    1200       0
#>  2 CHANGE   Chan… NA      Boston… home    ON: Pa…      1       0    1200       0
#>  3 CHANGE   Chan… Line c… Ottawa… away    ON: Ma…      1       0    1200       0
#>  4 FACEOFF  Face… NA      Ottawa… away    Josh N…      1       0    1200       0
#>  5 SHOT     Shot  Wrist … Boston… home    David …      1      18    1182      18
#>  6 STOP     Stop… NA      NA      NA      Goalie…      1      18    1182      18
#>  7 CHANGE   Chan… Line c… Boston… home    ON: Ma…      1      18    1182      18
#>  8 CHANGE   Chan… Line c… Ottawa… away    ON: Mi…      1      18    1182      18
#>  9 FACEOFF  Face… NA      Boston… home    Patric…      1      18    1182      18
#> 10 SHOT     Shot  Slap S… Boston… home    Matt G…      1      25    1175      25
#> # … with 617 more rows, 97 more variables: game_seconds_remaining <dbl>,
#> #   home_score <dbl>, away_score <dbl>, event_player_1_name <chr>,
#> #   event_player_1_type <chr>, event_player_2_name <chr>,
#> #   event_player_2_type <chr>, event_player_3_name <chr>,
#> #   event_player_3_type <chr>, event_goalie_name <chr>, strength_state <glue>,
#> #   strength_code <chr>, strength <chr>, game_winning_goal <lgl>,
#> #   empty_net <lgl>, penalty_severity <chr>, penalty_minutes <int>, …
# }