Skip to contents

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.

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

New ESPN wrappers — teams

New ESPN wrappers — game detail

New ESPN wrappers — catalogs and season metadata

New Yahoo Sports wrappers

New CollegeFootballData wrappers

  • cfbd_betting_ats() — season against-the-spread (ATS) summary records by team, wrapping the CollegeFootballData /teams/ats endpoint.
  • 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/havoc endpoint.
  • cfbd_pbp_data_v2() is a new public function: a modular successor to cfbd_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 legacy cfbd_pbp_data() is unchanged.
  • espn_cfb_pbp_v2() now sources play-by-play and meta through the shared engine, requests participants = "wide" and team_participants = "wide" from espn_cfb_game_drives(), and adds the meta columns home_team_name, home_team_color, home_team_alternate_color, home_team_rank (and away_*) via the new .espn_pbp_game_meta() bridge. Output is a strict superset of legacy espn_cfb_pbp() on the meta columns.

Bug fixes

  • espn_cfb_pbp() now builds its request URL with the ?event= query separator (previously concatenated as summaryevent=, which returned HTTP 404 for every game) and initializes its return frame before the tryCatch so an upstream failure no longer throws object 'plays_df' not found.
  • cfbd_pbp_data_v2() and espn_cfb_pbp_v2() preserve character id_play precision through the EPA/WPA pipeline. The legacy shared helper used unquoted numeric literals in two ifelse calls (a historical id_play swap for one game), which silently coerced character id_play to numeric and then lost precision past 2^53 — breaking the play-id join-back in espn_cfb_pbp_v2(). The modular .pbp_clean_pbp_dat() quotes those literals so id_play stays character; the legacy clean_pbp_dat() is unchanged.

Internal changes

  • httr -> httr2 migration. cfbfastR’s HTTP layer now uses the modern httr2 package (>= 1.0.0) instead of the legacy httr. End users running existing wrapper calls (cfbd_*, espn_cfb_*) should see no behavioural change – the migration is internal. Custom code that calls get_req() or check_status() directly must update from httr::content(res, as = "text") to httr2::resp_body_string(res) and from httr::status_code(res) to httr2::resp_status(res).
  • Proxy support. get_req() now resolves a proxy in the order: explicit proxy argument -> getOption("cfbfastR.proxy") -> http_proxy / https_proxy env vars. The proxy value accepts either a URL string or a named list with url / port / username / password / auth for authenticated proxies.
  • Dependency footprint trimmed. lubridate, progressr, memoise, cachem, and magrittr have moved out of Imports (21 -> 16). lubridate is gone entirely – its two ymd_hm() |> with_tz() calls in espn_cfb_schedule.R are now base-R as.POSIXct(format = "%Y-%m-%dT%H:%M", tz = "UTC") + attr(., "tzone"). progressr, memoise, and cachem moved to Suggests and the helpers degrade gracefully when missing: load_cfb_pbp() / cfbd_pbp_data() / pbp_epa_wpa_engine() run without a progress bar when progressr is absent; ESPN catalog wrappers run uncached when memoise / cachem are absent (espn_cfb_clear_cache() becomes a no-op). Drops the Imports count below the >20 R CMD check NOTE threshold.
  • Native pipe migration. All 1,419 %>% chains in R/, plus 137 across vignettes/ and tests/, were converted to the base-R native pipe |>. magrittr is no longer an Imports; downstream consumers that load cfbfastR purely for its functions don’t get %>% re-exported anymore. User-visible impact is minimal – the public API is unchanged and dplyr (which is in Imports) still re-exports %>% for users who want to keep writing it. Two non-mechanical fixes were needed during the sweep: three |> [[("url") chains in cfbd_betting.R and cfbd_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 to tibble::tibble(col = <lhs>), which drops the redundant . column.
  • Test-time CFBD throttle. A new tests/testthat/setup-cfbd-throttle.R adds a 1-second sleep before every CFBD request made by devtools::test() / R CMD check. It works by monkey-patching cfbfastR:::get_req() for the duration of the test session (restored via withr::defer(., teardown_env())) – the package code is unchanged, so interactive and production calls pay no penalty. Tunable via options(cfbfastR.test_request_delay = N) (default 1; set to 0 for unthrottled local runs). Resolves the cascading HTTP 429 skip-if-empty results that were turning otherwise-green test runs into “all green, mostly skipped.” withr joins Suggests to declare the test-side dependency cleanly (it was already a transitive dep of testthat).

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 to cfbd_pbp_data() and other functions.
  • Default value for season_type parameter in cfbd_game_info() and cfbd_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 use sportsdataverse-data releases 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, like home_team_id, away_team_id, season_type, venue_id, some drive_* 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.

cfbfastR v1.9.5

  • fixed breaking bug related to stringi v1.8 update in cfbd_play_pbp_data() EPA and WPA processing
  • Minor documentation and test updates

cfbfastR v1.9.4

cfbfastR v1.9.3

cfbfastR v1.9.2

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:
Added functions to pull data from the data repo:

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

cfbfastR v1.7.0

cfbfastR v1.6.7

cfbfastR v1.6.6

  • Updated function cfbd_pbp_data() to account for additional timeout cases (namely, kickoffs/extra point attempts).

cfbfastR v1.6.5

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.3

  • Switched package urls in DESCRIPTION again.

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.dbdirectory that allows to set the database directory in update_cfb_db() globally.

cfbfastR v1.5.2

  • Remove verbose parameter

cfbfastR v1.5.1

Minor release
  • Removed calculated columns from cfbd_stats_season_team() that were not behaving correctly
  • Fixed bug where only_fbs input in cfbd_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_teams and cfbd_metrics_ppa_players_season now require one of team or year to be specified

cfbfastR v1.5.0

cfbfastR v1.4.0

cfbfastR v1.3.3

cfbfastR v1.3.2

Added ID linking to cfbd_recruiting_players()

cfbfastR v1.3.0-1

Added three NFL draft functions:

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_avg to plural rushing_line_yds_avg
    • rushing_second_lvl_yd_avg to plural rushing_second_lvl_yds_avg
    • rushing_open_field_yd_avg to plural rushing_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
ESPN/CFBD metrics function variable return standardization

cfbfastR v1.1.0

Add loading from Data Repository functionality
Add support for parallel processing and progress updates
  • Added furrr, future, and progressr dependencies to the package to allow for parallel processing of the play-by-play data with progress updates if desired.

cfbfastR v1.0.0

Function Naming Convention Change
  • All functions sourced from the College Football Data API will start with cfbd_ as opposed to cfb_ (as in cfbscrapR). One additional cfbd_ function has been added that corresponds to the result when cfbd_pbp_data() has the parameter epa_wpa=FALSE. It has now been separated into its own function for clarity cfbd_plays(). The parameter and functionality still exists in cfbd_pbp_data() but we expect this function will still exist but made obsolete in favor of a function more closely matching nflfastR’s naming conventions.

  • Similarly, data and metrics sourced from ESPN will begin with espn_ as opposed to cfb_. In particular, the two functions are now espn_ratings_fpi() and espn_metrics_wp()

  • Data generated from any of the cfbfastR methods will use cfb_

College Football Data API Keys

The CollegeFootballData API now requires an API key, here’s a quick run-down:

CFBD_API_KEY = XXXX-YOUR-API-KEY-HERE-XXXXX

Save 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.