Skip to contents

Helper that loads multiple seasons of pre-scraped NHL goalie box scores from the sportsdataverse-data releases.

Usage

load_nhl_goalie_box(
  seasons = most_recent_nhl_season(),
  ...,
  dbConnection = NULL,
  tablename = NULL
)

Arguments

seasons

A vector of 4-digit years (the end year of the NHL season; e.g., 2026 for the 2025-26 season). Min: 2011.

...

Additional arguments passed to an underlying function.

dbConnection

A DBIConnection object, as returned by DBI::dbConnect()

tablename

The name of the data table within the database

Value

A data frame (fastRhockey_data) with the following columns:

col_nametypesdescription
home_awaycharacterHome or away indicator.
team_idintegerUnique team identifier.
team_abbrevcharacterTeam abbreviation/code.
player_idintegerUnique player identifier.
player_namecharacterPlayer name.
sweater_numberintegerJersey number.
even_strength_shots_againstcharacterEven-strength shots against.
power_play_shots_againstcharacterPower play shots against.
shorthanded_shots_againstcharacterShorthanded shots against.
save_shots_againstcharacterSaves / shots against.
save_pctgnumericSave percentage.
even_strength_goals_againstintegerEven-strength goals against.
power_play_goals_againstintegerPower play goals against.
shorthanded_goals_againstintegerShorthanded goals against.
pimintegerPenalty minutes.
goals_againstintegerGoals against.
toicharacterTime on ice.
starterlogicalWhether the goalie started the game.
decisioncharacterGoalie decision (W/L/O).
shots_againstintegerShots faced.
savesintegerSaves made.

Examples

# \donttest{
  try(load_nhl_goalie_box(2022))
#> ── NHL goalie boxscores ─────────────────────────────────── fastRhockey 1.0.0 ──
#>  Data updated: 2026-09-09 07:37:00 UTC
#> # A tibble: 5,605 × 24
#>    home_away team_id team_abbrev player_id player_name     sweater_number
#>    <chr>       <int> <chr>           <int> <chr>                    <int>
#>  1 away            5 PIT           8479193 C. DeSmith                   1
#>  2 away            5 PIT           8477465 T. Jarry                    35
#>  3 home           14 TBL           8470880 B. Elliott                   1
#>  4 home           14 TBL           8476883 A. Vasilevskiy              88
#>  5 away           55 SEA           8475831 P. Grubauer                 31
#>  6 away           55 SEA           8476904 C. Driedger                 60
#>  7 home           54 VGK           8476316 L. Brossoit                 39
#>  8 home           54 VGK           8475215 R. Lehner                   90
#>  9 away            8 MTL           8474596 J. Allen                    34
#> 10 away            8 MTL           8478470 S. Montembeault             35
#> # ℹ 5,595 more rows
#> # ℹ 18 more variables: even_strength_shots_against <chr>,
#> #   power_play_shots_against <chr>, shorthanded_shots_against <chr>,
#> #   save_shots_against <chr>, save_pctg <dbl>,
#> #   even_strength_goals_against <int>, power_play_goals_against <int>,
#> #   shorthanded_goals_against <int>, pim <int>, goals_against <int>, toi <chr>,
#> #   starter <lgl>, decision <chr>, shots_against <int>, saves <int>, …
# }