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] Incorrect Stadiums for 2023 Foreign Games #58

Open
2 tasks done
KingXiaoDi opened this issue Nov 5, 2024 · 0 comments
Open
2 tasks done

[BUG] Incorrect Stadiums for 2023 Foreign Games #58

KingXiaoDi opened this issue Nov 5, 2024 · 0 comments

Comments

@KingXiaoDi
Copy link

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 am not using an nflverse R package (nflreadr, nflfastR) to access this data.

What version of the package do you have?

I download the .rds directly from Releases

Describe the bug

The file play_by_play_2023.rds has the incorrect game_stadium for the 5 foreign games. Each game lists the stadium of the home team rather than the appropriate foreign venue. I have not checked the other files types to determine if issue exists for those files as well. I also do not use the nflverse R package (I download the files directly from Releases), so I cannot comment on whether this issue arises there.

The 5 games in question and (what I believe to be) the appropriate game_stadium:

Week game_id home_team away_team game_stadium (in file) correct_game_stadium
4 2023_04_ATL_JAX JAX ATL TIAA Bank Stadium Wembley Stadium
5 2023_05_JAX_BUF BUF JAX New Era Field Tottenham Stadium
6 2023_06_BAL_TEN TEN BAL Nissan Stadium Tottenham Stadium
9 2023_09_MIA_KC KC MIA GEHA Field at Arrowhead Stadium Frankfurt Stadium
10 2023_10_IND_NE IND NE Gillette Stadium Frankfurt Stadium

Reprex

read_rds(play_by_play_2023.rds) %>%
      filter(game_id %in% c('2023_04_ATL_JAX',
                            '2023_05_JAX_BUF',
                            '2023_06_BAL_TEN',
                            '2023_09_MIA_KC',
                            '2023_10_IND_NE')) %>% 
       distinct(date, game_id, home_team, away_team, week, game_stadium)

Expected Behavior

The file play_by_play_2023.rds should display the appropriate game_stadium for these 5 foreign games.

I believe the following code would correct the issue:

read_rds(play_by_play_2023.rds) %>%
     mutate(game_stadium = case_when(game_id %in% c('2023_05_JAX_BUF', '2023_06_BAL_TEN')~'Tottenham Stadium',
                                     game_id == '2023_04_ATL_JAX'~'Wembley Stadium',
                                     game_id %in% c('2023_09_MIA_KC','2023_10_IND_NE')~'Frankfurt Stadium',
                                     TRUE~game_stadium))

nflverse_sitrep

NA

Screenshots

No response

Additional context

No response

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

1 participant