Skip to contents

Get team salary-cap allocations from Spotrac.

Returns one row per team with cap allocations, cap space, active-player counts and average age for a season. No API key is required.

Usage

spotrac_team_cap(season = most_recent_nba_season())

Arguments

season

(integer required): Season, in 4-digit ending-year format (e.g. 2024). Defaults to most_recent_nba_season().

Value

A hoopR_data tibble with one row per team (columns reflect Spotrac's table; dollar figures are returned as numeric):

col_nametypesdescription
rankintegerSpotrac cap rank.
teamcharacterTeam abbreviation.
recordcharacterWin-loss record.
players_activeintegerNumber of active players.
avg_age_teamnumericAverage roster age.
total_cap_allocationsnumericTotal cap allocations (USD).
cap_space_allnumericCap space / over-the-cap amount (USD).
seasonintegerSeason (echoes the season argument).

See also

Other Salary & Draft Functions: hoopshype_salaries(), nbadraft_mock_draft()

Examples

# \donttest{
  try(spotrac_team_cap(season = 2024))
#> ── Team salary cap from spotrac.com ───────────────────────────── hoopR 3.1.0 ──
#>  Data updated: 2026-08-06 04:19:29 UTC
#> # A tibble: 31 × 11
#>    rank  team  record players_active avg_age_team total_cap_allocations
#>    <chr> <chr> <chr>           <dbl>        <dbl>                 <dbl>
#>  1 1     DET   44-38              15         25               141808220
#>  2 2     ORL   41-41              15         25.3             152959238
#>  3 3     UTA   17-65              15         23.9             154114022
#>  4 4     SAS   34-48              15         25.2             162809380
#>  5 5     OKC   68-14              15         24.2             166001694
#>  6 6     CHA   19-63              15         25.2             167423486
#>  7 7     MEM   48-34              15         24.6             167814933
#>  8 8     CHI   39-43              15         24.6             168006873
#>  9 9     PHI   24-58              15         26.6             170340647
#> 10 10    IND   50-32              15         25.7             171232577
#> # ℹ 21 more rows
#> # ℹ 5 more variables: cap_space_all <dbl>, active <dbl>, active_top_3 <dbl>,
#> #   dead_cap <dbl>, season <int>
# }