Skip to contents

Get ESPN NHL League Leaders

Usage

espn_nhl_leaders(
  category = "offensive",
  season = most_recent_nhl_season(),
  season_type = 2L,
  limit = 50L,
  page = 1L,
  ...
)

Arguments

category

Stat category to display. For NHL one of "offensive", "defensive", "general", "penalties", or NULL for all categories. Defaults to "offensive".

season

Season end-year (e.g. 2025). Defaults to most_recent_nhl_season(). ESPN's NHL statistics/byathlete endpoint currently ignores this parameter and always returns the current/most-recent season. The argument is accepted for forward-compatibility but does not filter upstream. The returned season and season_type columns reflect the season ESPN actually served, not this value.

season_type

Season type code (1 = pre, 2 = regular, 3 = post). Defaults to 2. ESPN's NHL statistics/byathlete endpoint currently ignores this parameter. The returned season_type column reflects the type ESPN actually served.

limit

Athletes per page (default 50).

page

Page number (default 1).

...

Reserved for forward compatibility.

Value

A fastRhockey_data tibble with one row per athlete:

col_nametypesdescription
seasonintegerSeason end-year ESPN actually served (from currentSeason$year).
season_typeintegerSeason type id ESPN actually served (from currentSeason$type$id).
requested_season_yearintegerSeason year from requestedSeason (mirrors season).
pageintegerCurrent page.
pagination_countintegerTotal athlete count.
pagination_limitintegerAthletes per page.
pagination_pagesintegerTotal page count.
league_idcharacterESPN league identifier.
league_namecharacterLeague name.
league_abbreviationcharacterLeague abbreviation.
athlete_idcharacterESPN athlete identifier.
athlete_display_namecharacterPlayer display name.
athlete_short_namecharacterPlayer short name.
athlete_slugcharacterPlayer URL slug.
athlete_positioncharacterPosition abbreviation.
athlete_jerseycharacterJersey number.
athlete_team_idcharacterESPN team identifier.
athlete_team_namecharacterTeam name.
athlete_team_short_namecharacterTeam short name.
athlete_team_logocharacterTeam logo URL.
headshot_hrefcharacterPlayer headshot URL.
debut_yearintegerDebut year.
ageintegerPlayer age.
offensive_goalscharacterGoals (offensive category).
offensive_assistscharacterAssists.
offensive_pointscharacterPoints.
offensive_power_play_goalscharacterPower-play goals.
offensive_shots_totalcharacterShots on goal.
offensive_shooting_pctcharacterShooting percentage.
offensive_game_winning_goalscharacterGame-winning goals.
offensive_rank_pointscharacterRank by points.

See also

family_espn_nhl lists every function in this family.

Author

Saiem Gilani

Examples

# \donttest{
  try(espn_nhl_leaders(category = "offensive", limit = 25))
#> ── NHL Leaders data from ESPN.com ───────────────────────── fastRhockey 1.1.0 ──
#> ℹ Data updated: 2026-11-13 21:27:04 UTC
#> # A tibble: 25 × 51
#>    season season_type requested_season_year  page pagination_count
#>     <int>       <int>                 <int> <int>            <int>
#>  1   2027           2                  2027     1              845
#>  2   2027           2                  2027     1              845
#>  3   2027           2                  2027     1              845
#>  4   2027           2                  2027     1              845
#>  5   2027           2                  2027     1              845
#>  6   2027           2                  2027     1              845
#>  7   2027           2                  2027     1              845
#>  8   2027           2                  2027     1              845
#>  9   2027           2                  2027     1              845
#> 10   2027           2                  2027     1              845
#> # ℹ 15 more rows
#> # ℹ 46 more variables: pagination_limit <int>, pagination_pages <int>,
#> #   league_id <chr>, league_name <chr>, league_abbreviation <chr>,
#> #   athlete_id <chr>, athlete_display_name <chr>, athlete_short_name <chr>,
#> #   athlete_slug <chr>, athlete_position <chr>, athlete_jersey <chr>,
#> #   athlete_team_id <chr>, athlete_team_name <chr>,
#> #   athlete_team_short_name <chr>, athlete_team_logo <chr>, …
# }