Get team records from hockey-reference.com

get_team_records(
  season = as.numeric(format(Sys.Date() + 184, "%Y")),
  league = "NHL",
  include_records = TRUE
)

Arguments

season

An integer value denoting the end year of the season(s) to scrape

league

The league stats to scrape, either 'NHL' or 'WHA' or get both with c('NHL','WHA')

include_records

Option to exclude records from the function, used to gather full team names & abbreviations for every season since 1918

Value

A tibble containing full team names & win-loss records for teams in all desired seasons

Examples

if (FALSE) {
get_team_records(2021)
}