-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathload_cfb_games.Rd
97 lines (97 loc) · 6.27 KB
/
load_cfb_games.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/load_cfb_games.R
\name{load_cfb_games}
\alias{load_cfb_games}
\title{Load Lee Sharpe's Games File}
\usage{
load_cfb_games(season)
}
\value{
A data frame containing the following variables for all NFL games
since 1999:
\describe{
\item{game_id}{The ID of the game as assigned by the nflverse. Note that this value matches the \code{game_id} field in nflfastR if you wish to join the data.}
\item{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.}
\item{game_type}{What type of game? One of the following values:
\itemize{
\item{\code{REG}}{: a regular season game}
\item{\code{WC}}{: a wildcard playoff game}
\item{\code{DIV}}{: a divisional round playoff game}
\item{\code{CON}}{: a conference championship}
\item{\code{SB}}{: a Super Bowl}
}
}
\item{week}{The week of the NFL season the game occurs in. Please note that the \code{game_type} will differ for weeks >= 18 because of the season expansion in 2021. Please use \code{game_type} to filter for regular season or postseason.}
\item{gameday}{The date on which the game occurred.}
\item{weekday}{The day of the week on which the game occurred.}
\item{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.}
\item{away_team}{The away team.}
\item{away_score}{The number of points the away team scored. Is \code{NA} for games which haven't yet been played.}
\item{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.}
\item{home_score}{The number of points the home team scored. Is \code{NA} for games which haven't yet been played.}
\item{location}{Either \code{Home} if the home team is playing in their home stadium, or \code{Neutral} if the game is being played at a neutral location. This still shows as \code{Home} for games between the Giants and Jets even though they share the same home stadium.}
\item{result}{Equals \code{home_score - away_score}. The number of points the home team scored minus the number of points the away team scored. Is \code{NA} for games which haven't yet been played. Convenient for evaluating against the spread bets.}
\item{total}{The sum of each team's score in the game. Equals \code{home_score + away_score}. Is \code{NA} for games which haven't yet been played. Convenient for evaluating over/under total bets.}
\item{overtime}{Whether the game went into overtime (= 1) or not (= 0).}
\item{old_game_id}{The id of the game issued by the NFL Game Statistics & Information System.}
\item{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).}
\item{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).}
\item{away_moneyline}{Odd of the away_team winning the game.}
\item{home_moneyline}{Odd of the home_team winning the game.}
\item{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 \code{result} column.}
\item{away_spread_odds}{Odd of the away_team covering the \code{spread_line}.}
\item{home_spread_odds}{Odd of the home_team covering the \code{spread_line}.}
\item{total_line}{The total line for the game.}
\item{under_odds}{Odd of the \code{total} being under the \code{total_line}.}
\item{over_odds}{Odd of the \code{total} being over the \code{total_line}.}
\item{div_game}{Whether the game was a divisional game (= 1) or not (= 0).}
\item{roof}{What was the status of the stadium's roof? Will be one of the following values:
\itemize{
\item{\code{closed}}{: Stadium has a retractable roof which was closed}
\item{\code{dome}}{: An indoor stadium}
\item{\code{open}}{: Stadium has a retractable roof which was open}
\item{\code{outdoors}}{: An outdoor stadium}
}
}
\item{surface}{What type of ground the game was played on.}
\item{temp}{The temperature at the stadium (for \code{roof} types \code{outdoors} and \code{open} only).}
\item{wind}{The speed of the wind in miles/hour (for \code{roof} types \code{outdoors} and \code{open} only).}
\item{away_qb_id}{GSIS ID of the "starting quarterback" of the away team identified as the first
quarterback (per roster data) listed as \code{passer} (in \code{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 \code{passer}.}
\item{home_qb_id}{GSIS ID of the "starting quarterback" of the home team identified as the first
quarterback (per roster data) listed as \code{passer} (in \code{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 \code{passer}.}
\item{away_qb_name}{Full name of the "starting quarterback" of the away team identified as the first
quarterback (per roster data) listed as \code{passer} (in \code{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 \code{passer}.}
\item{home_qb_name}{Full name of the "starting quarterback" of the home team identified as the first
quarterback (per roster data) listed as \code{passer} (in \code{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 \code{passer}.}
\item{away_coach}{Name of the head coach of the away team.}
\item{home_coach}{Name of the head coach of the home team.}
\item{referee}{Name of the game's referee (head official).}
\item{stadium_id}{\href{https://www.pro-football-reference.com/}{Pro Football Reference} ID of the stadium.}
\item{stadium}{Name of the stadium.}
}
}
\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.
}
\examples{
\donttest{
games <- load_sharpe_games()
dplyr::glimpse(games)
\dontshow{
# Close open connections for R CMD Check
future::plan("sequential")
}
}
}