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))
#> Warning: cannot open URL 'https://github.com/sportsdataverse/sportsdataverse-data/releases/download/nhl_goalie_boxscores/goalie_box_2022.rds': HTTP status was '404 Not Found'
#> Warning: Failed to readRDS from <https://github.com/sportsdataverse/sportsdataverse-data/releases/download/nhl_goalie_boxscores/goalie_box_2022.rds>
#> ─────────────────────────────────────────────────────────── fastRhockey 1.0.0 ──
#> # A tibble: 0 × 0
# }