Aggregator helper that iterates every NHL team's
season roster (via nhl_teams_roster()) and flattens forwards,
defensemen, and goalies into a single tidy data frame. Mirrors the
Helpers.all_players convenience helper from the nhl-api-py
Python client.
Arguments
- season
Integer four-digit year representing the start year of the season (e.g.
2024for the 2024-25 season), matching the convention used bynhl_teams_roster().- sleep_rate
Numeric seconds to
Sys.sleep()between per-team API calls. Defaults to0(no delay).
Value
A data frame (fastRhockey_data) with the following columns:
| col_name | types | description |
| player_id | integer | Unique player identifier. |
| first_name | character | Player first name. |
| last_name | character | Player last name. |
| full_name | character | Player full name. |
| sweater_number | integer | Jersey number. |
| position_code | character | Player position code. |
| shoots_catches | character | Handedness (shoots/catches). |
| height_inches | integer | Player height in inches. |
| weight_pounds | integer | Player weight in pounds. |
| birth_date | character | Player birth date. |
| birth_city | character | Player birth city. |
| birth_country | character | Player birth country. |
| headshot_url | character | URL to the player headshot image. |
| team_abbr | character | Team abbreviation. |
| season | numeric | Season start year (e.g., 2024 for 2024-25). |
Examples
# \donttest{
try(nhl_all_players_by_season(season = 2024))
#> ── NHL All Players by Season ───────────────────────── fastRhockey 1.0.0.9000 ──
#> ℹ Data updated: 2026-10-18 12:08:57 UTC
#> # A tibble: 853 × 15
#> player_id first_name last_name full_name sweater_number position_code
#> <int> <chr> <chr> <chr> <int> <chr>
#> 1 8477964 Ivan Barbashev Ivan Barbashev 49 F
#> 2 8481604 Pavel Dorofeyev Pavel Dorofeyev 16 F
#> 3 8478403 Jack Eichel Jack Eichel 9 F
#> 4 8476881 Tomas Hertl Tomas Hertl 48 F
#> 5 8482125 Alexander Holtz Alexander Holtz 26 F
#> 6 8479353 Brett Howden Brett Howden 21 F
#> 7 8476448 William Karlsson William Karlsson 71 F
#> 8 8478434 Keegan Kolesar Keegan Kolesar 55 F
#> 9 8479550 Tanner Laczynski Tanner Laczynski 28 F
#> 10 8481534 Raphael Lavoie Raphael Lavoie 36 F
#> # ℹ 843 more rows
#> # ℹ 9 more variables: shoots_catches <chr>, height_inches <int>,
#> # weight_pounds <int>, birth_date <chr>, birth_city <chr>,
#> # birth_country <chr>, headshot_url <chr>, team_abbr <chr>, season <dbl>
# }
