Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Punt Yards bug #53

Closed
TheMathNinja opened this issue Jul 19, 2020 · 8 comments · Fixed by #120 or #421
Closed

Punt Yards bug #53

TheMathNinja opened this issue Jul 19, 2020 · 8 comments · Fixed by #120 or #421
Labels
bug Something isn't working

Comments

@TheMathNinja
Copy link
Contributor

I'm noticing that kick_distance, which generally fills in for Punt Yards on punts, is NA on Touchback plays. But this should be showing the distance of the punt still, not NA.

This might apply to any time a punt was kicked into the end zone, as for these punts:
2424 | 2019_12_DET_WAS
5456 | 2018_11_KC_LA

I'm not sure if a punt goes from the 50 to the -2 yard line if that's a 50 or 52 yard punt in the NFL's books, but I think kick_distance should be consistent with whatever NFL counts as "punt yards" on the play.

@TheMathNinja
Copy link
Contributor Author

I also see that kick_distance is NA on blocked punts, but I'd like to advocate for kick_distance to be 0 on blocked punts, since punt_attempt == 1, there actually was a "kick" on the play.

@TheMathNinja
Copy link
Contributor Author

Found official NFl language on measuring kick_distance for punts here:
"Punts shall be measured from the line of scrimmage to the point at which the impetus of the punt
ends, or the ball goes out of bounds, or is downed. If a punt goes into the end zone, measure its
length to the goal line, unless the ball is fielded and returned out of the end zone by the receiving
team (in such a case, measure the punt to the spot of possession in the end zone by the receiver)."

@TheMathNinja
Copy link
Contributor Author

Found another example of kick_distance == NA on a punt. This play (3267 | 2015_04_DET_SEA) was a muffed return which is also showing NA kick_distance for some reason. I'm thinking as long as punt_attempt == 1, kick_distance should never be NA.

@guga31bb guga31bb linked a pull request Oct 10, 2020 that will close this issue
@guga31bb
Copy link
Member

These were omissions on our part as the stat IDs were present- thank you!

@guga31bb guga31bb self-assigned this Oct 10, 2020
@mrcaseb mrcaseb added the bug Something isn't working label Oct 12, 2020
@mrcaseb
Copy link
Member

mrcaseb commented Jan 12, 2022

The missing kick distance for punts to the end zone has been fixed using stat id 31. However, this stat id is only recorded if the returner exits the end zone. Not for touchbacks.

SuperStat records this stat when the punt is received in the end-zone, and then run out of the end-zone. If the play ends in the end-zone for a touchback, the stat is not recorded. This stat is used exclusively of the PU, PU_TB, and PU_BK stats. THIS STAT DOESN'T MAKE SENSE TO ME BECAUSE IT'S USUALLY CONSIDERED A GOOD PUNT IF THE BALL IS KICKED HIGH ENOUGH TO PREVENT A RETURN. THIS STAT IS UNKNOWN TO ELIAS & THE NFL.

@mrcaseb mrcaseb reopened this Jan 12, 2022
@mrcaseb
Copy link
Member

mrcaseb commented Jan 12, 2022

We could probably use yardline_100 for punts with NA kickdistance

@john-b-edwards
Copy link

This was brought up in the discord tonight, throwing my hat into the ring of something like

kick_distance = if_else(punt_attempt == 1 & punt_blocked == 0, readr::parse_number(stringr::str_extract(desc, "punts ([0-9])+ yards")), kick_distance)

?

dislike using regex but if it's not recorded for the specific stat ID's I'm unsure what to use otherwise

@mrcaseb
Copy link
Member

mrcaseb commented Aug 31, 2023

For future reference: final fix of this issue happened in #422 by using the corresponding stat IDs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants