Skip to contents

Get ESPN NBA schedule for a specific year

Usage

espn_nba_scoreboard(season)

Arguments

season

Either numeric or character (YYYYMMDD)

Value

Returns a tibble with scoreboard data

col_nametypes
matchupcharacter
matchup_shortcharacter
seasoninteger
season_typeinteger
season_slugcharacter
game_idinteger
game_uidcharacter
game_dateDate
attendanceinteger
noteslogical
status_namecharacter
broadcastslogical
start_datecharacter
geo_broadcastslogical
game_date_timePOSIXct
home_team_namecharacter
home_team_logocharacter
home_team_abbcharacter
home_team_idinteger
home_team_locationcharacter
home_team_full_namecharacter
home_team_colorcharacter
home_scoreinteger
home_wininteger
home_recordcharacter
away_team_namecharacter
away_team_logocharacter
away_team_abbcharacter
away_team_idinteger
away_team_locationcharacter
away_team_full_namecharacter
away_team_colorcharacter
away_scoreinteger
away_wininteger
away_recordcharacter

Examples


# Get schedule from date 2022-11-17 (returns 1000 results, max allowable.)
# \donttest{
  try(espn_nba_scoreboard(season = 20230423))
#> ── ESPN NBA Scoreboard Information from ESPN.com ──────────────── hoopR 2.1.0 ──
#>  Data updated: 2023-11-28 22:10:06 UTC
#> # A tibble: 4 × 35
#>   matchup          matchup_short season season_type season_slug game_id game_uid
#>   <chr>            <chr>          <int>       <int> <chr>         <int> <chr>   
#> 1 Cleveland Caval… CLE @ NY        2023           3 post-season  4.02e8 s:40~l:…
#> 2 Sacramento King… SAC @ GS        2023           3 post-season  4.02e8 s:40~l:…
#> 3 Boston Celtics … BOS @ ATL       2023           3 post-season  4.02e8 s:40~l:…
#> 4 Denver Nuggets … DEN @ MIN       2023           3 post-season  4.02e8 s:40~l:…
#> # ℹ 28 more variables: game_date <date>, attendance <int>,
#> #   play_by_play_available <lgl>, status_name <chr>, broadcast_market <chr>,
#> #   broadcast_name <chr>, start_date <chr>, game_date_time <dttm>,
#> #   home_team_name <chr>, home_team_logo <chr>, home_team_abb <chr>,
#> #   home_team_id <int>, home_team_location <chr>, home_team_full_name <chr>,
#> #   home_team_color <chr>, home_score <int>, home_win <int>, home_record <chr>,
#> #   away_team_name <chr>, away_team_logo <chr>, away_team_abb <chr>, …
# }