maksimhorowitz / nflscrapR

R Package for Scraping and Aggregating NFL Data
528 stars 138 forks source link

Division of EPA inaccurate on passes with accepted penalty #156

Open z-feldman opened 4 years ago

z-feldman commented 4 years ago

It looks like on complete passes that also have a penalty accepted, the air_epa is being calculated on the air yards and the penalty yards which is then

For example: game_id = 2010103110, play_id = 3427, Matt Hasselbeck passes to Justin Forsett on 3rd and 11 for 1 air yard, there is a penalty for 18 yards. The air_epa on the play is 3.31 despite just one air yard on 3rd and 11.

ryurko commented 4 years ago

Thanks for posting, the value for air EPA / WPA has now been fixed with pull request #163 - but the penalty yardage is currently attributed to yac EPA / WPA. This should be separated as well but will likely come from a later update so this issue will remain open.