Skip to contents

Loads season-level model-enriched play-by-play – the modeling-grade pbp frame with the engineered features the cfbfastR EP/WP model suite trains on. Published to the espn_cfb_model_pbp release tag on the sportsdataverse-data repo.

Usage

load_espn_cfb_model_pbp(
  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_nametypesdescription
game_idinteger
idcharacter
sequenceNumbercharacter
game_play_numberinteger
drive.idcharacterESPN's drive identifier, formed as the game id followed by the drive's sequence number within that game.
seasoninteger
weekinteger
periodinteger
pos_teaminteger
def_pos_teaminteger
start.pos_team.namecharacterSchool name of the team with possession at the snap, taken from ESPN's team location field so it carries no mascot.
homeTeamIdintegerESPN team id of the home team, read off the game header and stamped on every play.
awayTeamIdintegerESPN team id of the away team, read off the game header and stamped on every play.
homeTeamNamecharacterHome team's school name from ESPN's team location field, without the mascot.
awayTeamNamecharacterAway team's school name from ESPN's team location field, without the mascot.
type.textcharacterESPN's play-type label, for example Rush, Pass Reception, Sack, Punt, Penalty, or Timeout.
textcharacter
start.downintegerDown at the snap as ESPN reports it; 0 marks the small share of rows ESPN leaves without a down, overwhelmingly timeouts and penalty administrations.
start.distanceintegerYards the offense needs for a first down at the snap, carried through from ESPN without correction.
start.yardsToEndzoneintegerDistance in yards from the offense's spot at the snap to the opponent's end zone, ranging 0 to 100.
pos_score_diff_startinteger
start.TimeSecsRemintegerSeconds remaining in the half at the snap, so it tops out at 1800 rather than counting down from a full game.
start.is_homelogicalTrue when the team holding possession at the snap is the home team.
passing_downlogicalTrue on second and eight or longer, third and five or longer, or fourth and five or longer, the standard obvious-passing-situation flag.
passlogical
rushlogical
completionlogical
scoring_playlogical
statYardageintegerYards gained on the play as ESPN reports it, negative on plays that lost yardage.
passer_player_namecharacterDisplay name of the passer – the FIRST participant in that role on the play.
ep_beforedouble
ep_afterdouble
epadouble
wp_beforedouble
wp_afterdouble
wpadouble
completion_probdoubleModelled probability the pass is completed.
cpoedouble
model_pbp_versioncharacterVersion of the model-scored play-by-play build.
cp_model_versioncharacterVersion of the completion-probability model that scored the play.
ep_model_versioncharacterVersion of the expected-points model that scored the play.
wp_model_versioncharacterVersion of the win-probability model that scored the play.
scored_datecharacterDate on which the play was scored by the models.

Author

Saiem Gilani

Examples

# \donttest{
  try(load_espn_cfb_model_pbp(2004))
#> Warning: cannot open URL 'https://github.com/sportsdataverse/sportsdataverse-data/releases/download/espn_cfb_model_pbp/model_pbp_2004.rds': HTTP status was '404 Not Found'
#> Warning: Failed to readRDS from
#> <https://github.com/sportsdataverse/sportsdataverse-data/releases/download/espn_cfb_model_pbp/model_pbp_2004.rds>
#> ── college football model-enriched play-by-play from the SportsDataverse data re
#>  Data updated: 2026-09-10 05:49:53 UTC
#> # A tibble: 0 × 0
# }