Functions to Efficiently Access NFL Play by Play Data
Overview
A set of functions to access National Football League play-by-play data from https://www.nfl.com/.
New
- Added new function
update_pbp_db(), a fresh approach to the database helper. (#544)
Breaking changes and deprecation
- nflfastR stopped supporting the 1999 and 2000 seasons because of inconsistent data sources. Data is still available through
load_pbp()but we will not fix any issues related to those old seasons anymore. It's possible to install nflfastR v5.2.0 (withpak::pak("nflverse/nflfastR@v5.2.0")) to parse those seasons if necessary. (#568) - nflfastR now loads raw play-by-play data from season based releases in the
nflverse/nflverse-pbpGitHub repository. The legacy repositorynflverse/nflfastR-rawis deprecated and won't update in future seasons. This means that previous nflfastR versions won't be able to download 2026+ seasons! (#589) - The legacy player stats functions
calculate_player_stats*()have been deprecated in 2024 with the release of nflfastR 5.0. They are now defunct and calling them will throw an error. (#590)
Minor changes and improvements
- Added
"game_id"to the outputcalculate_stats()ifsummary_level == "week". (#566) - Fixed a bug where
fixed_drivedid not increment after a muffed blocked field goal attempt. Yes this happened in"2025_10_NO_CAR", play id 2504. (#567) - Implemented a fresh approach to compute
play_typebased onplay_type_nflfor faster and more consistent output. (#568) - Fixed a bug where nflfastR overwrote the kickoff_attempt variable in the event of a penalty on a kickoff. (#569)
- Added various definitions of 'explosive' plays to the output of
calculate_stats(). It counts passes, runs, and receptions with 10+, 20+, 40+ yards gained as well as 12+ yard runs and 16+ yard passes. (#573)
Show all changes in 6.0.0Hide the rest of the changes in 6.0.0
- Added several punting stats to the output of
calculate_stats(). (#574) - Added overall fumble counters to the output of
calculate_stats()because it was missing some edge case fumbles on offense. (#575) - The
play_typevariable now possibly shows"pass"or"run"on 2 point conversion plays with a post-snap penalty enforced between downs. This is different fromplay_type_nfl(which will show"PENALTY"in these cases). (#579) - Fixed bug where
calculate_stats()counted fumble recoveries infumble_recovery_yards_ownandfumble_recovery_yards_oppinstead of the corresponding yards. (#584) - Fixed bug where
calculate_stats()counted some blocked punts as punt attempts that officially do not count as punt attempts. (#584) - Fixed bug where
calculate_stats()overcounted first downs in some edge cases. (#587) - Updated
teams_colors_logosafter 2026 Titans and Rams rebrandings. (#592) - Added defensive blocked kicks and 2 point attempts to the output of
calculate_stats(). (#596) - Fixed bug that led to missing pbp related team stats in
calculate_stats()because an internal function did not standardize team abbreviations. (#599)
Thank you to @jdpretorius123, @JoeMarino2021, @lancejames35, @mrcaseb, @naymikm, @rayrosales66, and @TheMathNinja for their questions, feedback, and contributions towards this release.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 28 (8 internal)includes a package overview page
- Examples that run
- 0%21 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 74%
- Documented parameters
- 93%
- Return-value docs
- 83%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 93%
- Median days to close, 50 most recently updated closed issues
- 6
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
Commit identities over time
16 development-tooling and community-health practices detected across 8 families in the upstream repository
Checks run against github.com/nflverse/nflfastr on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-09-19 · The repository has a site deploy workflow
pkgdown site last built 2026-09-19
Show all practicesHide 4 practices
Dependencies
Installing nflfastR adds 42 packages (23 with compiled code, 47 MB of source tarballs). Heaviest: fastrmodels 16 MB, stringi 11 MB, data.table 5.7 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 6.0.0Latest
- RR 4.6.0 released · 2026-04-24
- 5.2.0
- 5.1.02025-05-14 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 5.0.0
- RR 4.4.0 released · 2024-04-24
- 4.6.12024-01-10 · diff ↗
- 4.6.0
- RR 4.3.0 released · 2023-04-21
- 4.5.12022-12-22 · diff ↗
- 4.5.02022-11-05 · diff ↗ ·
added 4 exports
calculate_player_stats_def, calculate_player_stats_kicking, calculate_series_conversion_rates, nflverse_sitrep - 4.4.0
- RR 4.2.0 released · 2022-04-22
- 4.3.0
- 4.2.02021-08-03 · diff ↗
Show 8 earlier eventsHide 8 earlier events
- RR 4.1.0 released · 2021-05-18
- 4.1.0
- 4.0.0
- 3.2.02020-11-20 · diff ↗
- 3.1.1
- 3.0.0
- 2.2.12020-09-01
- RR 4.0.0 released · 2020-04-24
Package metadata
- First published
- 2020-09-01
- Total releases
- 17 / 6 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 18 KB / 4 files
- Download size
- 1.1 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("nflfastR")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-19, which the citation names so these numbers can be found later. More on citing and the projects behind them.