Skip to contents

Get NBA Stats API Season Schedule

Get NBA Stats API Season Schedule

Usage

nba_schedule(
  league_id = "00",
  season = year_to_season(most_recent_nba_season() - 1),
  ...
)

Arguments

league_id

League - default: '00'. Other options include '10': WNBA, '20': G-League

season

Season

...

Additional arguments passed to an underlying function like httr.

Value

Returns a tibble with the following columns:

col_nametypesdescription
game_datecharacterGame date (YYYY-MM-DD).
game_idcharacterUnique game identifier.
game_codecharacterESPN game code (numeric identifier).
game_statusintegerGame status label.
game_status_textcharacterGame status display text (e.g. 'Final', '4:32 - 4th').
game_sequenceintegerGame sequence.
game_date_estcharacterGame date est.
game_time_estcharacterGame time est.
game_date_time_estcharacterGame date time est.
game_date_utccharacterGame date utc.
game_time_utccharacterGame start time in UTC (ISO 8601 timestamp).
game_date_time_utccharacterGame date time utc.
away_team_timecharacterTime / clock value.
home_team_timecharacterTime / clock value.
daycharacterDay number within the month.
month_numintegerMonth num.
week_numberintegerWeek number.
week_namecharacterWeek name.
if_necessarycharacterIf necessary.
series_game_numbercharacterSeries game number.
series_textcharacterSeries text.
arena_namecharacterArena name.
arena_statecharacterArena state.
arena_citycharacterArena city.
postponed_statuscharacterPostponed status.
branch_linkcharacterBranch link.
game_subtypecharacterGame subtype.
home_team_idintegerUnique identifier for the home team.
home_team_namecharacterHome team name.
home_team_citycharacterHome team city / location.
home_team_tricodecharacterHome team three-letter code.
home_team_slugcharacterHome team's team slug.
home_team_winsintegerHome team's team wins.
home_team_lossesintegerHome team's team losses.
home_team_scoreintegerHome team's score.
home_team_seedintegerHome team's team seed.
away_team_idintegerUnique identifier for the away team.
away_team_namecharacterAway team name.
away_team_citycharacterAway team city / location.
away_team_tricodecharacterAway team three-letter code.
away_team_slugcharacterAway team's team slug.
away_team_winsintegerAway team's team wins.
away_team_lossesintegerAway team's team losses.
away_team_scoreintegerAway team's score.
away_team_seedintegerAway team's team seed.
seasoncharacterSeason identifier (4-digit year or 'YYYY-YY' string).
league_idcharacterLeague identifier ('10' = WNBA).

Details

 nba_schedule(league_id = '00', season = year_to_season(most_recent_nba_season() - 1))
 nba_schedule(league_id = '20', season = year_to_season(most_recent_nba_season() - 1))

Author

Saiem Gilani