Skip to contents

Extract college football (D-I) play by play Data - for plays

Usage

cfbd_pbp_data(
  year,
  season_type = "regular",
  week = 1,
  team = NULL,
  play_type = NULL,
  epa_wpa = FALSE,
  ...
)

Arguments

year

Select year, (example: 2018)

season_type

Select Season Type (regular, postseason, both)

week

Select week, this is optional (also numeric)

team

Select team name (example: Texas, Texas A&M, Clemson)

play_type

Select play type (example: see the cfbd_play_type_df)

epa_wpa

Logical parameter (TRUE/FALSE) to return the Expected Points Added/Win Probability Added variables

...

Additional arguments passed to an underlying function.

Value

A data frame with 351 variables:

season: double.

.

wk: double.

.

id_play: character.

.

game_id: integer.

.

game_play_number: double.

.

half_play_number: double.

.

pos_team: character.

.

def_pos_team: character.

.

half: integer.

.

period: integer.

.

clock.minutes: integer.

.

clock.seconds: integer.

.

play_type: character.

.

play_text: character.

.

down: double.

.

distance: double.

.

yards_to_goal: double.

.

yards_gained: double.

.

penalty_1st_conv: logical.

.

new_series: double.

.

change_of_pos_team: double.

.

lag_change_of_pos_team: double.

.

orig_play_type: character.

.

lead_play_type: character.

.

lag_play_type: character.

.

lag_play_type2: character.

.

lag_play_type3: character.

.

row: integer.

.

drive_play_number: double.

.

drive_event_number: double.

.

lag_play_text: character.

.

lag_play_text2: character.

.

lead_play_text: character.

.

firstD_by_kickoff: double.

.

firstD_by_poss: double.

.

firstD_by_penalty: double.

.

firstD_by_yards: double.

.

lag_first_by_penalty: double.

.

lag_first_by_penalty2: double.

.

lag_first_by_yards: double.

.

lag_first_by_yards2: double.

.

first_by_penalty: double.

.

first_by_yards: double.

.

play_after_turnover: double.

.

lag_change_of_poss: double.

.

lag_kickoff_play: double.

.

lag_punt: double.

.

lag_scoring_play: double.

.

lag_turnover_vec: double.

.

lag_downs_turnover: double.

.

lag_defense_score_play: double.

.

EPA: double.

.

ep_before: double.

.

ep_after: double.

.

wpa: double.

.

wp_before: double.

.

wp_after: double.

.

def_wp_before: double.

.

def_wp_after: double.

.

penalty_detail: character.

.

yds_penalty: double.

.

downs_turnover: double.

.

turnover: double.

.

pos_score_diff_start: double.

.

pos_score_pts: double.

.

pos_team_score: integer.

.

def_pos_team_score: integer.

.

log_ydstogo: double.

.

ExpScoreDiff: double.

.

ExpScoreDiff_Time_Ratio: double.

.

half_clock.minutes: double.

.

TimeSecsRem: double.

.

adj_TimeSecsRem: double.

.

Goal_To_Go: logical.

.

Under_two: logical.

.

home: character.

.

away: character.

.

home_wp_before: double.

.

away_wp_before: double.

.

home_wp_after: double.

.

away_wp_after: double.

.

end_of_half: double.

.

pos_team_receives_2H_kickoff: double.

.

lead_pos_team: character.

.

lag_pos_team: character.

.

Under_three: logical.

.

down_end: integer.

.

distance_end: double.

.

log_ydstogo_end: double.

.

yards_to_goal_end: double.

.

TimeSecsRem_end: double.

.

Goal_To_Go_end: logical.

.

Under_two_end: logical.

.

def_EPA: double.

.

offense_score_play: double.

.

defense_score_play: double.

.

ppa: character.

.

yard_line: integer.

.

scoring: logical.

.

pos_team_timeouts_rem_before: double.

.

def_pos_team_timeouts_rem_before: double.

.

pos_team_timeouts: integer.

.

def_pos_team_timeouts: integer.

.

pos_score_diff: integer.

.

pos_score_diff_start_end: double.

.

offense_play: character.

.

defense_play: character.

.

offense_receives_2H_kickoff: double.

.

change_of_poss: double.

.

score_pts: double.

.

score_diff_start: double.

.

score_diff: integer.

.

offense_score: integer.

.

defense_score: integer.

.

offense_conference: character.

.

defense_conference: character.

.

off_timeout_called: double.

.

def_timeout_called: double.

.

offense_timeouts: integer.

.

defense_timeouts: integer.

.

off_timeouts_rem_before: double.

.

def_timeouts_rem_before: double.

.

rusher_player_name: character.

.

yds_rushed: double.

.

passer_player_name: character.

.

receiver_player_name: character.

.

yds_receiving: double.

.

yds_sacked: double.

.

sack_players: character.

.

sack_player_name: character.

.

sack_player_name2: character.

.

pass_breakup_player_name: character.

.

interception_player_name: character.

.

yds_int_return: double.

.

fumble_player_name: character.

.

fumble_forced_player_name: character.

.

fumble_recovered_player_name: character.

.

yds_fumble_return: double.

.

punter_player_name: character.

.

yds_punted: double.

.

punt_returner_player_name: character.

.

yds_punt_return: double.

.

yds_punt_gained: double.

.

punt_block_player_name: character.

.

punt_block_return_player_name: character.

.

fg_kicker_player_name: character.

.

yds_fg: double.

.

fg_block_player_name: character.

.

fg_return_player_name: character.

.

kickoff_player_name: character.

.

yds_kickoff: double.

.

kickoff_returner_player_name: character.

.

yds_kickoff_return: double.

.

new_id: double.

.

orig_drive_number: integer.

.

drive_number: integer.

.

drive_result_detailed: character.

.

new_drive_pts: double.

.

drive_id: double.

.

drive_result: character.

.

drive_start_yards_to_goal: double.

.

drive_end_yards_to_goal: integer.

.

drive_yards: integer.

.

drive_scoring: double.

.

drive_pts: double.

.

drive_start_period: integer.

.

drive_end_period: integer.

.

drive_time_minutes_start: integer.

.

drive_time_seconds_start: integer.

.

drive_time_minutes_end: integer.

.

drive_time_seconds_end: integer.

.

drive_time_minutes_elapsed: integer.

.

drive_time_seconds_elapsed: integer.

.

drive_numbers: double.

.

number_of_drives: double.

.

pts_scored: double.

.

drive_result_detailed_flag: character.

.

drive_result2: character.

.

drive_num: double.

.

lag_drive_result_detailed: character.

.

lead_drive_result_detailed: character.

.

lag_new_drive_pts: double.

.

id_drive: character.

.

rush: double.

.

rush_td: double.

.

pass: double.

.

pass_td: double.

.

completion: double.

.

pass_attempt: double.

.

target: double.

.

sack_vec: double.

.

sack: double.

.

int: double.

.

int_td: double.

.

turnover_vec: double.

.

turnover_vec_lag: double.

.

turnover_indicator: double.

.

kickoff_play: double.

.

receives_2H_kickoff: double.

.

missing_yard_flag: logical.

.

scoring_play: double.

.

td_play: double.

.

touchdown: double.

.

safety: double.

.

fumble_vec: double.

.

kickoff_tb: double.

.

kickoff_onside: double.

.

kickoff_oob: double.

.

kickoff_fair_catch: double.

.

kickoff_downed: double.

.

kickoff_safety: double.

.

kick_play: double.

.

punt: double.

.

punt_play: double.

.

punt_tb: double.

.

punt_oob: double.

.

punt_fair_catch: double.

.

punt_downed: double.

.

punt_safety: double.

.

punt_blocked: double.

.

penalty_safety: double.

.

fg_inds: double.

.

fg_made: logical.

.

fg_make_prob: double.

.

home_EPA: double.

.

away_EPA: double.

.

home_EPA_rush: double.

.

away_EPA_rush: double.

.

home_EPA_pass: double.

.

away_EPA_pass: double.

.

total_home_EPA: double.

.

total_away_EPA: double.

.

total_home_EPA_rush: double.

.

total_away_EPA_rush: double.

.

total_home_EPA_pass: double.

.

total_away_EPA_pass: double.

.

net_home_EPA: double.

.

net_away_EPA: double.

.

net_home_EPA_rush: double.

.

net_away_EPA_rush: double.

.

net_home_EPA_pass: double.

.

net_away_EPA_pass: double.

.

success: double.

.

epa_success: double.

.

rz_play: double.

.

scoring_opp: double.

.

middle_8: logical.

.

stuffed_run: double.

.

spread: double.

.

formatted_spread: character.

.

No_Score_before: double.

.

FG_before: double.

.

Opp_FG_before: double.

.

Opp_Safety_before: double.

.

Opp_TD_before: double.

.

Safety_before: double.

.

TD_before: double.

.

No_Score_after: double.

.

FG_after: double.

.

Opp_FG_after: double.

.

Opp_Safety_after: double.

.

Opp_TD_after: double.

.

Safety_after: double.

.

TD_after: double.

.

penalty_flag: logical.

.

penalty_declined: logical.

.

penalty_no_play: logical.

.

penalty_offset: logical.

.

penalty_text: logical.

.

penalty_play_text: character.

.

lead_wp_before2: double.

.

wpa_half_end: double.

.

wpa_base: double.

.

wpa_base_nxt: double.

.

wpa_change: double.

.

wpa_change_nxt: double.

.

wpa_base_ind: double.

.

wpa_base_nxt_ind: double.

.

wpa_change_ind: double.

.

wpa_change_nxt_ind: double.

.

lead_wp_before: double.

.

lead_pos_team2: character.

.

lag_change_of_pos_team2: double.

.

lag_punt2: double.

.

lag_score_diff: double.

.

lag_offense_play: character.

.

lead_offense_play: character.

.

lead_offense_play2: character.

.

lag_pos_score_diff: double.

.

lag_off_timeouts: double.

.

lag_def_timeouts: double.

.

lag_TimeSecsRem2: double.

.

lag_TimeSecsRem: double.

.

lead_TimeSecsRem: double.

.

lead_TimeSecsRem2: double.

.

lag_yards_to_goal2: integer.

.

lag_yards_to_goal: integer.

.

lead_yards_to_goal: double.

.

lead_yards_to_goal2: integer.

.

lag_down2: double.

.

lag_down: double.

.

lead_down: double.

.

lead_down2: double.

.

lead_distance: double.

.

lead_distance2: integer.

.

lead_play_type2: character.

.

lead_play_type3: character.

.

lag_ep_before3: double.

.

lag_ep_before2: double.

.

lag_ep_before: double.

.

lead_ep_before: double.

.

lead_ep_before2: double.

.

lag_ep_after: double.

.

lag_ep_after2: double.

.

lag_ep_after3: double.

.

lead_ep_after: double.

.

lead_ep_after2: double.

.

play_number: integer.

.

over_under: double.

.

event: double.

.

game_event_number: double.

.

game_row_number: integer.

.

half_event: double.

.

half_event_number: double.

.

half_row_number: integer.

.

lag_distance3: integer.

.

lag_distance2: integer.

.

lag_distance: integer.

.

lag_yards_gained3: integer.

.

lag_yards_gained2: integer.

.

lag_yards_gained: integer.

.

lead_yards_gained: integer.

.

lead_yards_gained2: integer.

.

lag_play_text3: character.

.

lead_play_text2: character.

.

lead_play_text3: character.

.

lag_change_of_poss2: double.

.

lag_change_of_poss3: double.

.

lag_change_of_pos_team3: double.

.

lag_kickoff_play2: double.

.

lag_kickoff_play3: double.

.

lag_punt3: double.

.

lag_scoring_play2: double.

.

lag_scoring_play3: double.

.

lag_turnover_vec2: double.

.

lag_turnover_vec3: double.

.

lag_downs_turnover2: double.

.

lag_downs_turnover3: double.

.

drive_event: double.

.

lag_first_by_penalty3: double.

.

lag_first_by_yards3: double.

.