Skip to contents

Get NBA draft picks from the CollegeBasketballData API.

Usage

cbbd_draft_picks(
  year = NULL,
  draft_team = NULL,
  source_team = NULL,
  position = NULL
)

Arguments

year

(integer optional): Draft year (e.g. 2024).

draft_team

(character optional): NBA team filter.

source_team

(character optional): College team filter.

position

(character optional): Position filter.

Value

A hoopR_data tibble with one row per draft pick:

col_nametypesdescription
athlete_idintegerAthlete id.
source_team_idintegerCollege team id.
source_team_locationcharacterCollege team location.
source_team_namecharacterCollege team name.
source_team_league_affiliationcharacterCollege team league affiliation.
source_team_college_idnumericCollege id.
draft_team_idnumericNBA team id.
draft_teamcharacterNBA team name.
yearintegerDraft year.
overallintegerOverall pick number.
roundintegerDraft round.
pickintegerPick number within the round.
namecharacterPlayer name.
overall_rankintegerPre-draft overall rank.
position_rankintegerPre-draft position rank.
heightnumericPlayer height.
weightintegerPlayer weight (lbs).

See also

Other CBD Draft Functions: cbbd_draft_positions(), cbbd_draft_teams()

Examples

# \donttest{
  try(cbbd_draft_picks(year = 2024))
#>  2026-06-09 22:48:19.521859: Invalid arguments or no draft picks available!
#>  Args: year = 2024, draft_team = NULL, source_team = NULL, position = NULL
#>  Error: api.collegebasketballdata.com requires an API key.        See ?register_cbbd for details.
#> data frame with 0 columns and 0 rows
# }