Skip to content

Commit

Permalink
score fix 2022
Browse files Browse the repository at this point in the history
  • Loading branch information
guga31bb committed May 6, 2024
1 parent b05711c commit 2ea4c88
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 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.9008
Version: 4.6.1.9009
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 @@ -10,6 +10,7 @@
- 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)
- `punter_player_id`, and `punter_player_name` are filled for blocked punt attempts. (#463)
- Fixed an issue affecting scores of 2022 games involving a return touchdown (#466)

# nflfastR 4.6.1

Expand Down
4 changes: 2 additions & 2 deletions R/helper_scrape_nfl.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ get_pbp_nfl <- function(id,
...) {

#testing
#id = '2019_01_GB_CHI'
#id = '2022_01_PHI_DET'
# id = '2015_01_CAR_JAX'
#id = '2011_01_NO_GB'

Expand Down Expand Up @@ -384,7 +384,7 @@ fix_posteams <- function(pbp){
#
# We adjust both things here, but only for 2023ff to avoid backwards compatibility problems
# We need the variable pre_play_by_play which usually looks like "KC 1-10 NYJ 40"
if (any(pbp$season >= 2023) && ("pre_play_by_play" %in% names(pbp))){
if (any(pbp$season >= 2022) && ("pre_play_by_play" %in% names(pbp))){
# Let's be as explicit as possible about what we want to extract from the string
# It's really only the first valid team abbreviation followed by a blank space
valid_team_abbrs <- paste(nflfastR::teams_colors_logos$team_abbr, collapse = " |")
Expand Down

0 comments on commit 2ea4c88

Please sign in to comment.