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

if (FALSE) { # Get schedules for the whole 2015 - 2018 seasons seasons <- 2015:2018 schedules <- fast_scraper_schedules(seasons) }