Skip to contents

Returns all-time franchise totals from the NHL Records API (https://records.nhl.com/site/api/franchise-totals). Optionally filter by franchise ID or a cayenneExp expression.

Usage

nhl_records_franchise_totals(franchise_id = NULL, cayenne_exp = NULL)

Arguments

franchise_id

Optional integer franchise ID. When supplied it is translated into a cayenneExp=franchiseId={franchise_id} filter unless cayenne_exp is already provided.

cayenne_exp

Optional Cayenne filter expression string. Takes precedence over franchise_id when both are supplied.

Value

A data frame (fastRhockey_data) with the following columns:

col_nametypesdescription
idintegerUnique record identifier.
active_franchiseintegerIndicator of whether the franchise is active.
cupsintegerNumber of Stanley Cup championships.
first_season_idintegerSeason ID of the franchise's first season.
franchise_idintegerUnique franchise identifier.
game_type_idintegerGame type the totals belong to.
game_win_pctgnumericGame-winning percentage.
games_playedintegerTotal games played.
goals_againstintegerGoals against.
goals_forintegerGoals for.
home_lossesintegerLosses at home.
home_overtime_lossesintegerOvertime losses at home.
home_tiesintegerTies at home.
home_winsintegerWins at home.
last_season_idintegerSeason ID of the franchise's last season.
lossesintegerTotal losses.
overtime_lossesintegerTotal overtime losses.
penalty_minutesintegerPenalty minutes.
playoff_seasonsintegerNumber of playoff seasons.
point_pctgnumericPoints percentage.
pointsintegerTotal standings points.
road_lossesintegerLosses on the road.
road_overtime_lossesintegerOvertime losses on the road.
road_tiesintegerTies on the road.
road_winsintegerWins on the road.
series_lossesintegerPlayoff series losses.
series_playedintegerPlayoff series played.
series_win_pctgnumericPlayoff series win percentage.
series_winsintegerPlayoff series wins.
shootout_lossesintegerShootout losses.
shootout_winsintegerShootout wins.
shutoutsintegerShutouts recorded.
team_abbrevcharacterTeam abbreviation.
team_idintegerUnique team identifier.
team_namecharacterTeam name.
tiesintegerTotal ties.
winsintegerTotal wins.

Examples

# \donttest{
  try(nhl_records_franchise_totals())
#> ── NHL Records Franchise Totals ─────────────────────────── fastRhockey 1.0.0 ──
#>  Data updated: 2026-06-13 03:25:41 UTC
#> # A tibble: 80 × 37
#>       id active_franchise  cups first_season_id franchise_id game_type_id
#>    <int>            <int> <int>           <int>        <int>        <int>
#>  1     1                0     3        19791980           27            3
#>  2     2                1     1        19741975           24            3
#>  3     3                0     0        19191920            4            2
#>  4     4                0     2        19241925            7            2
#>  5     5                1     0        19921993           30            3
#>  6     6                1     4        19261927           10            2
#>  7     7                1     1        19671968           18            3
#>  8     8                0     0        19671968           13            2
#>  9     9                1     0        20212022           39            3
#> 10    10                1     2        19931994           33            2
#> # ℹ 70 more rows
#> # ℹ 31 more variables: game_win_pctg <dbl>, games_played <int>,
#> #   goals_against <int>, goals_for <int>, home_losses <int>,
#> #   home_overtime_losses <int>, home_ties <int>, home_wins <int>,
#> #   last_season_id <int>, losses <int>, overtime_losses <int>,
#> #   penalty_minutes <int>, playoff_seasons <int>, point_pctg <dbl>,
#> #   points <int>, road_losses <int>, road_overtime_losses <int>, …
# }