-
Notifications
You must be signed in to change notification settings - Fork 51
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
[BUG] nflfastr::calculate_player_stats returns duplicate rows for defense and kicker #476
Comments
Relocating to nflfastR repo |
Looking at the problematic defense data. CORRECTION: I think we assign tackles after turnovers to the wrong team So the main thing might be that an offensive player scores a defensive stat after the offense turned over the ball |
This might be quite hard to fix and we should probably invest the time in #470 instead |
We will deprecate |
Is there an existing issue for this?
If this is a data issue, have you tried clearing your nflverse cache?
I have cleared my nflverse cache and the issue persists.
What version of the package do you have?
nflreadr
1.4.1Describe the bug
There are duplicated combinations of
player_id
-season
-week
combinations in the player stats database (from theload_player_stats()
function). I cannot think of a reason why the same player would have multiple rows for a given season and week combination. If (as I suspect), this is not possible, then this would be a data issue to fix. If I'm incorrect and it is plausible that the same player could have multiple rows for a given season and week combination, then it would be helpful to know the circumstances when this could arise. This is important for merging with other datasets to ensure I am merging the information to the correctplayer_id
-season
-week
combination.Reprex
Created on 2024-07-31 with reprex v2.1.1
Expected Behavior
I expect each player (i.e.,
player_id
) to have only one row for a givenseason
-week
combination.nflverse_sitrep
Screenshots
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: