From 340a2bedca04a37705b38bd00eacb81d48ccc3ba Mon Sep 17 00:00:00 2001 From: Dennis Brookner Date: Sun, 8 Sep 2024 18:26:29 -0400 Subject: [PATCH] Update tableworkflow.R for 2024 --- tables/tableworkflow.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tables/tableworkflow.R b/tables/tableworkflow.R index 3f5bc01..ec36c62 100644 --- a/tables/tableworkflow.R +++ b/tables/tableworkflow.R @@ -30,14 +30,14 @@ pbp <- tbl(connection, "nflfastR_pbp") punts <- pbp %>% filter(punt_attempt==1) %>% - filter(season %in% 2021:2023) %>% + filter(season %in% 2022:2024) %>% collect() %>% trust_the_process() %>% filter(punt_blocked==0) punts <- punts %>% calculate_all() %>% - filter(season == 2023) + filter(season == 2024) dbDisconnect(connection) @@ -74,8 +74,8 @@ ggplot(data=mini, aes(x = reorder(punter_player_name, pEPA), y = pEPA)) + coord_flip() + scale_fill_identity() + theme_bw() + - labs(title = "Punter EPA in 2023", subtitle = glue("Minimum {current_threshold} punts"), - y="Punter EPA/p above expected", x="Punters in 2023", + labs(title = "Punter EPA in 2024", subtitle = glue("Minimum {current_threshold} punts"), + y="Punter EPA/p above expected", x="Punters in 2024", caption=glue("figure @ThePuntRunts | data @nflfastR | updated {now('America/New_York')}")) + theme(plot.margin=unit(c(0.5,0.5,0.5,0.5),"cm")) + theme(plot.title = element_text(hjust = 0.5), plot.subtitle = element_text(hjust = 0.5))