nflfastR 5.0.0
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_defnow returnsseason_typeif argumentweeklyis set toTRUEfor 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
yrdlnvariable didn't equal"MID 50"at midfield. (#459) - Fixed rare cases where
drive_start_yard_linemissed 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_govariable wasFALSEin actual goal to go situations. (#460) - Fixed a bug in
fixed_driveandfixed_drive_resultwhere the second weather delay in2023_13_ARI_PITwasn't identified correctly. (#461) punter_player_id, andpunter_player_nameare 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_idswith 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 = 1in actual rush plays in very rare cases. (#479) - Removed extra lines for injury timeouts that were breaking
fixed_drive(#482) - The variable
penalty_typenow correctly lists the penalty "Kickoff Short of Landing Zone" introduced in the 2024 season. (#486) - Fixed a bug where
epwas incorrect on PAT attempts preceded by a timeout and then a penalty (extremely rare). This bug also caused the variablestotal_home_epaandtotal_away_epato 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.