clean_pbp_dat: Clean Play-by-Play data Cleans Play-by-Play data pulled from...

Description Usage Arguments Details Value

View source: R/helper_pbp_clean_pbp_dat.R

Description

Clean Play-by-Play data Cleans Play-by-Play data pulled from the API's raw game data

Usage

1
clean_pbp_dat(play_df)

Arguments

play_df

(data.frame required): Performs data cleansing on Play-by-Play DataFrame, as pulled from 'cfb_pbp_data()'

Details

Requires the following columns to be present

game_id

.

id_play

.

offense_play

.

defense_play

.

home

.

away

.

play_type

.

play_text

.

kickoff_play

.

down

.

distance

.

yards_gained

.

yards_to_goal

.

change_of_poss

.

penalty_1st_conv

.

off_timeouts_rem_before

.

def_timeouts_rem_before

.

Value

The original 'play_df' with the following columns appended/redefined:

scoring_play

.

td_play

.

touchdown

.

safety

.

fumble_vec

.

kickoff_play

.

kickoff_tb

.

kickoff_onside

.

kickoff_oob

.

kickoff_fair_catch

.

kickoff_downed

.

kick_play

.

kickoff_safety

.

punt

.

punt_play

.

punt_tb

.

punt_oob

.

punt_fair_catch

.

punt_downed

.

rush

.

pass

.

sack_vec

.

play_type

.

td_check

.

id_play

.

sack

.

int

.

int_td

.

completion

.

pass_attempt

.

target

.

pass_td

.

rush_td

.

turnover_vec

.

offense_score_play

.

defense_score_play

.

downs_turnover

.

scoring_play

.

fg_inds

.

yds_fg

.

yards_to_goal

.

lag_play_type3

.

lag_play_type2

.

lag_play_type

.

lead_play_type

.

lead_play_type2

.

lead_play_type3

.


meysubb/cfbscrapR documentation built on Dec. 15, 2020, 11:26 p.m.