View source: R/load_sharpe_games.R
load_sharpe_games | R Documentation |
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.
load_sharpe_games(...)
... |
Arguments passed on to
|
A data frame containing the following variables for all NFL games since 1999:
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.
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.
What type of game? One of the following values:
REG
a regular season game
WC
a wildcard playoff game
DIV
a divisional round playoff game
CON
a conference championship
SB
a Super Bowl
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 use game_type
to filter for regular season or postseason.
The date on which the game occurred.
The day of the week on which the game occurred.
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.
The away team.
The number of points the away team scored. Is NA
for games which haven't yet been played.
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.
The number of points the home team scored. Is NA
for games which haven't yet been played.
Either Home
if the home team is playing in their home stadium, or Neutral
if the game is being played at a neutral location. This still shows as Home
for games between the Giants and Jets even though they share the same home stadium.
Equals home_score - away_score
. The number of points the home team scored minus the number of points the away team scored. Is NA
for games which haven't yet been played. Convenient for evaluating against the spread bets.
The sum of each team's score in the game. Equals home_score + away_score
. Is NA
for games which haven't yet been played. Convenient for evaluating over/under total bets.
Whether the game went into overtime (= 1) or not (= 0).
The id of the game issued by the NFL Game Statistics & Information System.
The number of days since that away team's previous game (7 is used for the team's first game of the season).
The number of days since that home team's previous game (7 is used for the team's first game of the season).
Odd of the away_team winning the game.
Odd of the home_team winning the game.
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.
Odd of the away_team covering the spread_line
.
Odd of the home_team covering the spread_line
.
The total line for the game.
Odd of the total
being under the total_line
.
Odd of the total
being over the total_line
.
Whether the game was a divisional game (= 1) or not (= 0).
What was the status of the stadium's roof? Will be one of the following values:
closed
Stadium has a retractable roof which was closed
dome
An indoor stadium
open
Stadium has a retractable roof which was open
outdoors
An outdoor stadium
What type of ground the game was played on.
The temperature at the stadium (for roof
types outdoors
and open
only).
The speed of the wind in miles/hour (for roof
types outdoors
and open
only).
GSIS ID of the "starting quarterback" of the away team identified as the first
quarterback (per roster data) listed as passer
(in nflfastR
play by play data)
in 2+ plays that game. In the final regular season game it is the QB with the
most plays as the passer
.
GSIS ID of the "starting quarterback" of the home team identified as the first
quarterback (per roster data) listed as passer
(in nflfastR
play by play data)
in 2+ plays that game. In the final regular season game it is the QB with the
most plays as the passer
.
Full name of the "starting quarterback" of the away team identified as the first
quarterback (per roster data) listed as passer
(in nflfastR
play by play data)
in 2+ plays that game. In the final regular season game it is the QB with the
most plays as the passer
.
Full name of the "starting quarterback" of the home team identified as the first
quarterback (per roster data) listed as passer
(in nflfastR
play by play data)
in 2+ plays that game. In the final regular season game it is the QB with the
most plays as the passer
.
Name of the head coach of the away team.
Name of the head coach of the home team.
Name of the game's referee (head official).
Pro Football Reference ID of the stadium.
Name of the stadium.
The internally called function nflreadr::load_schedules()
try({#to avoid CRAN test problems
games <- load_sharpe_games()
dplyr::glimpse(games)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.