load_schedules {nflseedR} | R Documentation |
Load Lee Sharpe's Games File
Description
Lee Sharpe maintains an important data set that contains broadly used information on games in the National Football League. This function is a convenient helper to download the file into memory without having to remember the correct url.
Usage
load_schedules(...)
load_sharpe_games(...)
Arguments
... |
Arguments passed on to
|
Value
A data frame containing the following variables for all NFL games since 1999:
- game_id
The ID of the game as assigned by the nflverse. Note that this value matches the
game_id
field in nflfastR if you wish to join the data.- season
The year of the NFL season. This represents the whole season, so regular season games that happen in January as well as playoff games will occur in the year after this number.
- game_type
What type of game? One of the following values:
REG
: a regular season gameWC
: a wildcard playoff gameDIV
: a divisional round playoff gameCON
: a conference championshipSB
: a Super Bowl
- week
The week of the NFL season the game occurs in. Please note that the
game_type
will differ for weeks >= 18 because of the season expansion in 2021. Please usegame_type
to filter for regular season or postseason.- gameday
The date on which the game occurred.
- weekday
The day of the week on which the game occurred.
- 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
The away team.
- away_score
The number of points the away team scored. Is
NA
for games which haven't yet been played.- home_team
The home team. Note that this contains the designated home team for games which no team is playing at home such as Super Bowls or NFL International games.
- home_score
The number of points the home team scored. Is
NA
for games which haven't yet been played.- location
Either
Home
if the home team is playing in their home stadium, orNeutral
if the game is being played at a neutral location. This still shows asHome
for games between the Giants and Jets even though they share the same home stadium.- result
Equals
home_score - away_score
. The number of points the home team scored minus the number of points the away team scored. IsNA
for games which haven't yet been played. Convenient for evaluating against the spread bets.- total
The sum of each team's score in the game. Equals
home_score + away_score
. IsNA
for games which haven't yet been played. Convenient for evaluating over/under total bets.- overtime
Whether the game went into overtime (= 1) or not (= 0).
- old_game_id
The id of the game issued by the NFL Game Statistics & Information System.
- away_rest
The number of days since that away team's previous game (7 is used for the team's first game of the season).
- home_rest
The number of days since that home team's previous game (7 is used for the team's first game of the season).
- away_moneyline
Odd of the away_team winning the game.
- home_moneyline
Odd of the home_team winning the game.
- spread_line
The spread line for the game. A positive number means the home team was favored by that many points, a negative number means the away team was favored by that many points. This lines up with the
result
column.- away_spread_odds
Odd of the away_team covering the
spread_line
.- home_spread_odds
Odd of the home_team covering the
spread_line
.- total_line
The total line for the game.
- under_odds
Odd of the
total
being under thetotal_line
.- over_odds
Odd of the
total
being over thetotal_line
.- div_game
Whether the game was a divisional game (= 1) or not (= 0).
- roof
What was the status of the stadium's roof? Will be one of the following values:
closed
: Stadium has a retractable roof which was closeddome
: An indoor stadiumopen
: Stadium has a retractable roof which was openoutdoors
: An outdoor stadium
- surface
What type of ground the game was played on.
- temp
The temperature at the stadium (for
roof
typesoutdoors
andopen
only).- wind
The speed of the wind in miles/hour (for
roof
typesoutdoors
andopen
only).- away_qb_id
GSIS ID of the "starting quarterback" of the away team identified as the first quarterback (per roster data) listed as
passer
(innflfastR
play by play data) in 2+ plays that game. In the final regular season game it is the QB with the most plays as thepasser
.- home_qb_id
GSIS ID of the "starting quarterback" of the home team identified as the first quarterback (per roster data) listed as
passer
(innflfastR
play by play data) in 2+ plays that game. In the final regular season game it is the QB with the most plays as thepasser
.- away_qb_name
Full name of the "starting quarterback" of the away team identified as the first quarterback (per roster data) listed as
passer
(innflfastR
play by play data) in 2+ plays that game. In the final regular season game it is the QB with the most plays as thepasser
.- home_qb_name
Full name of the "starting quarterback" of the home team identified as the first quarterback (per roster data) listed as
passer
(innflfastR
play by play data) in 2+ plays that game. In the final regular season game it is the QB with the most plays as thepasser
.- away_coach
Name of the head coach of the away team.
- home_coach
Name of the head coach of the home team.
- referee
Name of the game's referee (head official).
- stadium_id
Pro Football Reference ID of the stadium.
- stadium
Name of the stadium.
See Also
The internally called function nflreadr::load_schedules()
Examples
try({#to avoid CRAN test problems
games <- load_sharpe_games()
dplyr::glimpse(games)
})