Skip to contents

Every name and id a source uses for an NHL conference or division, with the seasons it is valid for – the crosswalk from NHL and ESPN ids and names to SportsDataverse group ids. Published to the nhl_groups release tag on the sportsdataverse-data releases.

Usage

load_nhl_group_aliases(..., dbConnection = NULL, tablename = NULL)

Arguments

...

Additional arguments passed to an underlying function that writes the data into a database.

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
leaguecharacterLeague key.
group_idcharacterSportsDataverse group id, {league}:{slug}.
sourcecharacterSource that uses the alias (e.g. nhl, espn).
source_idcharacterThe source's own id for the group, when it has one.
name_kindcharacterAlias kind: name, short_name, abbreviation, slug or code.
valuecharacterThe alias.
valid_fromintegerFirst season (end year) the alias is valid (inclusive); NA = unbounded.
valid_tointegerLast season (end year) the alias is valid (inclusive); NA = unbounded.

Examples

# \donttest{
  try(load_nhl_group_aliases())
#> ── NHL group aliases from the SportsDataverse data repo ─── fastRhockey 1.0.0 ──
#> ℹ Data updated: 2026-10-08 12:57:44 UTC
#> # A tibble: 95 × 8
#>    league group_id          source source_id name_kind value valid_from valid_to
#>    <chr>  <chr>             <chr>  <chr>     <chr>     <chr>      <int>    <int>
#>  1 nhl    nhl:adams-northe… nhl    NA        abbrevia… ADM         1975     1993
#>  2 nhl    nhl:adams-northe… nhl    NA        abbrevia… NE          1994     2013
#>  3 nhl    nhl:adams-northe… nhl    NA        name      Adam…       1975     1993
#>  4 nhl    nhl:adams-northe… nhl    NA        name      Nort…       1994     2013
#>  5 nhl    nhl:adams-northe… nhl    NA        short_na… Adams       1975     1993
#>  6 nhl    nhl:adams-northe… nhl    NA        short_na… Nort…       1994     2013
#>  7 nhl    nhl:american      nhl    NA        abbrevia… AMR         1927     1938
#>  8 nhl    nhl:american      nhl    NA        name      Amer…       1927     1938
#>  9 nhl    nhl:american      nhl    NA        short_na… Amer…       1927     1938
#> 10 nhl    nhl:atlantic      espn   32        abbrevia… ATL         2014       NA
#> # ℹ 85 more rows
# }