
Get ESPN NBA Athlete Career Stats (Long Format)
Source:R/espn_nba_athlete_career.R
espn_nba_athlete_career_stats.RdReturns career stats for an NBA athlete in long format. Default
stat_type = 0L fetches the standard "All Splits" / regular-season
view. Pass a vector like c(0L, 1L, 2L) to attempt multiple types
and bind them via a stat_type_id column; variants that 404 for that
athlete are silently skipped. Stat types: 0 = regular season (default
endpoint), 1 = postseason, 2 = career aggregate. Coverage of types 1
and 2 is sparse — many athletes only have type 0 populated.
Arguments
- athlete_id
ESPN athlete identifier.
- stat_type
Integer or integer vector of stat-type codes. Default
0Lfetches the standard "All Splits" / regular-season view. Pass a vector likec(0L, 1L, 2L)to bind multiple types via astat_type_idcolumn; non-existent variants are silently skipped.- ...
Additional arguments; currently unused.
Value
A long tibble (one row per stat_type × split × category × stat).
| col_name | types | description |
| league | character | League slug. |
| athlete_id | character | ESPN athlete id. |
| stat_type_id | character | Stat-type code (0 = reg, 1 = post, 2 = career). |
| split_id | character | Split id. |
| split_name | character | Split name (typically "All Splits"). |
| split_type | character | Split type code. |
| category_name | character | Category key (e.g. "defensive"). |
| category_display | character | Category display name. |
| category_short | character | Category short display. |
| category_abbrev | character | Category abbreviation. |
| stat_name | character | Stat key. |
| stat_abbrev | character | Stat abbreviation. |
| stat_display | character | Stat display name. |
| stat_short | character | Stat short display. |
| description | character | Stat description. |
| value | numeric | Stat value. |
| display_value | character | Display-formatted value. |
See also
Other ESPN NBA Functions:
espn_nba_athlete_awards(),
espn_nba_athlete_contract(),
espn_nba_athlete_contracts(),
espn_nba_athlete_eventlog(),
espn_nba_athlete_eventlog_v2(),
espn_nba_athlete_gamelog(),
espn_nba_athlete_info(),
espn_nba_athlete_overview(),
espn_nba_athlete_seasons(),
espn_nba_athlete_splits(),
espn_nba_athlete_statisticslog(),
espn_nba_athlete_stats(),
espn_nba_athletes_index(),
espn_nba_award(),
espn_nba_betting(),
espn_nba_calendar(),
espn_nba_coach(),
espn_nba_coach_season(),
espn_nba_coaches(),
espn_nba_conferences(),
espn_nba_draft(),
espn_nba_draft_athletes(),
espn_nba_draft_pick(),
espn_nba_draft_rounds(),
espn_nba_draft_status(),
espn_nba_event_broadcasts(),
espn_nba_event_odds(),
espn_nba_event_officials(),
espn_nba_event_powerindex(),
espn_nba_event_predictor(),
espn_nba_event_probabilities(),
espn_nba_event_propbets(),
espn_nba_event_situation(),
espn_nba_franchise(),
espn_nba_franchises(),
espn_nba_freeagents(),
espn_nba_futures(),
espn_nba_game_all(),
espn_nba_game_rosters(),
espn_nba_injuries(),
espn_nba_leaders(),
espn_nba_news(),
espn_nba_pbp(),
espn_nba_player_box(),
espn_nba_player_stats(),
espn_nba_powerindex(),
espn_nba_scoreboard(),
espn_nba_season_awards(),
espn_nba_season_group(),
espn_nba_season_group_children(),
espn_nba_season_group_teams(),
espn_nba_season_groups(),
espn_nba_season_info(),
espn_nba_season_leaders(),
espn_nba_season_ranking(),
espn_nba_season_rankings(),
espn_nba_season_type(),
espn_nba_season_types(),
espn_nba_season_week(),
espn_nba_season_weeks(),
espn_nba_seasons(),
espn_nba_standings(),
espn_nba_team(),
espn_nba_team_box(),
espn_nba_team_current_roster(),
espn_nba_team_depthchart(),
espn_nba_team_injuries(),
espn_nba_team_leaders(),
espn_nba_team_news(),
espn_nba_team_odds_records(),
espn_nba_team_record(),
espn_nba_team_roster(),
espn_nba_team_schedule(),
espn_nba_team_season_profile(),
espn_nba_team_season_roster(),
espn_nba_team_stats(),
espn_nba_teams(),
espn_nba_tournament(),
espn_nba_tournament_seasons(),
espn_nba_tournaments(),
espn_nba_transactions(),
espn_nba_venues(),
espn_nba_week_ranking(),
espn_nba_week_rankings(),
espn_nba_wp()
Examples
# \donttest{
# LeBron James — regular + postseason combined
espn_nba_athlete_career_stats(athlete_id = 1966)
#> ── ESPN NBA Athlete Career Stats ──────────────────────────────── hoopR 3.1.0 ──
#> ℹ Data updated: 2026-05-19 01:33:39 UTC
#> # A tibble: 114 × 17
#> league athlete_id stat_type_id split_id split_name split_type category_name
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 nba 1966 0 0 All Splits total defensive
#> 2 nba 1966 0 0 All Splits total defensive
#> 3 nba 1966 0 0 All Splits total defensive
#> 4 nba 1966 0 0 All Splits total defensive
#> 5 nba 1966 0 0 All Splits total defensive
#> 6 nba 1966 0 0 All Splits total defensive
#> 7 nba 1966 0 0 All Splits total defensive
#> 8 nba 1966 0 0 All Splits total defensive
#> 9 nba 1966 0 0 All Splits total defensive
#> 10 nba 1966 0 0 All Splits total defensive
#> # ℹ 104 more rows
#> # ℹ 10 more variables: category_display <chr>, category_short <chr>,
#> # category_abbrev <chr>, stat_name <chr>, stat_abbrev <chr>,
#> # stat_display <chr>, stat_short <chr>, description <chr>, value <dbl>,
#> # display_value <chr>
# Just career aggregate
espn_nba_athlete_career_stats(athlete_id = 1966, stat_type = 2L)
#> ── ESPN NBA Athlete Career Stats ──────────────────────────────── hoopR 3.1.0 ──
#> ℹ Data updated: 2026-05-19 01:33:39 UTC
#> # A tibble: 0 × 17
#> # ℹ 17 variables: league <chr>, athlete_id <chr>, stat_type_id <chr>,
#> # split_id <chr>, split_name <chr>, split_type <chr>, category_name <chr>,
#> # category_display <chr>, category_short <chr>, category_abbrev <chr>,
#> # stat_name <chr>, stat_abbrev <chr>, stat_display <chr>, stat_short <chr>,
#> # description <chr>, value <dbl>, display_value <chr>
# }