Description Usage Arguments Value
View source: R/cleaning_functions.R
Standardize direction and add play information.
1 |
df |
A dataframe of player tracking data obtained from a Big Data Bowl or NGS highlights |
The original data with the columns below appended. Note that all returned columns will have
cleaned names, including the original columns in df
(e.g. play_id rather than playId), to end the tyranny of weird Big Data Bowl
column names.
Values of home team (eg "SEA"), away team (eg "GB"), or "football"
Whether player is on defense (football has 0 here)
Unique play identifier in format "gameid_playid" with gameid old GSIS format. Ex: "2018091000_1101".
Game ID in nflfastR format. Ex: "2018_01_ATL_PHI"
Week of season
Possession team
Home team (e.g. "PHI")
Away team (e.g. "ATL")
Down
Yards to go
Distance from opponent end zone
Quarter
Expected Points Added gained on play from nflfastR
Yards gained on play
Air yards (when applicable)
Play description
Was it a dropback? From nflfastR
Was it a designed rush attempt? From nflfastR
Play type from NFL data. E.g. "PASS", "PENALTY", "RUSH", "SACK", "PUNT", etc.
Primary team color. Useful for play animations
Secondary team color. Useful for play animations
URL of team logo
x location of line of scrimmage (e.g. 20 means own 10 yard line)
Distance of player from line of scirmmage in x direction
Orientation of player in x direction
Orientation of player in y direction
Direction of player in x direction
Direction of player in y direction
Speed of player in x direction
Speed of player in y direction
Acceleration of player in x direction
Acceleration of player in y direction
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.