Learn R Programming

hoopR (version 3.1.0)

hoopshype_salaries: HoopsHype Player Salaries

Description

Get NBA player salaries from HoopsHype.

Returns the full league's player salaries, one row per player per contract season (current plus future seasons HoopsHype lists). No API key is required; dollar figures are returned as numeric.

HoopsHype is a Next.js app whose single salaries page paginates client-side, but each team's salary page (/salaries/{team}/) embeds that team's complete roster in its __NEXT_DATA__ payload. This function iterates the 30 team pages and stitches them together (~30 requests per call) using a team-by-team approach.

Usage

hoopshype_salaries()

Arguments

Value

A hoopR_data tibble with one row per player-season:

col_nametypesdescription
player_idcharacterHoopsHype player id.
playercharacterPlayer name.
first_namecharacterPlayer first name.
last_namecharacterPlayer last name.
team_idcharacterHoopsHype team id.
teamcharacterTeam name.
seasonintegerContract season (4-digit ending year).
salarynumericSalary for the season (USD).
cap_allocationnumericCap allocation for the season (USD).
team_optionlogicalWhether the season is a team option.
player_optionlogicalWhether the season is a player option.
two_waylogicalWhether it is a two-way contract.
qualifying_offerlogicalWhether it is a qualifying offer.

See Also

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

Examples

Run this code
# \donttest{
  try(hoopshype_salaries())
# }

Run the code above in your browser using DataLab