Skip to contents

phf_pbp: pull in the raw data for a game_id from the PHF/NWHL API

Usage

phf_pbp(game_id)

Arguments

game_id

The unique ID code for the game that you are interested in viewing the data for

Value

A data frame of play by play information

Examples

# \donttest{
  try(phf_pbp(game_id = 268127))
#> ── PHF Play-by-Play Information from PremierHockeyFederation.com ───────────────
#>  Data updated: 2023-03-08 07:48:22 UTC
#> # A tibble: 172 × 79
#>    play_type team  time  play_…¹ scori…² scori…³ offen…⁴ offen…⁵ offen…⁶ offen…⁷
#>    <chr>     <chr> <chr> <chr>   <chr>   <chr>   <chr>   <chr>   <chr>   <chr>  
#>  1 Goalie    Buff… 00:00 Starti… NA      NA      NA      NA      NA      NA     
#>  2 Goalie    Metr… 00:00 Starti… NA      NA      NA      NA      NA      NA     
#>  3 Faceoff   Metr… 00:00 #22 Ke… NA      NA      NA      NA      NA      NA     
#>  4 Shot      Buff… 00:28 #8 Ive… NA      NA      NA      NA      NA      NA     
#>  5 Faceoff   Metr… 00:56 #10 Ke… NA      NA      NA      NA      NA      NA     
#>  6 Goal      Buff… 01:11 #23 Co… BUF     #5 Len… Lenka … Kim Br… Corinn… Marie-…
#>  7 Faceoff   Buff… 01:11 #17 Ca… NA      NA      NA      NA      NA      NA     
#>  8 Giveaway  Buff… 01:17 #6 Kri… NA      NA      NA      NA      NA      NA     
#>  9 Giveaway  Metr… 02:06 #21 Br… NA      NA      NA      NA      NA      NA     
#> 10 Faceoff   Buff… 02:06 #22 Be… NA      NA      NA      NA      NA      NA     
#> # … with 162 more rows, 69 more variables: offensive_player_name_5 <chr>,
#> #   offensive_player_name_6 <chr>, defending_team_abbrev <chr>,
#> #   defending_team_on_ice <chr>, defensive_player_name_1 <chr>,
#> #   defensive_player_name_2 <chr>, defensive_player_name_3 <chr>,
#> #   defensive_player_name_4 <chr>, defensive_player_name_5 <chr>,
#> #   defensive_player_name_6 <chr>, period_id <int>, game_id <dbl>,
#> #   game_date <chr>, home_team <chr>, home_location <chr>, …
# }