Learn R Programming

nbastatR (version 0.1.110202031)

get_drafts: NBA drafts

Description

NBA draft data for specified sasons

Usage

get_drafts(draft_years = 1947:2018, nest_data = F, return_message = T)

Arguments

draft_years

vector of draft years

nest_data

if TRUE returns nested data frame

return_message

if TRUE returns message

Value

a `data_frame`

See Also

Other draft: get_nbadraftnet_mock_drafts, get_years_draft_combines

Other teams: get_seasons_rosters, get_teams_franchise_leaders, get_teams_players_seasons_summary_stats, get_teams_seasons_rankings

Examples

Run this code
# NOT RUN {
library(dplyr)
df_drafts <-
get_drafts(draft_years = 1983:2018, nest_data = FALSE, return_message = TRUE)

## Where do top 5 picks since 1983 come from?

df_drafts %>%
filter(numberPickOverall <= 5) %>%
count(nameOrganizationFrom, sort = T)
# }

Run the code above in your browser using DataLab