Skip to content

Commit

Permalink
injury update line removal
Browse files Browse the repository at this point in the history
  • Loading branch information
guga31bb authored and mrcaseb committed Sep 6, 2024
1 parent 2ce7968 commit 305922f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: nflfastR
Title: Functions to Efficiently Access NFL Play by Play Data
Version: 4.6.1.9013
Version: 4.6.1.9014
Authors@R:
c(person(given = "Sebastian",
family = "Carl",
Expand Down
5 changes: 5 additions & 0 deletions R/helper_scrape_nfl.R
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ get_pbp_nfl <- function(id,
dplyr::filter(
!(is.na(.data$timeout_team) & stringr::str_detect(tolower(.data$play_description), "timeout at|two-minute"))
) %>%
# Data in 2024 pbp introduced separate "plays" for injury updates
# These mess up some of our logic. Since they are useless, we remove them here
dplyr::filter(
!(is.na(.data$timeout_team) & stringr::str_detect(tolower(.data$play_description), "\\*\\* injury update:"))
) %>%
fix_posteams()

# fix for games where home_team == away_team and fields are messed up
Expand Down

0 comments on commit 305922f

Please sign in to comment.