-
Notifications
You must be signed in to change notification settings - Fork 3
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
Incorrect season-weeks in nflreadr::load_depth_charts(seasons = TRUE)
#80
Comments
A bunch of good flags in here, I'll try to tackle them point by point.
The NFL had only 31 teams in 2001, so it's expected that
Looks like there's some inconsistency with how the NFL reports depth charts in the postseason. Sometimes they'll provide depth charts for the bye week before the super bowl, other times they won't (like they do for 2002-2006, 2014). Because there's not a game those weeks (and hence
The NFL API has these for all teams for some reason. While it is weird, I'm not sure it's a significant issue that they're in there, and in the interest of keeping data and making it available rather than dropping it, I'm going to leave them in there.
The NFL has not provided postseason depth charts for the 2005 season. This is an issue on the NFL's end, not with the existing depth charts code.
Definitely unusual, not sure why the NFL provides a week 18/19 for these seasons (and moreso why it's not provided for 2014). I'm going to keep these in the dataset as With these changes, I think that for each |
Everything looks aligned, aside from the aforementioned 2005 playoffs: nflreadr::load_schedules(2001:2023) |>
dplyr::distinct(season, week, game_type) |>
dplyr::left_join(
nflreadr::load_depth_charts(2001:2023) |>
dplyr::distinct(season, week, game_type) |>
dplyr::mutate(dc_exists = 1),
by=c("season","week","game_type")
) |>
dplyr::filter(is.na(dc_exists))
#> ── nflverse games and schedules ────────────────────────────────────────────────
#> ℹ Data updated: 2024-08-04 15:44:30 PDT
#> # A tibble: 4 × 4
#> season week game_type dc_exists
#> <int> <int> <chr> <dbl>
#> 1 2005 18 WC NA
#> 2 2005 19 DIV NA
#> 3 2005 20 CON NA
#> 4 2005 21 SB NA |
Is there an existing issue for this?
Have you installed the latest development version of the package(s) in question?
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
In 2001, week 5 and game_type = POST returns data for 31/32 teams, haven't checked which team is missing. Then, starting in 2007 with NE/NYG, week 5 and game_type = POST is the super bowl team's depth charts (i.e. all the way through 2023 where both SF/KC are charted this way, except 2014 seems to be without this bug).
In addition, the season weeks are just weird:
Reprex
Created on 2024-04-17 with reprex v2.1.0
Screenshots
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: