Skip to contents

Loads season-level player box scores – one row per player-game- category with the stat lines ESPN publishes per game. Published to the espn_cfb_player_box release tag on the sportsdataverse-data repo.

Usage

load_espn_cfb_player_box(
  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
stat_1characterFirst value of ESPN's raw athlete stats array, written only when the category's key list does not line up with the stats list; on those rows the named per-category columns are all null.
stat_2characterSecond value of ESPN's raw athlete stats array, written only on rows where the category keys did not line up and the named columns could not be filled.
stat_3characterThird value of ESPN's raw athlete stats array, written only on rows where the category keys did not line up and the named columns could not be filled.
stat_4characterFourth value of ESPN's raw athlete stats array, written only on rows where the category keys did not line up and the named columns could not be filled.
stat_5characterFifth value of ESPN's raw athlete stats array, written only on rows where the category keys did not line up and the named columns could not be filled.
categorycharacter
athlete_idinteger
athlete_namecharacter
jerseycharacter
team_idinteger
rushingAttemptscharacterRushing attempts.
rushingYardscharacterNet rushing yards gained.
yardsPerRushAttemptcharacterYards gained per rushing attempt.
rushingTouchdownscharacterRushing touchdowns.
longRushingcharacterLongest rush of the game, in yards.
receptionscharacter
receivingYardscharacterReceiving yards gained.
yardsPerReceptioncharacterYards gained per reception.
receivingTouchdownscharacterReceiving touchdowns.
longReceptioncharacterLongest reception of the game, in yards.
fumblescharacter
fumblesLostcharacter
fumblesRecoveredcharacter
kickReturnscharacter
kickReturnYardscharacter
yardsPerKickReturncharacter
longKickReturncharacter
kickReturnTouchdownscharacter
puntReturnscharacterPunt returns attempted.
puntReturnYardscharacterYards gained on punt returns.
yardsPerPuntReturncharacterYards gained per punt return.
longPuntReturncharacterLongest punt return of the game, in yards.
puntReturnTouchdownscharacterTouchdowns scored on punt returns.
fieldGoalsMade/fieldGoalAttemptscharacterField goals made and attempted, as ESPN's combined string.
fieldGoalPctcharacterField-goal percentage.
longFieldGoalMadecharacterLongest field goal made, in yards.
extraPointsMade/extraPointAttemptscharacterExtra points made and attempted, as ESPN's combined string.
totalKickingPointscharacterTotal points scored by kicking.
puntscharacterPunts attempted.
puntYardscharacterTotal punt yards.
grossAvgPuntYardscharacterGross average yards per punt, before return yardage.
touchbackscharacterPunts or kickoffs that resulted in a touchback.
puntsInside20characterPunts downed inside the opponent 20-yard line.
longPuntcharacterLongest punt of the game, in yards.
game_idinteger
seasoninteger
interceptionscharacter
interceptionYardscharacterYards returned on interceptions.
interceptionTouchdownscharacterTouchdowns scored on interception returns.
totalTacklescharacter
soloTacklescharacter
sackscharacter
tacklesForLosscharacter
passesDefendedcharacter
hurriescharacter
defensiveTouchdownscharacter
completions/passingAttemptscharacterCompletions and pass attempts, as ESPN's combined string.
passingYardscharacterNet passing yards gained.
yardsPerPassAttemptcharacterYards gained per pass attempt.
passingTouchdownscharacterPassing touchdowns.
adjQBRcharacterAdjusted Total QBR for the quarterback.

Author

Saiem Gilani

Examples

# \donttest{
  try(load_espn_cfb_player_box(2004))
#> ── ESPN college football player box scores from the SportsDataverse data repo ──
#>  Data updated: 2026-09-10 05:50:06 UTC
#> # A tibble: 23,981 × 46
#>    completions/passingAttem…¹ passingYards yardsPerPassAttempt passingTouchdowns
#>    <chr>                      <chr>        <chr>               <chr>            
#>  1 19/29                      272          9.4                 3                
#>  2 NA                         NA           NA                  NA               
#>  3 NA                         NA           NA                  NA               
#>  4 NA                         NA           NA                  NA               
#>  5 NA                         NA           NA                  NA               
#>  6 NA                         NA           NA                  NA               
#>  7 NA                         NA           NA                  NA               
#>  8 NA                         NA           NA                  NA               
#>  9 NA                         NA           NA                  NA               
#> 10 NA                         NA           NA                  NA               
#> # ℹ 23,971 more rows
#> # ℹ abbreviated name: ¹​`completions/passingAttempts`
#> # ℹ 42 more variables: interceptions <chr>, adjQBR <chr>, category <chr>,
#> #   athlete_id <int>, athlete_name <chr>, jersey <lgl>, team_id <int>,
#> #   rushingAttempts <chr>, rushingYards <chr>, yardsPerRushAttempt <chr>,
#> #   rushingTouchdowns <chr>, longRushing <chr>, receptions <chr>,
#> #   receivingYards <chr>, yardsPerReception <chr>, receivingTouchdowns <chr>, …
# }