Skip to contents

Get individual passing plays with air yards, YAC and location detail

Usage

cfbd_passing_plays(
  year = NULL,
  team = NULL,
  week = NULL,
  game_id = NULL,
  season_type = NULL,
  offense = NULL,
  defense = NULL,
  conference = NULL,
  passer_id = NULL,
  target_id = NULL,
  outcome = NULL,
  classification = NULL
)

Arguments

year

(Integer required): Year, 4 digit format (YYYY)
Minimum value accepted: 2025

team

(String optional): D-I Team

week

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

game_id

(Integer optional): Game ID filter for querying a single game

season_type

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

offense

(String optional): Offensive team filter

defense

(String optional): Defensive team filter

conference

(String optional): Conference abbreviation - Select a valid FBS conference

passer_id

(String optional): CFBD athlete id of the passer to filter on.

target_id

(String optional): CFBD athlete id of the targeted receiver to filter on.

outcome

(String optional): Pass outcome - completion, incompletion, interception

classification

(String optional): Division classification - fbs, fcs, ii, ii/iii, iii

Value

cfbd_passing_plays() - A data frame with 39 variables:

col_nametypedescription
game_idintegerUnique game identifier - game_id.
play_idcharacterUnique play identifier - play_id.
drive_idcharacterUnique drive identifier - drive_id.
seasonintegerFour-digit season year (e.g. 2025).
weekintegerWeek of the season.
season_typecharacterSeason type (regular, postseason, ...).
offense_idintegerOffensive team id.
offensecharacterOffensive team name.
offense_conferencecharacterOffensive team conference name.
defense_idintegerDefensive team id.
defensecharacterDefensive team name.
defense_conferencecharacterDefensive team conference name.
periodintegerQuarter of the play.
clock_minutesintegerMinutes remaining on the game clock at the snap.
clock_secondsintegerSeconds remaining on the game clock at the snap.
downintegerDown of the play (1-4).
distanceintegerYards to gain for a first down.
play_textcharacterPlay description text as published by the source.
passer_idcharacterCFBD athlete id of the passer.
passercharacterPasser full name.
target_idcharacterCFBD athlete id of the targeted receiver (NA when unparsed).
targetcharacterTargeted receiver full name (NA when unparsed).
outcomecharacterPass outcome - completion, incompletion or interception.
air_yardsintegerYards the ball travelled past the line of scrimmage.
pass_depthcharacterDepth bucket - short or deep (NA when unparsed).
pass_directioncharacterDirection bucket - left, middle or right (NA when unparsed).
pass_locationcharacterCombined depth + direction bucket, matching the locations_* split (NA when unparsed).
total_yardsintegerTotal yards gained on the play.
yards_after_catchintegerYards gained after the catch (NA when unparsed or incomplete).
start_yardlineintegerYard line the play started from, in the offense's frame of reference.
start_yards_to_goalintegerYards from the opponent's end zone at the snap.
target_yards_to_goalintegerYards from the opponent's end zone at the target point.
is_spikelogicalTRUE when the pass was a clock-stopping spike.
is_throwawaylogicalTRUE when the pass was a deliberate throwaway.
is_intentional_groundinglogicalTRUE when the play was flagged intentional grounding.
parse_statuscharacterHow completely CFBD parsed the play text for this row.
ppadoublePredicted points added on the play.
successlogicalTRUE when the play met the success threshold for its down and distance.
location_analysis_eligiblelogicalTRUE when the play is eligible to be counted in a location split.

Check a column before building on it. As of this writing CFBD has not populated play-level air_yards, yards_after_catch, pass_depth, pass_direction or pass_location at all – every value is NA, so R types those columns logical – while target is populated (1,976 of 2,003 week-5 2025 completions) and the SEASON aggregates in cfbd_passing_players_season() do carry air yards. Filter on location_analysis_eligible or parse_status rather than assuming a column holds values.

Examples

# \donttest{
  try(cfbd_passing_plays(year = 2025, week = 1, team = "Texas"))
#> ── Passing plays data from CollegeFootballData.com ────── cfbfastR 3.0.0.9000 ──
#> ℹ Data updated: 2026-09-30 21:50:36 UTC
#> # A tibble: 128 × 39
#>      game_id play_id        drive_id season  week season_type offense_id offense
#>        <int> <chr>          <chr>     <int> <int> <chr>            <int> <chr>  
#>  1 401752677 4017526771019… 4017526…   2025     1 regular            251 Texas  
#>  2 401752677 4017526771018… 4017526…   2025     1 regular            251 Texas  
#>  3 401752677 4017526771019… 4017526…   2025     1 regular            194 Ohio S…
#>  4 401752677 4017526771019… 4017526…   2025     1 regular            194 Ohio S…
#>  5 401752677 4017526771019… 4017526…   2025     1 regular            194 Ohio S…
#>  6 401752677 4017526771018… 4017526…   2025     1 regular            251 Texas  
#>  7 401752677 4017526771019… 4017526…   2025     1 regular            194 Ohio S…
#>  8 401752677 4017526771019… 4017526…   2025     1 regular            251 Texas  
#>  9 401752677 4017526771019… 4017526…   2025     1 regular            194 Ohio S…
#> 10 401752677 4017526771019… 4017526…   2025     1 regular            194 Ohio S…
#> # ℹ 118 more rows
#> # ℹ 31 more variables: offense_conference <chr>, defense_id <int>,
#> #   defense <chr>, defense_conference <chr>, period <int>, down <int>,
#> #   distance <int>, play_text <chr>, passer_id <chr>, passer <chr>,
#> #   target_id <chr>, target <chr>, outcome <chr>, air_yards <int>,
#> #   pass_depth <chr>, pass_direction <chr>, pass_location <chr>,
#> #   total_yards <int>, yards_after_catch <int>, start_yardline <int>, …
# }