load_espn_cfb_adv_turnover: *Load college football advanced turnover from the...

View source: R/load_espn_cfb.R

load_espn_cfb_adv_turnoverR Documentation

Load college football advanced turnover from the SportsDataverse data repo

Description

Loads season-level turnover aggregates – one row per team with turnovers won/lost, expected turnovers, and turnover luck. Published to the espn_cfb_adv_turnover release tag on the sportsdataverse-data repo.

Usage

load_espn_cfb_adv_turnover(
  seasons = most_recent_cfb_season(),
  ...,
  dbConnection = NULL,
  tablename = NULL
)

Arguments

seasons

A vector of 4-digit years associated with given college football seasons. Published coverage runs 2004 through the most recent season. Pass seasons = TRUE for every published season. (Min: 2004)

...

Additional arguments passed to an underlying function that writes the season data into a database.

dbConnection

A DBIConnection object, as returned by DBI::dbConnect()

tablename

The name of the data table within the database

Value

Returns a cfbfastR_data tibble.

col_name types description
pos_team_id integer ESPN team id of the team on offense. Present for every season 2004+.
pos_team character
turnovers integer
st_turnovers_lost integer Turnovers the team lost on special-teams plays.
Int integer Interceptions thrown.
fumbles_lost integer
pass_breakups integer Passes thrown by this offense that the opposing defense broke up; it equals the opponent's row in the advanced defensive table exactly.
total_fumbles integer
fumbles_recovered integer
team_id integer
turnovers_pbp integer Turnover count derived from the play-by-play, retained unchanged so it can be reconciled against the ESPN-sourced turnovers total.
Int_pbp integer Interception count derived from the play-by-play, kept alongside the ESPN-sourced Int for reconciliation.
fumbles_lost_pbp integer Fumbles-lost count derived from the play-by-play, kept alongside the ESPN-sourced fumbles_lost for reconciliation.
espn_sourced logical CONSTANT: true on every published row. It records that the row was built from the ESPN feed rather than an alternate provider, and no other provider is currently used.
expected_turnovers double Turnover expectation for this team, computed as half its total fumbles plus 0.22 times the sum of its pass breakups and interceptions.
expected_turnover_margin double The opponent's expected_turnovers minus this team's, so positive means the team was expected to win the turnover battle.
turnover_margin integer The opponent's turnovers minus this team's turnovers, positive when the team gained more possessions than it gave away.
turnover_luck double Points of scoring luck attributed to turnovers, five points per turnover times the gap between turnover_margin and expected_turnover_margin.
takeaways integer
st_turnovers_gained integer Special-teams turnovers this team recovered, taken as the opponent's st_turnovers_lost.
fumble_recoveries_gained integer Opponent fumbles this team recovered, taken as the opponent's fumbles_lost.
game_id integer
season integer
week integer

Author(s)

Saiem Gilani

Examples


  try(load_espn_cfb_adv_turnover(2004))


cfbfastR documentation built on Aug. 24, 2026, 5:13 p.m.