Skip to contents

Returns biographical and career information for an NHL player. Uses the NHL API (api-web.nhle.com).

Usage

nhl_player_info(player_id)

Arguments

player_id

Integer player ID (e.g., 8476899)

Value

A data frame (fastRhockey_data) with the following columns:

col_nametypesdescription
player_idintegerUnique player identifier.
first_namecharacterPlayer first name.
last_namecharacterPlayer last name.
full_namecharacterPlayer full name.
team_abbrcharacterCurrent team abbreviation.
team_namecharacterCurrent team name.
sweater_numberintegerPlayer sweater (jersey) number.
positioncharacterPlayer position.
shoots_catchescharacterHandedness (shoots or catches).
height_inchesintegerPlayer height in inches.
weight_poundsintegerPlayer weight in pounds.
birth_datecharacterPlayer date of birth.
birth_citycharacterCity of birth.
birth_statecharacterState or province of birth.
birth_countrycharacterCountry of birth.
draft_yearintegerYear the player was drafted.
draft_roundintegerDraft round.
draft_pickintegerDraft pick within the round.
draft_overallintegerOverall draft selection number.
draft_team_abbrcharacterAbbreviation of the drafting team.
is_activelogicalWhether the player is currently active.
headshot_urlcharacterURL of the player headshot image.

Examples

# \donttest{
  try(nhl_player_info(player_id = 8476899))
#> ── NHL Player Info ──────────────────────────────────────── fastRhockey 1.0.0 ──
#>  Data updated: 2026-06-13 04:21:30 UTC
#> # A tibble: 1 × 22
#>   player_id first_name last_name full_name   team_abbr team_name  sweater_number
#>       <int> <chr>      <chr>     <chr>       <chr>     <chr>               <int>
#> 1   8476899 Matt       Murray    Matt Murray SEA       Seattle K…             30
#> # ℹ 15 more variables: position <chr>, shoots_catches <chr>,
#> #   height_inches <int>, weight_pounds <int>, birth_date <chr>,
#> #   birth_city <chr>, birth_state <chr>, birth_country <chr>, draft_year <int>,
#> #   draft_round <int>, draft_pick <int>, draft_overall <int>,
#> #   draft_team_abbr <chr>, is_active <lgl>, headshot_url <chr>
# }