clean_team_abbrsnow converts"AZ"to"ARI". (#312)
Small bug fixes and hard deprecation of {qs} support to comply with CRAN issues.
load_teams()now accepts the argumentfile_typeand respects the option"nflreadr.prefer".nflverse_releases()andnflverse_download()now correctly work with tag names to find releases. (#296)- Stopped support of
file_type"qs" and the deprecated the related functionqs_from_url()because the underlying package qs has been removed from CRAN on 2026-01-17. Since the dependency is archivedqs_from_url()will error. Please stop using it and make sure to changeoption(nflreadr.prefer)to one of "parquet", "rds", or "csv". (#303) most_recent_season()(and its aliasesget_latest_season()andget_current_season()) now flip the switch to the new season on Wednesday following Labor Day (used to be Thursday) as NFL announced that the 2026 season will kick off on Wednesday because the TNF game will be played in Australia. (#307)
Thank you to @AbhuTyagi, @gacolitti, @guga31bb, @Ic4ru5Wing, @isaactpetersen, @joeflan, @JoeMarino2021, @joshuafayallen, @mrcaseb, @nromano2, @patrickconners2334-glitch, @tanho63, and @TheMathNinja for their questions, feedback, and contributions towards this release.
This release covers changes released before the start of the 2025 NFL season.
load_players()now loads v2 nflverse players data. This is a breaking change as some variables have been removed or renamed. Please see the data comparison for more details.load_player_stats()now access new player_stats files created bynflfastR::calculate_stats()(#279) and has a few function signature changes:stat_typeargument is deprecated - now returns offense, defense, and kicking player statistics as one file.- gains a new argument
summary_levelso that it can return player stats summarized by week, regular season, postseason, or regular + postseason combined
load_team_stats()added to access new team_stats files created bynflfastR::calculate_stats()(#279)load_depth_charts()now provides depth charts by date (including the preseason), and defaults tomost_recent_season(roster = TRUE), rather thanmost_recent_season(roster = FALSE). Please note that the data structure has changed because the data source had to be changed from NFL Data Exchange to ESPN. (#275, #277)load_participation()is back, somewhat! FTNData.com has graciously offered to provide participation data after each season has ended, so we now have participation data from 2024 and 2023. Please note that this data is licensed under CC-BY-SA 4.0 and should be credited (for 2023 onwards) to FTN Data via nflverse. (#278)- Now requires a minimum R version of 4.1.0, to align with the tidyverse's version support policies.
- nflreadr now exports the variable
nflreadr::nflverse_data_timezonewhich defines the standard timezone across all nflverse data. When printing to the console, nflreadr will convert timestamps to the user local timezone. - Added several player name mappings (#249, #253, #255, #270)
- Added a dictionary to describe what each shorthand roster status indicates (#232)
clean_team_abbrs()now converts"PHO"to"ARI". (#260)- Improved description of next score probability variables in
nflreadr::dictionary_pbp. (#262) .sitrepand all*_sitrepfunctions now redact nflfastR option paths. (#263)clean_team_abbrs()now converts full team names like"Los Angeles Chargers"or team nicknames like"Bills"to corresponding team abbreviations ("LAC"and"BUF"in this example). (#269)get_current_week()now passes arguments on tomost_recent_season(). (#272)
Thank you to @christianlohr9, @Glumdar, @JanCalalo, @john-b-edwards, @johnathan-o-h-napier, @LearnThinkCreate, @marvin3FF, @mrcaseb, @sdb-208, @tcash21, @TheMathNinja, and @wyaruss for their questions, feedback, and contributions towards this release.
This release covers a number of bugfixes and function improvements:
%c%internal helper now usesdata.table::fifelse()to avoid falsely converting dates to integers. (#214)load_schedules()cleans theroofvariable in order to avoid nflverse model issues. (#218)join_coalesce()coerces x/y args to data.frame and will return a data.framemost_recent_season()now internally computes the exact day of the season opener as Thursday after first Monday of September. (#221)load_espn_qbr()no longer supports argumentleaguewhich used to allow loading of College QBR (not in nflverse scope) (#222)- New function
stat_mode(), a re-export from nflfastR, which computes the statistical mode of a vector. (#224) load_ftn_charting()now accepts the argumentfile_type. (#228)clean_team_abbrs()now accepts the "team" name "NFL". (#231)load_participation()now returns additional fieldstime_to_throw,was_pressure,defense_man_zone_type, anddefense_coverage_type(#233, thank you @mistakia @john-b-edwards)clean_player_names()now can transliterate to latin-ascii if the stringi package is available, controlled by theconvert_to_asciiargument.
Thank you to: @arjunmenon10, @engineerchange, @isaactpetersen, @Jeffery-777, @john-b-edwards, @justlikekevin, @mrcaseb, @SCasanova, and @tanho63 for their questions, feedback, and contributions to this release.
This release addresses bugs, improves some utilities, and adds a few new datasets.
load_player_stats(stat_type = "defense")added to provide defensive player stats as computed bynflfastR::calculate_player_stats_def()(#200) It also comes with a data dictionary, courtesy of @mpcen (#192)load_ftn_charting()adds manual charting data for 2022-onwards, graciously provided by FTN Data. This should automatically be updated when published by FTN, and the early indication is that it will be within 48 hours after a game has finished.
nflverse_sitrep()and friends overhauled:- now returns a list of sitrep attributes rather than only printing to console (for programmatic use)
- now checks CRAN and r-universe to tell you if your installation is behind cran or devel
- now handles dependencies for nflverse/ffverse packages that are not on CRAN
nflreadr::most_recent_season()and aliasesget_latest_season,get_current_seasonetc now use March 15th as the changeover for league year. Hopefully this is not a moving target 🙃nflreadr::clean_homeaway()now handles columns with suffixes_homeand_awaynflreadr::nflverse_game_id()now accepts old team abbreviations and outputs useful errors.- Added
.for_cran()to limit parallelization in CRAN examples and tests make_nflverse_data_class()now usesdata.table::setattr()to preserve data.table pointer
- Clarified description of the
"special"variable in the play-by-play data dictionary. (#189)
Thank you to @ak47twq, @alecglen, @andycancapital, @bullaspc, @mcarman8, @mpcen, @mrcaseb, @tanho63, @tashapiro, and @TheMathNinja for their questions, feedback, and contributions to this release.
--
Minor changes per changelist and patch CRAN-related example issue.
.clear_cache()now re-exported without dot prefix asclear_cache(). Hopefully more obvious.join_coalesce()is now added as a utility to join two dataframes and coalesce any shared columns.load_teams()now uses the argumentcurrent(TRUE/FALSE) to standardize which rows are returned - this aligns withnflreadr::clean_team_abbrsandnflreadr::team_abbr_mappingdictionary_participationadded (thank you @josephhero!)clean_homeaway()now preserves neutral site location as well as input class and input attributesload_ff_rankings()URL bug corrected (thank you @kharigardner)- test and example for
clean_homeaway()resolved for CRAN failure
Thank you to @ak47twq, @bachlaw, @brunomioto, @guga31bb, @Josephhero, @kharigardner, @mrcaseb, @MysteryPollster, @numbersinfigures, and @ohri for their questions, feedback, and contributions towards this release.
Fixes CRAN bug and provides some function improvements, most notably improved logic for load_participation()'s pbp join.
- Added
nflverse_game_id()which computes valid nflverse game identifiers in the format"{season}_{week}_{away}_{home}"
load_participation()now joins pbp on vianflverse_game_idinstead ofold_game_idload_snap_counts()now allows download of the 2012 season which was previously hardcoded from 2013 (#128)progressively()now works with purrr-style lambda functions and no longer checks for progressor class, allowing it to be used more flexibly (and with cli-based progress bars.)
nflverse_releases()andnflverse_download()now accept.tokenarguments which default togh::gh_token(). This is mostly to let us test things properly. (#131)- Adjust import references per Jenny Bryan's recommendations in hadley/r-pkgs#828 to avoid loading unused packages.
clean_player_names()now fully lives in nflreadr, the squish/trim happens first- player name mapping update
get_current_season()now exists, because we can't agree on what to name things.
Thank you to @atungate, @grayhawk40, @guga31bb,@jestarr, @john-b-edwards,@marvin3FF,@mrcaseb, @SCasanova, @shirondru, @tanho63, and @TheMathNinja for their contributions and feedback towards this release!
This release introduces several new data functions, some new utilities, and an array of data/function updates.
load_participation()returns new play-level information about what players are on the field, how many players are in the box, and what formation the offense is using. Data from NGS starting 2016 and onwardload_contracts()downloads (historical) player contracts from OverTheCap.comload_players()returns player-level information and is the new recommended source (over rosters) for IDs, positions, birthdates etc.load_rosters_weekly()provides week-by-week team rosters dating back to 2002.load_officials()returns game-level information about which officials are assigned to specific games.
nflverse_download()downloads all files attached to specified/all releases to a local folder. This facilitates something likearrow::open_dataset()for reading files locally.nflverse_releases()lists all releases that can be loaded throughnflverse_download()load_from_url()exposes a new utility function for loading any csv, rds, qs, parquet URL to memory.
load_draft_picks()now has the rest of the career stat fields from PFR*sitrep()functions now report package-specific options that are set.get_current_week()helper to get the current nfl season weekload_rosters()now provides season-level rosters dating back to 1920.
- moved rbindlist to a helper that manages attributes better
- update
dictionary_snap_countsanddictionary_scheduleswith some missing fields - rewrite from_url error messages to use cli and improve usefulness
- bump minimum rlang version to 1.0.0
- add piggyback suggested dependency
- Export old class to support S4/DBI/
nflfastR::update_db()as if it were a tibble - Fix exportOldClass so that it supports only data.frame stuff? we have no idea,,,
options(nflreadr.prefer)defaults to rds now since qs is no longer a required dependencyclean_player_names()now also removes commas (after optionally using them forconvert_lastfirst)clean_player_names()now also removes all caps suffixes- dictionary updates: return labelled.
.sitrep()exits nicely if no packages are to be investigated. #114- refactored all the loaders to use
load_from_urlas primary - fixed broken example in
load_ff_opportunity()documentation. #117
Thank you to @albtree, @john-b-edwards, @mrcaseb, @pranavrajaram, @tanho63, and @tpenney89 for their contributions and feedback on this release!
This release updates all nflverse URLs to use the new nflverse-data repository releases, as well as provides improved pretty-printing methods that tell you when the data was last updated.
This release adds functions and arguments to access new data, along with some backend changes.
load_ff_opportunity()downloads expected fantasy points data from the ffopportunity packageload_ff_rankings()gains an"all"parameter to return all available rankings data (weekly archives since 2019)load_pfr_advstats()gains a"summary_level"parameter to return season-level data, which has some fields that are not available at the week-level.
options(nflreadr.verbose)replacesoptions(nflreadr.cache_warning)as the best way to silence nflreadr messages.- Improved data dictionaries for ESPN QBR, Injuries, Trades, Depth Charts, and Combine
- Exported
most_recent_season()function - Updated documentation with improved linking and where to file data issues.
- Sitrep functions have ffopportunity and nflverse packages.
- Pkgdown site upgraded to Bootstrap 5.
Thank you to @armstjc, @Grayhawk34, @john-b-edwards, @mrcaseb, @pranavrajaram, @rogers1000, and @tanho63 for their contributions and feedback on this release!
nflverse_sitrep()andffverse_sitrep()give a minimal overview of the package dependencies- Minimum R version bumped to R 3.6.0 - this is the minimum version required to read the current RDS file-version.
_sitrep()functions receive a small print-related bugfix and colouring improvement.
clean_player_names()andclean_team_abbrs()added - these help standardise player names and team abbreviations based on internal dictionaries.load_ff_rankings()now has atypeargument and can return"draft"or"week"rankings from the DynastyProcess/data repo.clean_homeaway()converts a dataframe of games with columns prefixed withhome_andaway_to a dataframe of teams, renaming toteam_andopponent_and doubling the rows.- Added
load_pfr_advstats()which provides pass, rush, rec, def additional data for each week.
- Add Rcpp and RcppParallel minimum dependencies to fix qs issues.
- Added a message that reminds the user of the caching behavior. The message will be displayed once every 8 hours if the session is interactive.
- Adjusted file location of snap count data
Thank you to @ajreinhard, @brunomioto, @jthomasmock, @mrcaseb, @SCasanova, and @tanho63 for their feedback and contributions to this package!
This release makes some backend changes for speed, reduced dependency footprint, and ease of maintenance.
load_player_stats()can now retrieve weekly summaries of kicking data by specifying thestat_typeargument to be"kicking".load_combine()retrieves NFL combine data (from PFR).
- Remove progress handling from
*_from_url()family of functions and move responsibility toprogressively()function decorator instead. See vignette for details. - Removed dependency on
dplyrandpurrrin favour ofdata.table- this hopefully improves speed and reduces the dependency footprint. - Uses
rlang::arg_match0instead of match.arg (uses rlang explicitly instead of implicitly as a dependency of memoise).
The goal of {nflreadr} is to efficiently load data from nflverse GitHub repositories, and features caching, optional progress updates, and data dictionaries.
At this time, it includes data from the following repositories:
- nflverse/nflverse-pbp
- nflverse/nfldata
- nflverse/nflverse-rosters
- nflverse/espnscrapeR-data
- nflverse/nflverse-pfr
- dynastyprocess/data
This will hopefully provide a unified and reliable package for downloading nflverse data that can be extended to the rest of the nflverse and ffverse package families.
Special thanks to Seb, Ben, John, Lee, and Thomas for their contributions to the package and to the data pipelines that this package relies on 🎉