Get NFL Season Schedules

fast_scraper_schedules(seasons, pp = FALSE)

Arguments

seasons

Vector of numeric or character 4 digit seasons

pp

Logical - either TRUE or FALSE (see details for further information)

Value

Data frame containing the following detailed game information:

game_id

Character identifier including season, week, away team and home team

season

4 digit season year.

game_type

One of 'REG', 'WC', 'DIV', 'CON', 'SB' indicating if a game was a regular season game or one of the playoff rounds.

week

Numeric week number.

gameday

Game date in format yyyy/mm/dd.

weekday

The day of the week on which the game occcured.

gametime

The kickoff time of the game. This is represented in 24-hour time and the Eastern time zone, regardless of what time zone the game was being played in.

away_team

Away team abbreviation.

home_team

Home team abbreviation.

away_score

The number of points the away team scored. Is 'NA' for games which haven't yet been played.

home_score

The number of points the home team scored. Is 'NA' for games which haven't yet been played.

home_result

Equals home_score - away_score and means the game outcome from the perspective of the home team.

stadium

Name of the stadium the game was or will be played in. (Source: Pro-Football-Reference)

location

Either 'Home' o 'Neutral' indicating if the home team played at home or at a neutral site.

roof

One of 'dome', 'outdoors', 'closed', 'open' indicating indicating the roof status of the stadium the game was played in. (Source: Pro-Football-Reference)

surface

What type of ground the game was played on. (Source: Pro-Football-Reference)

old_game_id

Unique game identifier of the old NFL API.

Details

This functions now incorporates the games file provided and maintained by Lee Sharpe.

The pp parameter controls if the scraper should use parallel processing. Please note that the initiating process takes a few seconds which means it may be better to set pp = FALSE if you are scraping less than 10 seasons.

Examples

# \donttest{ # Get schedules for the whole 2015 - 2018 seasons fast_scraper_schedules(2015:2018)
#> # A tibble: 1,068 x 17 #> game_id season game_type week gameday weekday gametime away_team home_team #> <chr> <int> <chr> <int> <chr> <chr> <chr> <chr> <chr> #> 1 2015_0~ 2015 REG 1 2015-0~ Thursd~ 20:30 PIT NE #> 2 2015_0~ 2015 REG 1 2015-0~ Sunday 13:00 IND BUF #> 3 2015_0~ 2015 REG 1 2015-0~ Sunday 13:00 GB CHI #> 4 2015_0~ 2015 REG 1 2015-0~ Sunday 13:00 KC HOU #> 5 2015_0~ 2015 REG 1 2015-0~ Sunday 13:00 CAR JAX #> 6 2015_0~ 2015 REG 1 2015-0~ Sunday 13:00 CLE NYJ #> 7 2015_0~ 2015 REG 1 2015-0~ Sunday 13:00 SEA STL #> 8 2015_0~ 2015 REG 1 2015-0~ Sunday 13:00 MIA WAS #> 9 2015_0~ 2015 REG 1 2015-0~ Sunday 16:05 NO ARI #> 10 2015_0~ 2015 REG 1 2015-0~ Sunday 16:05 DET SD #> # ... with 1,058 more rows, and 8 more variables: away_score <int>, #> # home_score <int>, home_result <int>, stadium <chr>, location <chr>, #> # roof <chr>, surface <chr>, old_game_id <chr>
# }