-
Notifications
You must be signed in to change notification settings - Fork 81
/
goals.R
93 lines (90 loc) · 5.04 KB
/
goals.R
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
################################################################################
# Joshua C. Fjelstul, Ph.D.
# worldcup R package
# automatically generated by the codebookr R package
################################################################################
#' Goals
#'
#' This dataset records all goals. There is one observation per goal. It
#' indicates the team that scored the goal, player who scored the goal, the
#' team of the player who scored the goal (to account for own goals), minute
#' of the goal, and whether the goal was scored in the run of play by the
#' opposition, was an own goal, or was a penalty. This dataset does not
#' include converted penalties in a penalty shootout. There are 26 variables
#' and 3637 observations.
#'
#' @format A data frame with 27 variables:
#' \describe{
#' \item{key_id}{\code{integer}. The unique ID number for the observation.}
#' \item{goal_id}{\code{text}. The unique ID number for the goal. Has the
#' format \code{G-####}, where the number is a counter that is assigned with
#' the data sorted by the match ID, then the minute of the goal.}
#' \item{tournament_id}{\code{text}. The unique ID number for the tournament.
#' References \code{tournament_id} in the \code{tournaments} dataset.}
#' \item{tournament_name}{\code{text}. The name of the tournament.}
#' \item{match_id}{\code{text}. The unique ID number for the match in which
#' the goal occurred. References \code{match_id} in the \code{matches}
#' dataset.}
#' \item{match_name}{\code{text}. The name of the match in which the goal
#' occurred.}
#' \item{match_date}{\code{date}. The date of the match in the format
#' \code{YYYY-MM-DD}.}
#' \item{stage_name}{\code{enum}. The stage of the tournament in which the
#' match occurred. The possible values are: \code{first round}, \code{second
#' round}, \code{group stage}, \code{round of sixteen}, \code{quarter-finals},
#' \code{semi-finals}, \code{third place match}, \code{final}. Note that not
#' all values are applicable to all tournaments.}
#' \item{group_name}{\code{text}. The name of the group.}
#' \item{team_id}{\code{text}. The unique ID number for the team that scored
#' the goal. References \code{team_id} in the \code{teams} dataset. For own
#' goals, this is the team that is awarded the goal, not the team of the
#' player who scored the own goal.}
#' \item{team_name}{\code{text}. The name of the team of the player who scored
#' the goal.}
#' \item{team_code}{\code{text}. The 3-letter code for the team of the player
#' who scored the goal.}
#' \item{home_team}{\code{boolean}. Whether the team was the home team. Coded
#' \code{1} if the team was the home team and \code{0} otherwise.}
#' \item{away_team}{\code{boolean}. Whether the team was the away team. Coded
#' \code{1} if the team was the away team and \code{0} otherwise.}
#' \item{player_id}{\code{text}. The unique ID number for the player who
#' scored the goal. References \code{player_id} in the \code{players}
#' dataset.}
#' \item{family_name}{\code{text}. The family name of the player who scored
#' the goal.}
#' \item{given_name}{\code{text}. The given name of the player who scored the
#' goal.}
#' \item{shirt_number}{\code{integer}. The shirt number of the player who
#' scored the goal.}
#' \item{player_team_id}{\code{text}. The unique ID number for the team of the
#' player who scored the goal. References \code{team_id} in the \code{teams}
#' dataset. For own goals, this is the team of the player who scored the own
#' goal, not the team that is awarded the goal.}
#' \item{player_team_name}{\code{text}. The name of the team of the player who
#' scored the goal.}
#' \item{player_team_code}{\code{text}. The 3-letter code for the team of the
#' player who scored the goal.}
#' \item{minute_label}{\code{text}. The minute of the match in which the goal
#' occurred in the format \code{#'} or \code{#'+#'}.}
#' \item{minute_regulation}{\code{integer}. The minute of regulation time in
#' which the substitution occurred.}
#' \item{minute_stoppage}{\code{integer}. The minute of stoppage time in which
#' the goal occurred. Coded \code{0} if the substitution did not occur during
#' stoppage time.}
#' \item{match_period}{\code{enum}. The period of the match in which the goal
#' occurred. The possible values are: \code{first half}, \code{first half,
#' stoppage time}, \code{second half}, \code{second half, stoppage time},
#' \code{extra time, first half}, \code{extra time, first half, stoppage
#' time}, \code{extra time, second half}, \code{extra time, second half,
#' stoppage time}, \code{after extra time}.}
#' \item{own_goal}{\code{boolean}. Whether the goal was an own goal. Coded
#' \code{1} if the goal was an own goal and \code{0} otherwise.}
#' \item{penalty}{\code{boolean}. Whether the goal was a penalty that occurred
#' during the game, as opposed to during a penalty shootout. Coded \code{1} if
#' the goal was a penalty that occurred during the game and \code{0}
#' otherwise.}
#' }
"goals"
################################################################################
# end R script
################################################################################