Open isaactpetersen opened 3 months ago
Relocating to nflfastR repo
Looking at the problematic defense data. It seems like players get attributed to the opponent team in some cases when they get a fumble recovery or penalty.
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 calculate_player_stats_*()
functions in a future release. The new function calculate_stats()
(https://github.com/nflverse/nflfastR/pull/470 ) will fix the issue
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