-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpbp_player_pos_dataset_documenation.R
368 lines (368 loc) · 16 KB
/
pbp_player_pos_dataset_documenation.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
#' College Football Play-by-Play data frame with in-line Expected Points (EP) and Win Probability (WP) Metrics
#'
#' Play-by-Play data frame by year with the following
#'
#' @format A data frame with 361 variables:
#' \describe{
#' \item{\code{year}}{integer.}
#' \item{\code{week}}{integer.}
#' \item{\code{id_play}}{double.}
#' \item{\code{game_id}}{integer.}
#' \item{\code{pos_team}}{character.}
#' \item{\code{def_pos_team}}{character.}
#' \item{\code{half}}{integer.}
#' \item{\code{period}}{integer.}
#' \item{\code{TimeSecsRem}}{integer.}
#' \item{\code{play_type}}{character.}
#' \item{\code{play_text}}{character.}
#' \item{\code{down}}{integer.}
#' \item{\code{distance}}{integer.}
#' \item{\code{yards_to_goal}}{integer.}
#' \item{\code{yards_gained}}{integer.}
#' \item{\code{rusher_player_name}}{character.}
#' \item{\code{yds_rushed}}{integer.}
#' \item{\code{receiver_player_name}}{character.}
#' \item{\code{yds_receiving}}{integer.}
#' \item{\code{passer_player_name}}{character.}
#' \item{\code{yds_sacked}}{integer.}
#' \item{\code{sack_player_name}}{character.}
#' \item{\code{sack_player_name2}}{character.}
#' \item{\code{pass_breakup_player_name}}{character.}
#' \item{\code{interception_player_name}}{character.}
#' \item{\code{fumble_player_name}}{character.}
#' \item{\code{fumble_forced_player_name}}{character.}
#' \item{\code{fumble_recovered_player_name}}{character.}
#' \item{\code{yds_fumble_return}}{integer.}
#' \item{\code{punter_player_name}}{character.}
#' \item{\code{yds_punted}}{integer.}
#' \item{\code{punt_block_player_name}}{character.}
#' \item{\code{punt_block_return_player_name}}{character.}
#' \item{\code{punt_returner_player_name}}{character.}
#' \item{\code{yds_punt_return}}{integer.}
#' \item{\code{yds_punt_gained}}{integer.}
#' \item{\code{fg_kicker_player_name}}{character.}
#' \item{\code{yds_fg}}{integer.}
#' \item{\code{fg_block_player_name}}{character.}
#' \item{\code{fg_return_player_name}}{character.}
#' \item{\code{kickoff_player_name}}{character.}
#' \item{\code{yds_kickoff}}{integer.}
#' \item{\code{kickoff_returner_player_name}}{character.}
#' \item{\code{yds_kickoff_return}}{integer.}
#' \item{\code{penalty_detail}}{character.}
#' \item{\code{yds_penalty}}{integer.}
#' \item{\code{Goal_To_Go}}{logical.}
#' \item{\code{Under_two}}{logical.}
#' \item{\code{pos_score_diff_start}}{integer.}
#' \item{\code{EPA}}{double.}
#' \item{\code{ep_before}}{double.}
#' \item{\code{ep_after}}{double.}
#' \item{\code{def_EPA}}{double.}
#' \item{\code{wpa}}{double.}
#' \item{\code{wp_before}}{double.}
#' \item{\code{wp_after}}{double.}
#' \item{\code{down_end}}{integer.}
#' \item{\code{distance_end}}{integer.}
#' \item{\code{yards_to_goal_end}}{integer.}
#' \item{\code{pos_score_pts}}{integer.}
#' \item{\code{pos_team_score}}{integer.}
#' \item{\code{def_pos_team_score}}{integer.}
#' \item{\code{offense_score_play}}{integer.}
#' \item{\code{defense_score_play}}{integer.}
#' \item{\code{lead_pos_team}}{character.}
#' \item{\code{lag_play_type}}{character.}
#' \item{\code{lead_play_type}}{character.}
#' \item{\code{change_of_pos_team}}{integer.}
#' \item{\code{offense_play}}{character.}
#' \item{\code{defense_play}}{character.}
#' \item{\code{score_pts}}{integer.}
#' \item{\code{change_of_poss}}{integer.}
#' \item{\code{downs_turnover}}{integer.}
#' \item{\code{turnover}}{integer.}
#' \item{\code{firstD_by_poss}}{integer.}
#' \item{\code{firstD_by_penalty}}{integer.}
#' \item{\code{firstD_by_yards}}{integer.}
#' \item{\code{clock.minutes}}{integer.}
#' \item{\code{clock.seconds}}{integer.}
#' \item{\code{game_play_number}}{integer.}
#' \item{\code{orig_drive_number}}{integer.}
#' \item{\code{drive_number}}{integer.}
#' \item{\code{drive_play_number}}{integer.}
#' \item{\code{end_of_half}}{integer.}
#' \item{\code{pos_team_receives_2H_kickoff}}{integer.}
#' \item{\code{offense_receives_2H_kickoff}}{integer.}
#' \item{\code{home_wp_before}}{double.}
#' \item{\code{away_wp_before}}{double.}
#' \item{\code{home_wp_after}}{double.}
#' \item{\code{away_wp_after}}{double.}
#' \item{\code{home}}{character.}
#' \item{\code{away}}{character.}
#' \item{\code{wpa_base}}{double.}
#' \item{\code{wpa_base_nxt}}{double.}
#' \item{\code{wpa_change}}{double.}
#' \item{\code{wpa_change_nxt}}{double.}
#' \item{\code{wpa_base_ind}}{integer.}
#' \item{\code{wpa_base_nxt_ind}}{integer.}
#' \item{\code{wpa_change_ind}}{integer.}
#' \item{\code{wpa_change_nxt_ind}}{integer.}
#' \item{\code{lead_wp_before}}{double.}
#' \item{\code{lag_pos_team}}{character.}
#' \item{\code{lead_pos_team2}}{character.}
#' \item{\code{ExpScoreDiff}}{double.}
#' \item{\code{ExpScoreDiff_Time_Ratio}}{double.}
#' \item{\code{offense_timeouts}}{integer.}
#' \item{\code{defense_timeouts}}{integer.}
#' \item{\code{offense_score}}{integer.}
#' \item{\code{defense_score}}{integer.}
#' \item{\code{off_timeouts_rem_before}}{integer.}
#' \item{\code{def_timeouts_rem_before}}{integer.}
#' \item{\code{off_timeout_called}}{integer.}
#' \item{\code{def_timeout_called}}{integer.}
#' \item{\code{ppa}}{double.}
#' \item{\code{drive_start_yards_to_goal}}{integer.}
#' \item{\code{drive_end_yards_to_goal}}{integer.}
#' \item{\code{drive_yards}}{integer.}
#' \item{\code{drive_scoring}}{integer.}
#' \item{\code{drive_result_detailed}}{character.}
#' \item{\code{new_drive_pts}}{integer.}
#' \item{\code{drive_pts}}{integer.}
#' \item{\code{drive_id}}{double.}
#' \item{\code{pos_score_diff}}{integer.}
#' \item{\code{pos_team_timeouts_rem_before}}{integer.}
#' \item{\code{def_pos_team_timeouts_rem_before}}{integer.}
#' \item{\code{TimeSecsRem_end}}{integer.}
#' \item{\code{log_ydstogo_end}}{double.}
#' \item{\code{Goal_To_Go_end}}{logical.}
#' \item{\code{Under_two_end}}{logical.}
#' \item{\code{score_diff}}{integer.}
#' \item{\code{score_diff_start}}{integer.}
#' \item{\code{offense_conference}}{character.}
#' \item{\code{defense_conference}}{character.}
#' \item{\code{yard_line}}{integer.}
#' \item{\code{scoring}}{logical.}
#' \item{\code{drive_start_period}}{integer.}
#' \item{\code{drive_end_period}}{integer.}
#' \item{\code{drive_result}}{character.}
#' \item{\code{drive_time_minutes_start}}{integer.}
#' \item{\code{drive_time_seconds_start}}{integer.}
#' \item{\code{drive_time_minutes_end}}{integer.}
#' \item{\code{drive_time_seconds_end}}{integer.}
#' \item{\code{drive_time_minutes_elapsed}}{integer.}
#' \item{\code{drive_time_seconds_elapsed}}{integer.}
#' \item{\code{penalty_flag}}{logical.}
#' \item{\code{penalty_declined}}{logical.}
#' \item{\code{penalty_no_play}}{logical.}
#' \item{\code{penalty_offset}}{logical.}
#' \item{\code{penalty_1st_conv}}{logical.}
#' \item{\code{penalty_text}}{logical.}
#' \item{\code{penalty_play_text}}{character.}
#' \item{\code{orig_play_type}}{character.}
#' \item{\code{half_clock.minutes}}{integer.}
#' \item{\code{Under_three}}{logical.}
#' \item{\code{kickoff_play}}{integer.}
#' \item{\code{receives_2H_kickoff}}{integer.}
#' \item{\code{lag_score_diff}}{integer.}
#' \item{\code{lag_offense_play}}{character.}
#' \item{\code{lead_offense_play}}{character.}
#' \item{\code{lead_offense_play2}}{character.}
#' \item{\code{lag_pos_score_diff}}{integer.}
#' \item{\code{half_play_number}}{integer.}
#' \item{\code{lag_off_timeouts}}{integer.}
#' \item{\code{lag_def_timeouts}}{integer.}
#' \item{\code{lag_TimeSecsRem2}}{integer.}
#' \item{\code{lag_TimeSecsRem}}{integer.}
#' \item{\code{lead_TimeSecsRem}}{integer.}
#' \item{\code{lead_TimeSecsRem2}}{integer.}
#' \item{\code{lag_yards_to_goal2}}{integer.}
#' \item{\code{lag_yards_to_goal}}{integer.}
#' \item{\code{lead_yards_to_goal}}{integer.}
#' \item{\code{lead_yards_to_goal2}}{integer.}
#' \item{\code{lag_down2}}{integer.}
#' \item{\code{lag_down}}{integer.}
#' \item{\code{lead_down}}{integer.}
#' \item{\code{lead_down2}}{integer.}
#' \item{\code{lead_distance}}{integer.}
#' \item{\code{lead_distance2}}{integer.}
#' \item{\code{lead_play_type2}}{character.}
#' \item{\code{lead_play_type3}}{character.}
#' \item{\code{pos_team_timeouts}}{integer.}
#' \item{\code{def_pos_team_timeouts}}{integer.}
#' \item{\code{scoring_play}}{integer.}
#' \item{\code{td_play}}{integer.}
#' \item{\code{touchdown}}{integer.}
#' \item{\code{safety}}{integer.}
#' \item{\code{fumble_vec}}{integer.}
#' \item{\code{kickoff_tb}}{integer.}
#' \item{\code{kickoff_onside}}{integer.}
#' \item{\code{kickoff_oob}}{integer.}
#' \item{\code{kickoff_fair_catch}}{integer.}
#' \item{\code{kickoff_downed}}{integer.}
#' \item{\code{kick_play}}{integer.}
#' \item{\code{kickoff_safety}}{integer.}
#' \item{\code{punt}}{integer.}
#' \item{\code{punt_play}}{integer.}
#' \item{\code{punt_tb}}{integer.}
#' \item{\code{punt_oob}}{integer.}
#' \item{\code{punt_fair_catch}}{integer.}
#' \item{\code{punt_downed}}{integer.}
#' \item{\code{punt_safety}}{integer.}
#' \item{\code{penalty_safety}}{integer.}
#' \item{\code{punt_blocked}}{integer.}
#' \item{\code{rush}}{integer.}
#' \item{\code{pass}}{integer.}
#' \item{\code{sack_vec}}{integer.}
#' \item{\code{sack}}{integer.}
#' \item{\code{int}}{integer.}
#' \item{\code{int_td}}{integer.}
#' \item{\code{completion}}{integer.}
#' \item{\code{pass_attempt}}{integer.}
#' \item{\code{target}}{integer.}
#' \item{\code{pass_td}}{integer.}
#' \item{\code{rush_td}}{integer.}
#' \item{\code{turnover_vec}}{integer.}
#' \item{\code{fg_inds}}{integer.}
#' \item{\code{fg_made}}{logical.}
#' \item{\code{lag_change_of_poss}}{integer.}
#' \item{\code{lag_change_of_pos_team}}{integer.}
#' \item{\code{lag_kickoff_play}}{integer.}
#' \item{\code{lag_punt}}{integer.}
#' \item{\code{lag_scoring_play}}{integer.}
#' \item{\code{lag_turnover_vec}}{integer.}
#' \item{\code{lag_downs_turnover}}{integer.}
#' \item{\code{drive_numbers}}{integer.}
#' \item{\code{number_of_drives}}{integer.}
#' \item{\code{pts_scored}}{integer.}
#' \item{\code{drive_result_detailed_flag}}{character.}
#' \item{\code{drive_result2}}{character.}
#' \item{\code{drive_num}}{integer.}
#' \item{\code{lag_drive_result_detailed}}{character.}
#' \item{\code{lead_drive_result_detailed}}{character.}
#' \item{\code{lag_new_drive_pts}}{integer.}
#' \item{\code{id_drive}}{character.}
#' \item{\code{new_id}}{integer.}
#' \item{\code{log_ydstogo}}{double.}
#' \item{\code{yds_int_return}}{integer.}
#' \item{\code{sack_players}}{character.}
#' \item{\code{turnover_indicator}}{integer.}
#' \item{\code{first_by_penalty}}{integer.}
#' \item{\code{first_by_yards}}{integer.}
#' \item{\code{missing_yard_flag}}{logical.}
#' \item{\code{pos_score_diff_start_end}}{integer.}
#' \item{\code{No_Score_after}}{double.}
#' \item{\code{FG_after}}{double.}
#' \item{\code{Opp_FG_after}}{double.}
#' \item{\code{Opp_Safety_after}}{double.}
#' \item{\code{Opp_TD_after}}{double.}
#' \item{\code{Safety_after}}{double.}
#' \item{\code{TD_after}}{double.}
#' \item{\code{lag_ep_after}}{double.}
#' \item{\code{lag_ep_after2}}{double.}
#' \item{\code{lag_ep_after3}}{double.}
#' \item{\code{lead_ep_after}}{double.}
#' \item{\code{lead_ep_after2}}{double.}
#' \item{\code{No_Score_before}}{double.}
#' \item{\code{FG_before}}{double.}
#' \item{\code{Opp_FG_before}}{double.}
#' \item{\code{Opp_Safety_before}}{double.}
#' \item{\code{Opp_TD_before}}{double.}
#' \item{\code{Safety_before}}{double.}
#' \item{\code{TD_before}}{double.}
#' \item{\code{fg_make_prob}}{double.}
#' \item{\code{lag_ep_before3}}{double.}
#' \item{\code{lag_ep_before2}}{double.}
#' \item{\code{lag_ep_before}}{double.}
#' \item{\code{lead_ep_before}}{double.}
#' \item{\code{lead_ep_before2}}{double.}
#' \item{\code{adj_TimeSecsRem}}{integer.}
#' \item{\code{turnover_vec_lag}}{integer.}
#' \item{\code{lag_defense_score_play}}{integer.}
#' \item{\code{play_after_turnover}}{integer.}
#' \item{\code{home_EPA}}{double.}
#' \item{\code{away_EPA}}{double.}
#' \item{\code{home_EPA_rush}}{double.}
#' \item{\code{away_EPA_rush}}{double.}
#' \item{\code{home_EPA_pass}}{double.}
#' \item{\code{away_EPA_pass}}{double.}
#' \item{\code{total_home_EPA}}{double.}
#' \item{\code{total_away_EPA}}{double.}
#' \item{\code{total_home_EPA_rush}}{double.}
#' \item{\code{total_away_EPA_rush}}{double.}
#' \item{\code{total_home_EPA_pass}}{double.}
#' \item{\code{total_away_EPA_pass}}{double.}
#' \item{\code{net_home_EPA_rush}}{logical.}
#' \item{\code{net_home_EPA_pass}}{logical.}
#' \item{\code{net_away_EPA_rush}}{logical.}
#' \item{\code{net_away_EPA_pass}}{logical.}
#' \item{\code{middle_8}}{logical.}
#' \item{\code{rz_play}}{integer.}
#' \item{\code{scoring_opp}}{integer.}
#' \item{\code{stuffed_run}}{integer.}
#' \item{\code{success}}{integer.}
#' \item{\code{epa_success}}{integer.}
#' \item{\code{spread}}{double.}
#' \item{\code{formatted_spread}}{character.}
#' \item{\code{def_wp_before}}{double.}
#' \item{\code{lead_wp_before2}}{double.}
#' \item{\code{wpa_half_end}}{double.}
#' \item{\code{def_wp_after}}{double.}
#' \item{\code{season}}{integer.}
#' \item{\code{opponent}}{character.}
#' \item{\code{team_score}}{integer.}
#' \item{\code{opponent_score}}{integer.}
#' \item{\code{reception_player_id}}{integer.}
#' \item{\code{reception_player}}{character.}
#' \item{\code{reception_yds}}{integer.}
#' \item{\code{completion_player_id}}{integer.}
#' \item{\code{completion_player}}{character.}
#' \item{\code{completion_yds}}{integer.}
#' \item{\code{rush_player_id}}{integer.}
#' \item{\code{rush_player}}{character.}
#' \item{\code{rush_yds}}{integer.}
#' \item{\code{interception_player_id}}{integer.}
#' \item{\code{interception_player}}{character.}
#' \item{\code{interception_stat}}{integer.}
#' \item{\code{interception_thrown_player_id}}{integer.}
#' \item{\code{interception_thrown_player}}{character.}
#' \item{\code{interception_thrown_stat}}{integer.}
#' \item{\code{touchdown_player_id}}{integer.}
#' \item{\code{touchdown_player}}{character.}
#' \item{\code{touchdown_stat}}{integer.}
#' \item{\code{incompletion_player_id}}{integer.}
#' \item{\code{incompletion_player}}{character.}
#' \item{\code{incompletion_stat}}{integer.}
#' \item{\code{target_player_id}}{integer.}
#' \item{\code{target_player}}{character.}
#' \item{\code{target_stat}}{integer.}
#' \item{\code{fumble_recovered_player_id}}{integer.}
#' \item{\code{fumble_recovered_player}}{character.}
#' \item{\code{fumble_recovered_stat}}{integer.}
#' \item{\code{fumble_forced_player_id}}{integer.}
#' \item{\code{fumble_forced_player}}{character.}
#' \item{\code{fumble_forced_stat}}{integer.}
#' \item{\code{fumble_player_id}}{integer.}
#' \item{\code{fumble_player}}{character.}
#' \item{\code{fumble_stat}}{integer.}
#' \item{\code{sack_player_id}}{integer.}
#' \item{\code{sack_player}}{character.}
#' \item{\code{sack_stat}}{integer.}
#' \item{\code{sack_taken_player_id}}{integer.}
#' \item{\code{sack_taken_player}}{character.}
#' \item{\code{sack_taken_stat}}{integer.}
#' \item{\code{pass_breakup_player_id}}{integer.}
#' \item{\code{pass_breakup_player}}{character.}
#' \item{\code{pass_breakup_stat}}{integer.}
#' \item{\code{play_id}}{logical.}
#' \item{\code{position_reception}}{character.}
#' \item{\code{position_target}}{character.}
#' \item{\code{position_completion}}{character.}
#' \item{\code{position_incompletion}}{character.}
#' \item{\code{position_sack_taken}}{character.}
#' \item{\code{position_sack}}{character.}
#' \item{\code{position_interception_thrown}}{character.}
#' \item{\code{position_interception}}{character.}
#' \item{\code{position_fumble}}{character.}
#' \item{\code{position_fumble_forced}}{character.}
#' \item{\code{position_fumble_recovered}}{character.}
#' \item{\code{position_pass_breakup}}{character.}
#' \item{\code{position_rush}}{character.}
#' \item{\code{position_touchdown}}{character.}
#' }