-
Notifications
You must be signed in to change notification settings - Fork 65
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
something odd with WPA #36
Comments
Here is some more efficient code to reproduce this pbp %>%
filter(game_id == "2009_18_GB_ARI", !is.na(home_wp_post)) %>%
select(game_id, play_id, play_type, desc, home_team, posteam, wp, home_wp, wpa, home_wp_post) %>%
mutate(
wp_diff1 = abs(wpa),
wp_diff2 = abs(home_wp_post - lag(home_wp_post))
) %>%
filter(wp_diff2 != wp_diff1) output
The 4108 play appears to have switched Any insights @guga31bb ? |
This is the equivalent part in nflscrapR and I guess we must have modified it at some point, though I can't remember why. I personally have never used home_wp_post or WPA so I'm surprised we bothered to modify nflscrapR here- there must have been some bug addressed at some point? |
finally found the commit but it's not really informative lol It's line 766-769 in that commit |
That commit was mostly me just copy and pasting nflscrapR's part. But it's weird because it doesn't look identical to nflscrapR in that section |
I compared the diff of two plays' home_wp_post and WPA in the database.
Is WPA suppose to be the diff of two plays' home_wp_post?
Most numbers check out, but some numbers dont make sense.
Why timeOUT has a different home_wp_post?
Here is what i do:
The text was updated successfully, but these errors were encountered: