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

Clarify weeks in depth charts #26

Closed
mrcaseb opened this issue Jan 12, 2022 · 4 comments · Fixed by #42
Closed

Clarify weeks in depth charts #26

mrcaseb opened this issue Jan 12, 2022 · 4 comments · Fixed by #42

Comments

@mrcaseb
Copy link
Member

mrcaseb commented Jan 12, 2022

This problem has been discussed here first nflverse/nflreadr#78

I wrote some code to look at this and I think its a bit inconsistent

  • week 18 is missing for <2006
  • postseason is missing for 2005
  • SB is week 22 for 2004, 2006, 2014
  • week 20 mostly > week 19
library(dplyr, warn.conflicts = FALSE)
library(ggplot2)

df <- nflreadr::load_depth_charts(TRUE)

df |> 
  group_by(season, week, team) |> 
  summarise() |> 
  ungroup() |> 
  count(season, week) |> 
  mutate(alpha = ifelse(n == 32, 0.2, 1)) |> 
  ggplot(aes(x = season, y = week)) +
  geom_text(aes(label = n, alpha = alpha), size = 3) +
  scale_alpha_identity() +
  scale_y_continuous(breaks = scales::breaks_pretty(n = 10)) +
  theme_minimal()

@mrcaseb
Copy link
Member Author

mrcaseb commented Jan 12, 2022

@mrcaseb mrcaseb changed the title Clarify weeks inconsistent in depth charts Clarify weeks in depth charts Jan 12, 2022
@john-b-edwards
Copy link
Contributor

Me unmasking who wrote the code that caused this issue in the first place:

tanho63 added a commit that referenced this issue Jan 15, 2022
* fixing postseason DC issue #26

* Automated roster updates Thu Jan 13 07:19:05 UTC 2022

* Automated depth chart updates Thu Jan 13 07:22:20 UTC 2022

* Automated roster updates Fri Jan 14 07:18:47 UTC 2022

* Automated depth chart updates Fri Jan 14 07:21:44 UTC 2022

* Automated roster updates Sat Jan 15 07:17:53 UTC 2022

* Automated depth chart updates Sat Jan 15 07:21:31 UTC 2022

* fixing issue where postseason injuries broke update-injuries script

weeks now represented correctly in historical injury data additionally

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Tan Ho <38083823+tanho63@users.noreply.github.com>
@tanho63
Copy link
Member

tanho63 commented Jan 15, 2022

I think that looks better but we'll see when it runs a few more

@john-b-edwards
Copy link
Contributor

Will try to hit this tonight or tomorrow and make sure this is 100% fixed

tanho63 added a commit that referenced this issue Aug 9, 2022
* fixing postseason DC issue #26

* Automated roster updates Thu Jan 13 07:19:05 UTC 2022

* Automated depth chart updates Thu Jan 13 07:22:20 UTC 2022

* Automated roster updates Fri Jan 14 07:18:47 UTC 2022

* Automated depth chart updates Fri Jan 14 07:21:44 UTC 2022

* Automated roster updates Sat Jan 15 07:17:53 UTC 2022

* Automated depth chart updates Sat Jan 15 07:21:31 UTC 2022

* fixing issue where postseason injuries broke update-injuries script

weeks now represented correctly in historical injury data additionally

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Tan Ho <38083823+tanho63@users.noreply.github.com>
tanho63 pushed a commit that referenced this issue Aug 9, 2022
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

Successfully merging a pull request may close this issue.

3 participants