Get NFL schedule for a specific year from ESPN's API

get_nfl_schedule(season)

Arguments

season

Either numeric or character

Value

Returns a tibble

Examples

# Get all games from 2018 season, note that this will have some overlap # between seasons, for example 2018 returns 2018-01-01 to 2018-12-31 get_nfl_schedule(season = "2018")
#> Returning data for 2018!
#> # A tibble: 333 × 60 #> matchup matchup_short season type slug game_id game_uid game_date #> <chr> <chr> <int> <int> <chr> <chr> <chr> <chr> #> 1 Tennessee T… TEN @ KC 2017 3 post-… 400999… s:20~l:28~… 2018-01-0… #> 2 Atlanta Fal… ATL @ LAR 2017 3 post-… 400999… s:20~l:28~… 2018-01-0… #> 3 Buffalo Bil… BUF @ JAX 2017 3 post-… 400999… s:20~l:28~… 2018-01-0… #> 4 Carolina Pa… CAR @ NO 2017 3 post-… 400999… s:20~l:28~… 2018-01-0… #> 5 Atlanta Fal… ATL @ PHI 2017 3 post-… 400999… s:20~l:28~… 2018-01-1… #> 6 Tennessee T… TEN @ NE 2017 3 post-… 400999… s:20~l:28~… 2018-01-1… #> 7 Jacksonvill… JAX @ PIT 2017 3 post-… 400999… s:20~l:28~… 2018-01-1… #> 8 New Orleans… NO @ MIN 2017 3 post-… 400999… s:20~l:28~… 2018-01-1… #> 9 Jacksonvill… JAX @ NE 2017 3 post-… 400999… s:20~l:28~… 2018-01-2… #> 10 Minnesota V… MIN @ PHI 2017 3 post-… 400999… s:20~l:28~… 2018-01-2… #> # … with 323 more rows, and 52 more variables: attendance <int>, #> # venue_id <chr>, venue_name <chr>, venue_city <chr>, venue_state <chr>, #> # capacity <int>, indoor <lgl>, home_team_name <chr>, home_team_logo <chr>, #> # home_team_abb <chr>, home_team_id <chr>, home_team_location <chr>, #> # home_team_full <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>, away_team_id <chr>, …