Skip to contents

Returns information on game boxscore for a given game id

Usage

nhl_game_boxscore(game_id)

Arguments

game_id

Game unique ID

Value

Returns a named list of data frames: team_box, player_box, skaters, goalies, on_ice, on_ice_plus, penalty_box, scratches, team_coaches

Examples

# \donttest{
   try(nhl_game_boxscore(game_id = 2021020182))
#> $team_box
#> ── NHL Game Team Box Information from NHL.com ───────────── fastRhockey 0.6.0 ──
#>  Data updated: 2023-03-08 07:46:49 UTC
#> # A tibble: 2 × 14
#>   team_id team_name      link  goals   pim shots power…¹ power…² power…³ face_…⁴
#>     <int> <chr>          <chr> <int> <int> <int> <chr>     <int>   <int> <chr>  
#> 1       9 Ottawa Senato… /api…     2    13    27 0.0           0       6 42.1   
#> 2       6 Boston Bruins  /api…     3    19    36 33.3          1       3 57.9   
#> # … with 4 more variables: blocked <int>, takeaways <int>, giveaways <int>,
#> #   hits <int>, and abbreviated variable names ¹​power_play_percentage,
#> #   ²​power_play_goals, ³​power_play_opportunities, ⁴​face_off_win_percentage
#> 
#> $player_box
#> ── NHL Game Players Box Information from NHL.com ────────── fastRhockey 0.6.0 ──
#>  Data updated: 2023-03-08 07:46:52 UTC
#> # A tibble: 38 × 70
#>    playe…¹ playe…² link  first…³ last_…⁴ prima…⁵ birth…⁶ curre…⁷ birth…⁸ birth…⁹
#>      <int> <chr>   <chr> <chr>   <chr>   <chr>   <chr>     <int> <chr>   <chr>  
#>  1 8480073 Erik B… /api… Erik    Branns… 26      1999-0…      23 Eksjo   SWE    
#>  2 8480064 Josh N… /api… Josh    Norris  9       1999-0…      23 Oxford  USA    
#>  3 8476919 Chris … /api… Chris   Tierney 71      1994-0…      28 Keswick CAN    
#>  4 8477426 Nick P… /api… Nick    Paul    21      1995-0…      27 Missis… CAN    
#>  5 8474589 Tyler … /api… Tyler   Ennis   63      1989-1…      33 Edmont… CAN    
#>  6 8476899 Matt M… /api… Matt    Murray  30      1994-0…      28 Thunde… CAN    
#>  7 8480029 Alex F… /api… Alex    Formen… 10      1999-0…      23 Barrie  CAN    
#>  8 8479458 Nikita… /api… Nikita  Zaitsev 22      1991-1…      31 Moscow  RUS    
#>  9 8474584 Michae… /api… Michael Del Zo… 15      1990-0…      32 Stouff… CAN    
#> 10 8480448 Parker… /api… Parker  Kelly   45      1999-0…      23 Camrose CAN    
#> # … with 28 more rows, 60 more variables: nationality <chr>, height <chr>,
#> #   weight <int>, active <lgl>, alternate_captain <lgl>, captain <lgl>,
#> #   rookie <lgl>, shoots_catches <chr>, roster_status <chr>,
#> #   current_team_id <int>, current_team_name <chr>, current_team_link <chr>,
#> #   primary_position_code <chr>, primary_position_name <chr>,
#> #   primary_position_type <chr>, primary_position_abbreviation <chr>,
#> #   jersey_number <chr>, position_code <chr>, position_name <chr>, …
#> 
#> $skaters
#> ── NHL Game Skaters Information from NHL.com ────────────── fastRhockey 0.6.0 ──
#>  Data updated: 2023-03-08 07:46:52 UTC
#> # A tibble: 40 × 2
#>    skaters home_away
#>      <int> <chr>    
#>  1 8482245 Away     
#>  2 8477384 Away     
#>  3 8480801 Away     
#>  4 8480064 Away     
#>  5 8480029 Away     
#>  6 8477482 Away     
#>  7 8474584 Away     
#>  8 8482116 Away     
#>  9 8480208 Away     
#> 10 8476400 Away     
#> # … with 30 more rows
#> 
#> $goalies
#> ── NHL Game Goalies Information from NHL.com ────────────── fastRhockey 0.6.0 ──
#>  Data updated: 2023-03-08 07:46:52 UTC
#> # A tibble: 2 × 2
#>   goalies home_away
#>     <int> <chr>    
#> 1 8476899 Away     
#> 2 8480280 Home     
#> 
#> $on_ice
#> ── NHL Game On Ice Information from NHL.com ─────────────── fastRhockey 0.6.0 ──
#>  Data updated: 2023-03-08 07:46:52 UTC
#> # A tibble: 12 × 2
#>      onIce home_away
#>      <int> <chr>    
#>  1 8478469 Away     
#>  2 8480064 Away     
#>  3 8480208 Away     
#>  4 8480801 Away     
#>  5 8482116 Away     
#>  6 8482245 Away     
#>  7 8470638 Home     
#>  8 8473419 Home     
#>  9 8477956 Home     
#> 10 8478443 Home     
#> 11 8479325 Home     
#> 12 8480280 Home     
#> 
#> $on_ice_plus
#> ── NHL Game On Ice+ Information from NHL.com ────────────── fastRhockey 0.6.0 ──
#>  Data updated: 2023-03-08 07:46:52 UTC
#> # A tibble: 12 × 4
#>    onIcePlus.playerId onIcePlus.shiftDuration onIcePlus.stamina home_away
#>                 <int>                   <int>             <int> <chr>    
#>  1            8478469                     102                33 Away     
#>  2            8480064                      86                33 Away     
#>  3            8480208                     102                33 Away     
#>  4            8480801                      90                33 Away     
#>  5            8482116                     102                33 Away     
#>  6            8482245                     102                33 Away     
#>  7            8470638                     102                33 Home     
#>  8            8473419                     102                33 Home     
#>  9            8477956                     102                33 Home     
#> 10            8478443                       6               100 Home     
#> 11            8479325                     161                33 Home     
#> 12            8480280                     553                33 Home     
#> 
#> $penalty_box
#> ── NHL Game Penalty Box Information from NHL.com ────────── fastRhockey 0.6.0 ──
#>  Data updated: 2023-03-08 07:46:52 UTC
#> # A tibble: 0 × 0
#> 
#> $scratches
#> ── NHL Game Scratches Information from NHL.com ──────────── fastRhockey 0.6.0 ──
#>  Data updated: 2023-03-08 07:46:52 UTC
#> # A tibble: 4 × 2
#>   scratches home_away
#>       <int> <chr>    
#> 1   8476341 Away     
#> 2   8477149 Away     
#> 3   8478415 Home     
#> 4   8480901 Home     
#> 
#> $team_coaches
#> ── NHL Game Team Coaches Information from NHL.com ───────── fastRhockey 0.6.0 ──
#>  Data updated: 2023-03-08 07:46:52 UTC
#> # A tibble: 2 × 7
#>   person.fullName person.link         position…¹ posit…² posit…³ posit…⁴ home_…⁵
#>   <chr>           <chr>               <chr>      <chr>   <chr>   <chr>   <chr>  
#> 1 D.J. Smith      /api/v1/people/null HC         Head C… Head C… Head C… Away   
#> 2 Bruce Cassidy   /api/v1/people/null HC         Head C… Head C… Head C… Home   
#> # … with abbreviated variable names ¹​position.code, ²​position.name,
#> #   ³​position.type, ⁴​position.abbreviation, ⁵​home_away
#> 
# }