This release covers changes released before the start of the 2025 NFLseason.
load_players() now loads v2 nflverse players data. Thisis a breaking change as some variables have been removed or renamed.Please see thedatacomparison for more details.load_player_stats() now access new player_stats filescreated bynflfastR::calculate_stats() (#279) and has a fewfunction signature changes:stat_type argument is deprecated - now returns offense,defense, and kicking player statistics as one file.summary_level so that it canreturn player stats summarized by week, regular season, postseason, orregular + postseason combinedload_team_stats() added to access new team_stats filescreated 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 thedatastructure has changed because the data source had to be changed fromNFL Data Exchange to ESPN. (#275, #277)load_participation() is back, somewhat! FTNData.com hasgraciously offered to provide participation data after each season hasended, so we now have participation data from 2024 and 2023. Please notethat this data is licensed under CC-BY-SA 4.0 and should be credited(for 2023 onwards) toFTN Data via nflverse.(#278)nflreadr::nflverse_data_timezone which defines the standardtimezone across all nflverse data. When printing to the console,nflreadr will convert timestamps to the user local timezone.clean_team_abbrs() now converts"PHO" to"ARI". (#260)nflreadr::dictionary_pbp. (#262).sitrep and all*_sitrep functions nowredact 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 functionimprovements:
%c% internal helper now usesdata.table::fifelse() to avoid falsely converting dates tointegers. (#214)load_schedules() cleans theroof variablein order to avoid nflverse model issues. (#218)join_coalesce() coerces x/y args to data.frame and willreturn a data.framemost_recent_season() now internally computes the exactday of the season opener as Thursday after first Monday of September.(#221)load_espn_qbr() no longer supports argumentleague which used to allow loading of College QBR (not innflverse scope) (#222)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 youclean_player_names() now can transliterate tolatin-ascii if the stringi package is available, controlled by theconvert_to_ascii argument.Thank you to: @arjunmenon10, @engineerchange, @isaactpetersen,@Jeffery-777, @john-b-edwards, @justlikekevin, @mrcaseb, @SCasanova, and@tanho63 for their questions, feedback, and contributions to thisrelease.
This release addresses bugs, improves some utilities, and adds a fewnew datasets.
load_player_stats(stat_type = "defense") added toprovide defensive player stats as computed bynflfastR::calculate_player_stats_def() (#200) It also comeswith a data dictionary, courtesy ofload_ftn_charting() adds manual charting data for2022-onwards, graciously provided byFTN Data. Thisshould automatically be updated when published by FTN, and the earlyindication is that it will be within 48 hours after a game hasfinished.nflverse_sitrep() and friends overhauled:nflreadr::most_recent_season() and aliasesget_latest_season,get_current_season etc nowuse March 15th as the changeover for league year. Hopefully this is nota moving target 🙃nflreadr::clean_homeaway() now handles columns withsuffixes_home and_awaynflreadr::nflverse_game_id() now accepts old teamabbreviations and outputs useful errors..for_cran() to limit parallelization in CRANexamples and testsmake_nflverse_data_class() now usesdata.table::setattr() to preserve data.table pointer"special" variable in theplay-by-play data dictionary. (#189)Thank you to @ak47twq, @alecglen, @andycancapital, @bullaspc,@mcarman8, @mpcen, @mrcaseb, @tanho63, @tashapiro, and @TheMathNinja fortheir questions, feedback, and contributions to this release.
–
Minor changes per changelist and patch CRAN-related exampleissue.
.clear_cache() now re-exported without dot prefix asclear_cache(). Hopefully more obvious.join_coalesce() is now added as a utility to join twodataframes and coalesce any shared columns.load_teams() now uses the argumentcurrent(TRUE/FALSE) to standardize which rows are returned - this aligns withnflreadr::clean_team_abbrs andnflreadr::team_abbr_mappingdictionary_participation added (thank youclean_homeaway() now preserves neutral site location aswell as input class and input attributesload_ff_rankings() URL bug corrected (thank youclean_homeaway() resolved for CRANfailureThank you to @ak47twq, @bachlaw, @brunomioto, @guga31bb, @Josephhero,@kharigardner, @mrcaseb, @MysteryPollster, @numbersinfigures, and @ohrifor their questions, feedback, and contributions towards thisrelease.
Fixes CRAN bug and provides some function improvements, most notablyimproved logic forload_participation()’s pbp join.
nflverse_game_id() which computes valid nflversegame identifiers in the format"{season}_{week}_{away}_{home}"load_participation() now joins pbp on vianflverse_game_id instead ofold_game_idload_snap_counts() now allows download of the 2012season which was previously hardcoded from 2013 (#128)progressively() now works with purrr-style lambdafunctions and no longer checks for progressor class, allowing it to beused more flexibly (and with cli-based progress bars.)nflverse_releases() andnflverse_download() now accept.tokenarguments which default togh::gh_token(). This is mostlyto let us test things properly. (#131)clean_player_names() now fully lives in nflreadr, thesquish/trim happens firstget_current_season() now exists, because we can’t agreeon 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 thisrelease!
This release introduces several new data functions, some newutilities, and an array of data/function updates.
load_participation() returns new play-level informationabout 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 andonwardload_contracts() downloads (historical) playercontracts fromOverTheCap.comload_players() returns player-level information and isthe new recommended source (over rosters) for IDs, positions, birthdatesetc.load_rosters_weekly() provides week-by-week teamrosters dating back to 2002.load_officials() returns game-level information aboutwhich officials are assigned to specific games.nflverse_download() downloads all files attached tospecified/all releases to a local folder. This facilitates somethinglikearrow::open_dataset() for reading files locally.nflverse_releases() lists all releases that can beloaded throughnflverse_download()load_from_url() exposes a new utility function forloading any csv, rds, qs, parquet URL to memory.load_draft_picks() now has the rest of the career statfields from PFR*sitrep() functions now report package-specific optionsthat are set.get_current_week() helper to get the current nfl seasonweekload_rosters() now provides season-level rosters datingback to 1920.dictionary_snap_counts anddictionary_schedules with some missing fieldsnflfastR::update_db() as if it were a tibbleoptions(nflreadr.prefer) defaults to rds now since qsis no longer a required dependencyclean_player_names() now also removes commas (afteroptionally using them forconvert_lastfirst)clean_player_names() now also removes all capssuffixes.sitrep() exits nicely if no packages are to beinvestigated. #114load_from_url asprimaryload_ff_opportunity()documentation. #117Thank you to @albtree, @john-b-edwards, @mrcaseb, @pranavrajaram,@tanho63, and @tpenney89 for their contributions and feedback on thisrelease!
This release updates all nflverse URLs to use the newnflverse-datarepository releases, as well as provides improved pretty-printingmethods that tell you when the data was last updated.
This release adds functions and arguments to access new data, alongwith some backend changes.
load_ff_opportunity() downloads expected fantasy pointsdata from theffopportunitypackageload_ff_rankings() gains an"all"parameter to return all available rankings data (weekly archives since2019)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 silencenflreadr messages.most_recent_season() functionThank you to @armstjc, @Grayhawk34, @john-b-edwards, @mrcaseb,@pranavrajaram, @rogers1000, and @tanho63 for their contributions andfeedback on this release!
nflverse_sitrep() andffverse_sitrep()give a minimal overview of the package dependencies_sitrep() functions receive a small print-relatedbugfix and colouring improvement.clean_player_names() andclean_team_abbrs() added - these help standardise playernames and team abbreviations based on internal dictionaries.load_ff_rankings() now has atype argumentand can return"draft" or"week" rankings fromthe DynastyProcess/data repo.clean_homeaway() converts a dataframe of games withcolumns prefixed withhome_ andaway_ to adataframe of teams, renaming toteam_ andopponent_ and doubling the rows.load_pfr_advstats() which provides pass, rush,rec, def additional data for each week.Thank you to @ajreinhard, @brunomioto, @jthomasmock, @mrcaseb,@SCasanova, and @tanho63 for their feedback and contributions to thispackage!
This release makes some backend changes for speed, reduced dependencyfootprint, and ease of maintenance.
load_player_stats() can now retrieve weekly summariesof kicking data by specifying thestat_type argument to be"kicking".load_combine() retrieves NFL combine data (fromPFR).*_from_url() family offunctions and move responsibility toprogressively()function decorator instead. See vignette for details.dplyr andpurrr infavour ofdata.table - this hopefully improves speed andreduces the dependency footprint.rlang::arg_match0 instead of match.arg (uses rlangexplicitly instead of implicitly as a dependency of memoise).The goal of {nflreadr} is to efficiently load data fromnflverse GitHub repositories,and features caching, optional progress updates, and datadictionaries.
At this time, it includes data from the following repositories:
This will hopefully provide a unified and reliable package fordownloading nflverse data that can be extended to the rest of thenflverse and ffverse package families.
Special thanks to Seb, Ben, John, Lee, and Thomas for theircontributions to the package and to the data pipelines that this packagerelies on 🎉