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

[BUG] Misassigned Fumbles on Play by Play Data #444

Open
2 tasks done
SPNE opened this issue Nov 17, 2023 · 2 comments
Open
2 tasks done

[BUG] Misassigned Fumbles on Play by Play Data #444

SPNE opened this issue Nov 17, 2023 · 2 comments

Comments

@SPNE
Copy link

SPNE commented Nov 17, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Have you installed the latest development version of the package(s) in question?

  • I have installed the latest development version of the package.

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?

‘1.4.0’

Describe the bug

On complex plays, fumbles are miscalculated from the play by play data.

Reprex

pbp <- load_pbp(2023)
weekStats = calculate_player_stats(pbp, weekly = TRUE)
weekStats %>% 
  select(player_display_name, week,rushing_fumbles, rushing_fumbles_lost ) %>% 
  filter(player_display_name == 'Josh Allen' & week == 1) 

pbp %>% 
  filter(game_id == "2023_01_BUF_NYJ" & half_seconds_remaining == 295 & game_half == "Half2") %>% 
  select(desc)

weekStats %>% 
  select(player_display_name, week,rushing_fumbles, rushing_fumbles_lost ) %>% 
  filter(player_display_name == 'Justin Jefferson' & week == 2) 

pbp %>% 
  filter(game_id == "2023_02_MIN_PHI" & half_seconds_remaining == 41 & game_half == "Half1") %>% 
  select(desc)

Expected Behavior

Bills @ Jets Week 1: nflfastr has 1 fumbles and 1 lost fumble instead of expected 2 fumbles and 1 lost fumble
Vikings @ Eagles Week 2: nflfastr has 1 fumble and 0 lost fumbles instead of expected 1 fumble and 1 lost fumbles

nflverse_sitrep

nflfastR	4.6.0	4.6.0	4.6.0.9000	dev
nflplotR	1.2.0	1.2.0	1.2.0.9003	dev
nflreadr	1.4.0	1.4.0	1.4.0.09	dev

Screenshots

No response

Additional context

Jets @ Bill Game:
https://www.nfl.com/games/bills-at-jets-2023-reg-1?active-tab=stats
https://www.espn.com/nfl/playbyplay/_/gameId/401547352

Vikings @ Eagles Game:
https://www.nfl.com/games/vikings-at-eagles-2023-reg-2?active-tab=stats
https://www.espn.com/nfl/boxscore/_/gameId/401547410

@mrcaseb
Copy link
Member

mrcaseb commented Nov 18, 2023

Started looking into this. Here are the stats of the problematic play in the BUF game.
Both, stat ID 53 and 52, trigger fumble = 1
That's not an easy fix. Requires the same setup as the multiple laterals thing

image

@mrcaseb
Copy link
Member

mrcaseb commented Nov 18, 2023

Same problem in the MIN game

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants