Description Usage Arguments Details
View source: R/cleaning_functions.R
Prepare a week of data from the 2021 Big Data Bowl (data from 2018 season). To use this, you'll need to have the BDB data saved and unzipped somewhere in a directory on your computer.
1 2 3 4 5 6 7 8 | prepare_bdb_week(
week,
dir = "../nfl-big-data-bowl-2021/input",
trim_frame = 25,
frames_after_throw = 10,
keep_frames = NULL,
drop_positions = c("QB")
)
|
week |
Get and prepare this week of data (1-17) |
dir |
Location of directory where BDB data lives. Default is unzipped to adjacent directory (default = "../nfl-big-data-bowl-2021/input") |
trim_frame |
If a throw, sack, etc happens before this frame, drop the play (default = 25; i.e. before 1.5 seconds into the play). |
frames_after_throw |
If a frame happened more than this many frames after throw, drop the frame. |
keep_frames |
Keep these frames. Default: NULL (ie keep all frames). |
drop_positions |
Drop these positions from the returned data (default = "QB"). |
Loads raw .csvs from 2021 BDB, cleans, rotates, applies frame trimming, calculates orientation to QB, drops plays without at least 3 offensive and defensive players.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.