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

score fix 2022 #467

Merged
merged 2 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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))){
guga31bb marked this conversation as resolved.
Show resolved Hide resolved
# 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
Loading