Major Changes
- Added new function
calculate_stats()
that combines the output of allcalculate_player_stats*()
functions with a more robust and faster approach. Thecalculate_player_stats*()
function will be deprecated in a future release. (#470) - Added new exported dataframe
nfl_stats_variables
. It lists and explains all variables returned bycalculate_stats()
. A searchable table is available at https://www.nflfastr.com/articles/stats_variables.html. (#470)
Bug Fixes and Minor Changes
- Drop
{crayon}
,{DT}
,{httr}
,{jsonlite}
,{qs}
dependencies. (#453) - The function
calculate_player_stats_def
now returnsseason_type
if argumentweekly
is set toTRUE
for consistency with the other player stats functions. (#455) - The function
missing_raw_pbp()
now allows filtering by season. (#457) - More robust handling of player IDs in
decode_player_ids()
. (#458) - Fixed rare cases where the value of the
yrdln
variable didn't equal"MID 50"
at midfield. (#459) - 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 wasFALSE
in actual goal to go situations. (#460) - Fixed a bug in
fixed_drive
andfixed_drive_result
where the second weather delay in2023_13_ARI_PIT
wasn't identified correctly. (#461) punter_player_id
, andpunter_player_name
are filled for blocked punt attempts. (#463)- Fixed an issue affecting scores of 2022 games involving a return touchdown (#466)
- Added identification of scrambles from 1999 through 2004 with thank to Aaron Schatz (#468, #489)
- Updated the dataframe
stat_ids
with some IDs that were previously missing. (#470) - nflfastR tried to fix bugs in the underlying pbp data of JAX home games prior to the 2016 season. An update of the raw pbp data resolved those bugs so nflfastR needs to remove the hard coded adjustments. This means that nflfastR <= v4.6.1 will return incorrect pbp data for all Jacksonville home games prior to the 2016 season! (#478)
- Fixed a problem where
clean_pbp()
returnedpass = 1
in actual rush plays in very rare cases. (#479) - Removed extra lines for injury timeouts that were breaking
fixed_drive
(#482) - The variable
penalty_type
now correctly lists the penalty "Kickoff Short of Landing Zone" introduced in the 2024 season. (#486) - Fixed a bug where
ep
was incorrect on PAT attempts preceded by a timeout and then a penalty (extremely rare). This bug also caused the variablestotal_home_epa
andtotal_away_epa
to be incorrect for all subsequent plays in the same game. (#493)
Thank you to
@ahmed-cheema, @andrewtek, @guga31bb, @isaactpetersen, @JoeMarino2021, @john-b-edwards, @marcusSasser, @mlounsberry, @morganandrew, @mrcaseb, @mscoop16, @parsnipz, @rjthompson2, and @Useight for their questions, feedback, and contributions towards this release.