Skip to contents
  • cfbd_drives(): Get college football game drives.

Get college football game drives

Usage

cfbd_drives(
  year,
  season_type = "regular",
  week = NULL,
  team = NULL,
  offense_team = NULL,
  defense_team = NULL,
  conference = NULL,
  offense_conference = NULL,
  defense_conference = NULL,
  division = "fbs"
)

Arguments

year

(Integer required): Year, 4 digit format (YYYY)

season_type

(String default regular): Season type - regular, postseason, both, allstar, spring_regular, spring_postseason

week

(Integer optional): Week - values from 1-15, 1-14 for seasons pre-playoff, i.e. 2013 or earlier

team

(String optional): D-I Team

offense_team

(String optional): Offense D-I Team

defense_team

(String optional): Defense D-I Team

conference

(String optional): DI Conference abbreviation - Select a valid FBS conference Conference abbreviations P5: ACC, B12, B1G, SEC, PAC Conference abbreviations G5 and FBS Independents: CUSA, MAC, MWC, Ind, SBC, AAC

offense_conference

(String optional): Offense DI Conference abbreviation - Select a valid FBS conference Conference abbreviations P5: ACC, B12, B1G, SEC, PAC Conference abbreviations G5 and FBS Independents: CUSA, MAC, MWC, Ind, SBC, AAC

defense_conference

(String optional): Defense DI Conference abbreviation - Select a valid FBS conference Conference abbreviations P5: ACC, B12, B1G, SEC, PAC Conference abbreviations G5 and FBS Independents: CUSA, MAC, MWC, Ind, SBC, AAC

division

(String optional): Division abbreviation - Select a valid division: fbs/fcs/ii/iii

Value

cfbd_drives() - A data frame with 28 variables:

col_nametypesdescription
offensecharacterDrive offense team name.
offense_conferencecharacterDrive offense team's conference.
defensecharacterDrive defense team name.
defense_conferencecharacterDrive defense team's conference.
game_idintegerUnique CFBD game identifier.
drive_idcharacterUnique CFBD drive identifier.
drive_numberintegerDrive number within the game.
scoringlogicalFlag indicating whether the drive ended in a score.
start_periodintegerPeriod (quarter) in which the drive starts.
start_yardlineintegerYard line at the drive start.
start_yards_to_goalintegerYards-to-goal at the drive start.
end_periodintegerPeriod (quarter) in which the drive ends.
end_yardlineintegerYard line at drive end.
end_yards_to_goalintegerYards-to-goal at drive end.
playsintegerNumber of plays in the drive.
yardsintegerTotal yards gained on the drive.
drive_resultcharacterResult of the drive (e.g. TD, FG, PUNT).
is_home_offenselogicalFlag indicating whether the offense on the field is the home team.
start_offense_scorenumericOffense score at the start of the drive.
start_defense_scorenumericDefense score at the start of the drive.
end_offense_scorenumericOffense score at the end of the drive.
end_defense_scorenumericDefense score at the end of the drive.
time_minutes_startintegerGame clock minutes at drive start.
time_seconds_startintegerGame clock seconds at drive start.
time_minutes_endintegerGame clock minutes at drive end.
time_seconds_endintegerGame clock seconds at drive end.
time_minutes_elapsednumericMinutes elapsed during the drive.
time_seconds_elapsedintegerSeconds elapsed during the drive.

Details

Get college football game drives

cfbd_drives(year = 2018, week = 1, team = "TCU")

cfbd_drives(2018, team = "Texas A&M", defense_conference = "SEC")

Examples

# \donttest{
  try(cfbd_drives(year=2018, week = 1, team = "TCU"))
#> ── Drives data from CollegeFootballData.com ────────────────── cfbfastR 2.3.0 ──
#>  Data updated: 2026-06-09 19:57:43 UTC
#> # A tibble: 25 × 28
#>    drive_id      game_id offense  offense_conference defense  defense_conference
#>    <chr>           <int> <chr>    <chr>              <chr>    <chr>             
#>  1 4010130721  401013072 TCU      Big 12             Southern SWAC              
#>  2 4010130722  401013072 Southern SWAC               TCU      Big 12            
#>  3 4010130723  401013072 TCU      Big 12             Southern SWAC              
#>  4 4010130724  401013072 Southern SWAC               TCU      Big 12            
#>  5 4010130725  401013072 TCU      Big 12             Southern SWAC              
#>  6 4010130726  401013072 Southern SWAC               TCU      Big 12            
#>  7 4010130727  401013072 TCU      Big 12             Southern SWAC              
#>  8 4010130728  401013072 Southern SWAC               TCU      Big 12            
#>  9 4010130729  401013072 TCU      Big 12             Southern SWAC              
#> 10 40101307210 401013072 Southern SWAC               TCU      Big 12            
#> # ℹ 15 more rows
#> # ℹ 22 more variables: drive_number <int>, scoring <lgl>, start_period <int>,
#> #   start_yardline <int>, start_yards_to_goal <int>, end_period <int>,
#> #   end_yardline <int>, end_yards_to_goal <int>, plays <int>, yards <int>,
#> #   drive_result <chr>, is_home_offense <lgl>, start_offense_score <int>,
#> #   start_defense_score <int>, end_offense_score <int>,
#> #   end_defense_score <int>, time_minutes_start <int>, …

  try(cfbd_drives(2018, team = "Texas A&M", defense_conference = "SEC"))
#> ── Drives data from CollegeFootballData.com ────────────────── cfbfastR 2.3.0 ──
#>  Data updated: 2026-06-09 19:57:44 UTC
#> # A tibble: 259 × 28
#>    drive_id      game_id offense   offense_conference defense defense_conference
#>    <chr>           <int> <chr>     <chr>              <chr>   <chr>             
#>  1 4010122581  401012258 Northwes… Southland          Texas … SEC               
#>  2 4010122583  401012258 Northwes… Southland          Texas … SEC               
#>  3 4010122585  401012258 Northwes… Southland          Texas … SEC               
#>  4 4010122587  401012258 Northwes… Southland          Texas … SEC               
#>  5 4010122589  401012258 Northwes… Southland          Texas … SEC               
#>  6 40101225811 401012258 Northwes… Southland          Texas … SEC               
#>  7 40101225813 401012258 Northwes… Southland          Texas … SEC               
#>  8 40101225815 401012258 Northwes… Southland          Texas … SEC               
#>  9 40101225817 401012258 Northwes… Southland          Texas … SEC               
#> 10 40101225819 401012258 Northwes… Southland          Texas … SEC               
#> # ℹ 249 more rows
#> # ℹ 22 more variables: drive_number <int>, scoring <lgl>, start_period <int>,
#> #   start_yardline <int>, start_yards_to_goal <int>, end_period <int>,
#> #   end_yardline <int>, end_yards_to_goal <int>, plays <int>, yards <int>,
#> #   drive_result <chr>, is_home_offense <lgl>, start_offense_score <int>,
#> #   start_defense_score <int>, end_offense_score <int>,
#> #   end_defense_score <int>, time_minutes_start <int>, …
# }