cfbfastR v2.3.0
This release adds a 65-function ESPN college-football API layer, expanding cfbfastR’s ESPN surface from 8 wrappers to 73. The new wrappers expose ESPN’s core-v2 endpoints in ESPN’s own ID space — complementary to the CollegeFootballData (cfbd_*) wrappers, and the natural join partners for espn_cfb_pbp() / espn_cfb_scoreboard(). Every wrapper was verified live against the 2023, 2024, and 2025 seasons.
Naming alignment with the sportsdataverse convention (this dev cycle, never on CRAN): espn_cfb_player_statistics() is renamed to espn_cfb_player_career_stats() (the core-v2 /athletes/{id}/statistics career view, matching hoopR/wehoop/sportsdataverse-py). New espn_cfb_player_stats_v3() wraps the comprehensive web-common-v3 /athletes/{id}/stats payload (all categories, long format) — the _v3 companion to espn_cfb_player_stats() (core-v2 season statistics).
New Fox Sports API wrappers (fox_cfb_*)
A read-only Fox Sports “Bifrost” college-football layer (api.foxsports.com/bifrost/v1/cfb/*), complementary to the espn_cfb_* and cfbd_* families. Eight wrappers flatten Fox’s layout-oriented JSON (sections → tables → rows → cells) into tidy cfbfastR-tagged tibbles. Reverse-engineering notes and an OpenAPI 3.1 spec live in the sdv-internal-refs repo. Verified live against the 2025 season.
-
fox_cfb_pbp()— game play-by-play (quarters → drives → plays), one row per play. -
fox_cfb_boxscore()— per-team player stat tables, tidy long (one row per player-stat). -
fox_cfb_odds()— matchup six-pack (spread / to-win / total) per team. -
fox_cfb_team_roster()— roster by position group, one row per player. -
fox_cfb_team_stats()— team stat leaders by category. -
fox_cfb_team_gamelog()— per-game team stats, tidy long (game × category × stat), each game keyed to its Fox event id. -
fox_cfb_standings()— a team’s conference standings table. -
fox_cfb_league_leaders()— statistical leaderboards by category (stats-con).
New ESPN wrappers — football-specific metrics
-
espn_cfb_powerindex()— ESPN’s College Football Power Index (FPI): every predictive metric and efficiency component, in long format. -
espn_cfb_qbr()— Total Quarterback Rating (QBR) and the full set of clutch-weighted EPA components, one row per qualified passer. -
espn_cfb_futures()— the season betting-futures board (national championship, conference, and award markets) with each sportsbook’s American odds. -
espn_cfb_recruits()— ESPN’s recruiting board for a class, one row per recruit with grade, position/state/region rank, committed school, and hometown.
New ESPN wrappers — players
-
espn_cfb_players(),espn_cfb_player(),espn_cfb_player_eventlog(),espn_cfb_player_gamelog(),espn_cfb_player_statistics(),espn_cfb_player_splits(),espn_cfb_player_overview(), andespn_cfb_player_seasons()— player index, biographical detail, per-game logs, season statistics, and split breakdowns. The season-level wrappers resolveathlete_idto human-readable name/position columns via anathlete_detailargument.
New ESPN wrappers — teams
-
espn_cfb_teams(),espn_cfb_team(),espn_cfb_team_roster(),espn_cfb_team_schedule(),espn_cfb_team_record(), andespn_cfb_team_leaders()— team index, team-in-season detail, roster, schedule, records, and statistical leaders. -
espn_cfb_team_ats(),espn_cfb_team_powerindex(),espn_cfb_team_events(),espn_cfb_team_ranks(),espn_cfb_team_awards(), andespn_cfb_team_coaches()— team against-the-spread records, single-team power index, season event log, poll-rank history, player awards, and coaching staff.
New ESPN wrappers — game detail
-
espn_cfb_game_teams(),espn_cfb_game_team_linescores(),espn_cfb_game_team_leaders(),espn_cfb_game_team_roster(),espn_cfb_game_team_statistics(), andespn_cfb_game_team_records()— per-game team breakdowns. -
espn_cfb_game_odds(),espn_cfb_game_broadcasts(),espn_cfb_game_predictor(),espn_cfb_game_probabilities(),espn_cfb_game_powerindex(), andespn_cfb_game_pbp()— per-game odds, broadcasts, pre-game predictor, live win-probability, matchup power index, and play-by-play. -
espn_cfb_game_drives(),espn_cfb_game_drive_plays(),espn_cfb_game_play(),espn_cfb_game_leaders(),espn_cfb_game_situation(),espn_cfb_game_status(),espn_cfb_game_player_statistics(), andespn_cfb_game_player_box()— drive log, drive-scoped plays, single-play detail, game statistical leaders, situation, status, and per-player game box lines. - The play-level wrappers (
espn_cfb_game_pbp(),espn_cfb_game_drive_plays(),espn_cfb_game_play()) extract every field ESPN returns for a play and expose its nested child collections through opt-in parameters:participants("none"/"wide"/"long") andparticipants_listsurface per-play athlete involvement (passer, rusher, tackler, …), andteam_participants/team_participants_listsurface the offense/defense team participants —"wide"modes pivot to one row per play, the*_listflags keep the raw detail as a list-column. -
espn_cfb_game_team_records(detail = TRUE)unpacks each record’s full statistic breakdown;espn_cfb_game_odds(line_history = TRUE)returns the open/close/current line-movement history. Roster and player-stats wrappers join ESPN position-catalog detail whenposition_detail = TRUE. -
espn_cfb_game_drives()gains aplaysargument —"list"nests each drive’s plays (full play-by-play schema, with the participant pass-through options) as a list-column,"expand"returns the flat one-row-per-play table withdrive_*context columns. The newespn_cfb_unnest_plays()performs the same drives-to-play-by-play transform on an already-fetched nested frame. - The game wrappers join human-readable team detail when
team_detail = TRUE(default): every team-id column (team_id,home_team_id,start_team_id,leader_team_id, …) gains sibling*_name,*_abbreviation,*_location,*_display_name,*_color,*_logo_href, … columns from the ESPN team catalog.espn_cfb_game_teams(format = "wide")collapses the two competitor rows into a single per-game row withhome_*/away_*columns for direct joining onto one-row-per-game tables. -
espn_cfb_pbp_v2()— a core-v2-sourced successor toespn_cfb_pbp(): assembles play-by-play in one structured request (vs. the legacy site-v2 summary parse) and, withepa_wpa = TRUE, runs cfbfastR’s full EPA/WPA model pipeline — producing EPA/WPA columns identical to the legacy modeled feed.
New ESPN wrappers — catalogs and season metadata
-
espn_cfb_seasons(),espn_cfb_season_info(),espn_cfb_season_types(),espn_cfb_season_weeks(),espn_cfb_groups(), andespn_cfb_standings()— season structure, conferences, and standings. -
espn_cfb_coaches(),espn_cfb_coach(),espn_cfb_venues(),espn_cfb_positions(),espn_cfb_awards(),espn_cfb_rankings(), andespn_cfb_week_rankings()— league catalogs and poll rankings. -
espn_cfb_coach_record(),espn_cfb_franchises(),espn_cfb_franchise(),espn_cfb_venue(),espn_cfb_position(), andespn_cfb_award()— coach season win/loss records, the league franchise catalog, and single-record venue / position / award detail.
New Yahoo Sports wrappers
- Added Yahoo Sports college football wrappers:
yahoo_cfb_player_season_stats(),yahoo_cfb_team_season_stats(),yahoo_cfb_player_season_stats_legacy(),yahoo_cfb_team_season_stats_legacy(),yahoo_cfb_scoreboard(), andyahoo_cfb_boxscore()(scaffold), wrapping Yahoo’s shangrila stats graph and editorial feed.
New CollegeFootballData wrappers
-
cfbd_betting_ats()— season against-the-spread (ATS) summary records by team, wrapping the CollegeFootballData/teams/atsendpoint. -
cfbd_stats_game_havoc()— per-game havoc statistics (total / front-seven / defensive-back havoc events and rates, offense and defense), wrapping the CollegeFootballData/stats/game/havocendpoint. -
cfbd_pbp_data_v2()is a new public function: a modular successor tocfbd_pbp_data()that runs the same EPA/WPA pipeline through a single shared engine (.run_epa_wpa()) and a canonical play-type taxonomy (.pbp_play_types()). The legacycfbd_pbp_data()is unchanged. -
espn_cfb_pbp_v2()now sources play-by-play and meta through the shared engine, requestsparticipants = "wide"andteam_participants = "wide"fromespn_cfb_game_drives(), and adds the meta columnshome_team_name,home_team_color,home_team_alternate_color,home_team_rank(andaway_*) via the new.espn_pbp_game_meta()bridge. Output is a strict superset of legacyespn_cfb_pbp()on the meta columns.
Bug fixes
-
espn_cfb_pbp()now builds its request URL with the?event=query separator (previously concatenated assummaryevent=, which returned HTTP 404 for every game) and initializes its return frame before thetryCatchso an upstream failure no longer throwsobject 'plays_df' not found. -
cfbd_pbp_data_v2()andespn_cfb_pbp_v2()preserve characterid_playprecision through the EPA/WPA pipeline. The legacy shared helper used unquoted numeric literals in twoifelsecalls (a historicalid_playswap for one game), which silently coerced characterid_playto numeric and then lost precision past 2^53 — breaking the play-id join-back inespn_cfb_pbp_v2(). The modular.pbp_clean_pbp_dat()quotes those literals soid_playstays character; the legacyclean_pbp_dat()is unchanged.
Internal changes
-
httr -> httr2 migration. cfbfastR’s HTTP layer now uses the modern
httr2package (>= 1.0.0) instead of the legacyhttr. End users running existing wrapper calls (cfbd_*,espn_cfb_*) should see no behavioural change – the migration is internal. Custom code that callsget_req()orcheck_status()directly must update fromhttr::content(res, as = "text")tohttr2::resp_body_string(res)and fromhttr::status_code(res)tohttr2::resp_status(res). -
Proxy support.
get_req()now resolves a proxy in the order: explicitproxyargument ->getOption("cfbfastR.proxy")->http_proxy/https_proxyenv vars. The proxy value accepts either a URL string or a named list withurl/port/username/password/authfor authenticated proxies. -
Dependency footprint trimmed.
lubridate,progressr,memoise,cachem, andmagrittrhave moved out ofImports(21 -> 16).lubridateis gone entirely – its twoymd_hm() |> with_tz()calls inespn_cfb_schedule.Rare now base-Ras.POSIXct(format = "%Y-%m-%dT%H:%M", tz = "UTC")+attr(., "tzone").progressr,memoise, andcachemmoved toSuggestsand the helpers degrade gracefully when missing:load_cfb_pbp()/cfbd_pbp_data()/pbp_epa_wpa_engine()run without a progress bar whenprogressris absent; ESPN catalog wrappers run uncached whenmemoise/cachemare absent (espn_cfb_clear_cache()becomes a no-op). Drops theImportscount below the >20R CMD checkNOTE threshold. -
Native pipe migration. All 1,419
%>%chains inR/, plus 137 acrossvignettes/andtests/, were converted to the base-R native pipe|>.magrittris no longer anImports; downstream consumers that loadcfbfastRpurely for its functions don’t get%>%re-exported anymore. User-visible impact is minimal – the public API is unchanged anddplyr(which is inImports) still re-exports%>%for users who want to keep writing it. Two non-mechanical fixes were needed during the sweep: three|> [[("url")chains incfbd_betting.Randcfbd_coaches.R(rejected as RHS in R 4.1’s|>) became|> purrr::pluck("url"); seven|> tibble::tibble(col = .data$.)constructs were a magrittr quirk that silently duplicated the LHS into both a.and the named column – rewritten totibble::tibble(col = <lhs>), which drops the redundant.column. -
Test-time CFBD throttle. A new
tests/testthat/setup-cfbd-throttle.Radds a 1-second sleep before every CFBD request made bydevtools::test()/R CMD check. It works by monkey-patchingcfbfastR:::get_req()for the duration of the test session (restored viawithr::defer(., teardown_env())) – the package code is unchanged, so interactive and production calls pay no penalty. Tunable viaoptions(cfbfastR.test_request_delay = N)(default 1; set to 0 for unthrottled local runs). Resolves the cascadingHTTP 429skip-if-empty results that were turning otherwise-green test runs into “all green, mostly skipped.”withrjoinsSuggeststo declare the test-side dependency cleanly (it was already a transitive dep oftestthat).
cfbfastR v2.2.0
- Fixes a bug in
validate_week()utility function where some inputs were not being handled correctly (i.e. week 16). Fixes trickle down tocfbd_pbp_data()and other functions. - Default value for
season_typeparameter incfbd_game_info()andcfbd_play_stats_player()function changed from “regular” to “both” to align with other functions in the package.
cfbfastR v2.1.0
- Fixes a bug in
cfbd_pbp_data()where play-by-play data for some games were not as expected. - Improves
add_yardage()where plays with missing yardage values were not being handled correctly.
cfbfastR v2.0.0
CRAN release: 2025-09-09
Breaking Changes to Loading Functions
- All
load_cfb_*()functions now usesportsdataverse-datareleases or the CollegeFootballData.com API as their underlying data source to remain in compliance with CFBD API terms and conditions (See Note below). - Updated
load_cfb_pbp()dataset to include various team- and game-level ID’s and flags that were not being included, likehome_team_id,away_team_id,season_type,venue_id, somedrive_*columns, a half-dozen player stat columns, etc. Essentially, all the leg-work users have undoubtedly had to do while using these datasets is mostly just included now. The downside: this means end users need to check their pipelines which build off these datasets to ensure behavior is as expected and all your joins are doing what is intended.
Now upgraded to the CFBD v2 API
Special thanks are in order for our newest contributor, Brad Hill (@bradisbrad) for providing most of the v2 upgrade via his first PR to cfbfastR!! 🙌🏽 👑 🥇 Your contributions are most appreciated by the community.
Note: The free-tier API key for the CFBD v2 API has a strict 1k calls/month limit, so plan your workflows accordingly! If you receive errors mentioning r Request failed [429], you have most likely run out of API calls for the month in your membership tier.
-
Added all new
cfbd_*()functions accommodated by the new College Football Data API v2. This includes the following functions:- Added
cfbd_metrics_fg_ep()function to access the new field goal expected points added metric from the API. - Added
cfbd_metrics_wepa_team_season()function to access the new opponent adjusted team season predicted points added metric from the API. - Added
cfbd_metrics_wepa_players_passing()function to access the new opponent adjusted players passing predicted points added metric from the API. - Added
cfbd_metrics_wepa_players_rushing()function to access the new opponent adjusted players rushing predicted points added metric from the API. - Added
cfbd_metrics_wepa_players_kicking()function to access the new Points Added Above Replacement (PAAR) ratings for kickers from the API. - Added
cfbd_ratings_fpi()function to access the new FPI ratings from the API. - Added
cfbd_live_scoreboard()function to access live scoreboard data from the API. - Added
cfbd_live_plays()function to access live play-by-play data from the API. - Added
cfbd_api_key_info()function to get information about your API key, including your Patreon level and usage limits.
- Added
-
Minor changes to the existing
cfbd_*()functions under the hood to accommodate the new API v2 structure. Please see below for a list of all updated functions:- Updated
cfbd_betting_lines()function - Updated
cfbd_coaches()function - Updated
cfbd_conferences()function - Updated
cfbd_drives()function - Updated
cfbd_calendar()function - Updated
cfbd_game_box_advanced()function - Updated
cfbd_game_info()function - Updated
cfbd_game_media()function - Updated
cfbd_game_player_stats()function - Updated
cfbd_game_records()function - Updated
cfbd_game_team_stats()function - Updated
cfbd_metrics_ppa_games()function - Updated
cfbd_metrics_ppa_players_games()function - Updated
cfbd_metrics_ppa_players_season()function - Updated
cfbd_metrics_ppa_predicted()function - Updated
cfbd_metrics_ppa_teams()function - Updated
cfbd_metrics_wp()function - Updated
cfbd_metrics_wp_pregame()function - Updated
cfbd_pbp_data()function - Updated
cfbd_play_stats_player()function - Updated
cfbd_play_stats_types()function - Updated
cfbd_play_types()function - Updated
cfbd_plays()function - Updated
cfbd_player_info()function - Updated
cfbd_player_returning()function - Updated
cfbd_player_usage()function - Updated
cfbd_rankings()function - Updated
cfbd_ratings_sp()function - Updated
cfbd_ratings_sp_conference()function - Updated
cfbd_ratings_srs()function - Updated
cfbd_recruiting_player()function - Updated
cfbd_recruiting_position()function - Updated
cfbd_recruiting_team()function - Updated
cfbd_stats_categories()function - Updated
cfbd_stats_game_advanced()function - Updated
cfbd_stats_season_advanced()function - Updated
cfbd_stats_season_player()function - Updated
cfbd_stats_season_team()function - Updated
cfbd_team_info()function - Updated
cfbd_team_matchup()function - Updated
cfbd_team_matchup_records()function - Updated
cfbd_team_roster()function - Updated
cfbd_team_talent()function - Updated
cfbd_venues()function
- Updated
-
Fixed the following functions and/or documentation:
- Documentation
cfbd_team_info()addressing #97 - Ensuring
cfbd_stats_game_advanced()returns an empty data frame when there are no results - Documentation
cfbd_game_team_stats()updated to reflect all parameter requirement scenarios. - Fixed
athlete_idparametercfbd_player_usage()so that it works as users would expect. There was an API query-parameter mismatch - Fixed
athlete_idparameter forcfbd_play_stats_player()function and added more thorough documentation. - Fixed returned
positionto correct value (instead of NA) fromcfbd_stats_season_player() - Added more thorough
season_typeparameter documentation across many functions - Changed behavior of
cfbd_pbp_data()to substitute 3 timeouts per half when the data is missing from the API.
- Documentation
cfbfastR v1.9.5
- fixed breaking bug related to
stringiv1.8 update incfbd_play_pbp_data()EPA and WPA processing - Minor documentation and test updates
cfbfastR v1.9.4
- Improve date parsing for
espn_cfb_scoreboard()andespn_cfb_schedule()functions while addinglubridatedependency - Made a minor tweak to the returns of the
espn_ratings_fpi()function
cfbfastR v1.9.2
-
espn_cfb_player_stats()function added.
cfbfastR v1.9.1
- Improved drive_pts logic in play-by-play data.
- Fixed an issue that occasionally made the
cfbd_game_team_stats()function return data in a long format - Minor documentation and test updates
cfbfastR v1.9.0
CRAN release: 2022-06-13
Added functions to access ESPN API:
espn_cfb_calendar()espn_cfb_schedule()- Added EPA and WPA processing to
espn_cfb_pbp() espn_cfb_team_stats()
cfbfastR v1.8.0
- All functions now default to return tibbles.
- Added S3 method to print outputs with data info and retrieval timestamps. Thank you to Tan Ho (@tanho36) for the idea.
cfbfastR v1.7.1
- Added
espn_ratings_fpi()to exports.
cfbfastR v1.6.7
- Fixed bug in
cfbd_game_team_stats()with _allowed columns duplicating team stats instead of showing opponent stats. - Updated tests and documentation for
cfbd_game_team_stats().
cfbfastR v1.6.6
- Updated function
cfbd_pbp_data()to account for additional timeout cases (namely, kickoffs/extra point attempts).
cfbfastR v1.6.5
- Updated tests and documentation for
cfbd_betting_lines() - API call in
espn_ratings_fpi()now requires headers in httr request
cfbfastR v1.6.4
CRAN release: 2021-10-27
- Changed options to revert to old options on exit of function.
- Removed check_github functions.
cfbfastR v1.6.2
- Switched package urls in README and DESCRIPTION files to https://
cfbfastR v1.6.1
- Removed source urls from many package documentation entries.
- Updated a test to skip on CRAN
cfbfastR v1.6.0
- Added
cfbd_ratings_elo()function - Fixed a bug in
update_cfb_db()where the function failed when trying to load recent games from the data repo. (#35) - Added the option
cfbfastR.dbdirectorythat allows to set the database directory inupdate_cfb_db()globally.
cfbfastR v1.5.1
Minor release
- Removed calculated columns from
cfbd_stats_season_team()that were not behaving correctly - Fixed bug where
only_fbsinput incfbd_team_info()was ignored. It is now possible to get the team info for all the colleges in the API instead of only FBS schools. - Removed default year from
cfbd_metrics_ppa_teams.cfbd_metrics_ppa_teamsandcfbd_metrics_ppa_players_seasonnow require one ofteamoryearto be specified
cfbfastR v1.4.0
Added cfbd_game_weather()
cfbfastR v1.3.3
Hotfix cfbd_game_player_stats()
cfbfastR v1.3.2
Added ID linking to cfbd_recruiting_players()
cfbfastR v1.3.0-1
Added three NFL draft functions:
-
cfbd_draft_teams()- Get list of NFL teams -
cfbd_draft_positions()- Get list of NFL positions for mapping to collegiate -
cfbd_draft_picks()- Get list of NFL Draft picks
cfbfastR v1.2.1
Minor release
Added headshot_url to outputs of
cfbd_team_roster()-
Renamed returns in
cfbd_game_box_advanced():-
rushing_line_yd_avgto pluralrushing_line_yds_avg -
rushing_second_lvl_yd_avgto pluralrushing_second_lvl_yds_avg -
rushing_open_field_yd_avgto pluralrushing_open_field_yds_avg
-
Completed documentation for all returns except
cfbd_pbp_data()Continued work on intro vignette
cfbfastR v1.2.0-1
Add significant documentation to the package
- Added mini-vignettes pertaining to CFB Data functionality:
- Introductory vignette stub added
ESPN/CFBD metrics function variable return standardization
- Change
idvariable toteam_idinespn_ratings_fpi() - Changed
espn_game_idvariable togame_idinespn_metrics_wp(), corrected theaway_win_percentagecalculation and addedtie_percentageto the returns. - Change
idvariable toathlete_idincfbd_metrics_ppa_players_season()
cfbfastR v1.1.0
Add loading from Data Repository functionality
- Added
load_cfb_pbp()andupdate_cfb_db()functions. Pretty much cherry-picking thenflfastRmethodology of loading data from thecfbfastR-datarepository.
cfbfastR v1.0.0
Function Naming Convention Change
All functions sourced from the College Football Data API will start with
cfbd_as opposed tocfb_(as in cfbscrapR). One additionalcfbd_function has been added that corresponds to the result whencfbd_pbp_data()has the parameterepa_wpa=FALSE. It has now been separated into its own function for claritycfbd_plays(). The parameter and functionality still exists incfbd_pbp_data()but we expect this function will still exist but made obsolete in favor of a function more closely matchingnflfastR’s naming conventions.Similarly, data and metrics sourced from ESPN will begin with
espn_as opposed tocfb_. In particular, the two functions are nowespn_ratings_fpi()andespn_metrics_wp()Data generated from any of the
cfbfastRmethods will usecfb_
College Football Data API Keys
The CollegeFootballData API now requires an API key, here’s a quick run-down:
To get an API key, follow the directions here: College Football Data Key Registration.
Using the key: You can save the key for consistent usage by adding
CFBD_API_KEY=XXXX-YOUR-API-KEY-HERE-XXXXXto your .Renviron file (easily accessed viausethis::edit_r_environ()). Runusethis::edit_r_environ(), a new script will pop open named.Renviron, THEN paste the following in the new script that pops up (without quotations)
CFBD_API_KEY = XXXX-YOUR-API-KEY-HERE-XXXXXSave the script and restart your RStudio session, by clicking Session (in between Plots and Build) and click Restart R (n.b. there also exists the shortcut Ctrl + Shift + F10 to restart your session). If set correctly, from then on you should be able to use any of the cfbd_ functions without any other changes.
- For less consistent usage: At the beginning of every session or within an R environment, save your API key as the environment variable
CFBD_API_KEY(with quotations) using a command like the following.
{r} Sys.setenv(CFBD_API_KEY = "XXXX-YOUR-API-KEY-HERE-XXXXX")
- Added API Key methods. If you forget to set your environment variable, functions will give you a warning and ask for one.
