ryurko / nflscrapR-data

Data files (.csv) accessed with nflscrapR and summarized at the player-level
https://ryurko.github.io/nflscrapR-data/
373 stars 204 forks source link

"Set-of-Downs" ID or "Series" ID #27

Open Adam23ant opened 4 years ago

Adam23ant commented 4 years ago

Would be great if a "Set-of-Downs" or "Series" ID could be included to identify when a new set of downs begins. Maybe a sequential number similar to "Drive".

ksulli10 commented 4 years ago

Lee Sharpe created this. Here is a link to my slightly modified version.

Essentially, assuming you have a play-by-play data frame called "pbp_2019" you can use the function like:

add_series_success(2019)

And it will add two columns to your pbp data frame. One is the series ID and the second is whether or not that series was successful (1D, TD, FG.)