Skip to content

Commit

Permalink
no kick off if previous play is weather delay (#461)
Browse files Browse the repository at this point in the history
* no kick off if prev play is weather delay

* version and news bullet
  • Loading branch information
mrcaseb authored Mar 7, 2024
1 parent 27ed061 commit efcbef9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
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.9006
Version: 4.6.1.9007
Authors@R:
c(person(given = "Sebastian",
family = "Carl",
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Fixed rare cases where `drive_start_yard_line` missed the blank space between team name and yard line number. (#459)
- Fixed play description in some 1999 and 2000 games where the string "D.Holland" replaced the kick distance. (#459)
- Fixed a problem where the `goal_to_go` variable was `FALSE` in actual goal to go situations. (#460)
- Fixed a bug in `fixed_drive` and `fixed_drive_result` where the second weather delay in `2023_13_ARI_PIT` wasn't identified correctly. (#461)

# nflfastR 4.6.1

Expand Down
2 changes: 1 addition & 1 deletion R/helper_add_nflscrapr_mutations.R
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ add_nflscrapr_mutations <- function(pbp) {
lead_ko = case_when(
dplyr::lead(.data$kickoff_attempt) == 1 &
.data$game_id == dplyr::lead(.data$game_id) &
!stringr::str_detect(tolower(.data$play_description), "(injured sf )|(tonight's attendance )|(injury update )|(end quarter)|(timeout)|( captains:)|( captains )|( captians:)|( humidity:)|(note - )|( deferred)|(game start )") &
!stringr::str_detect(tolower(.data$play_description), "(injured sf )|(tonight's attendance )|(injury update )|(end quarter)|(timeout)|( captains:)|( captains )|( captians:)|( humidity:)|(note - )|( deferred)|(game start )|( game has been suspended)") &
!stringr::str_detect(.data$play_description, "GAME ") &
!.data$play_description %in% c("GAME", "Two-Minute Warning", "The game has resumed.") &
is.na(.data$two_point_conv_result) &
Expand Down

0 comments on commit efcbef9

Please sign in to comment.