meysubb / cfbscrapR-archived

CFB R Package
GNU General Public License v3.0
25 stars 9 forks source link

Sg penalty #33

Closed saiemgilani closed 4 years ago

saiemgilani commented 4 years ago

clean_pbp.R

  1. Add penalty declined flag
  2. Add penalty no play flag
  3. Add penalty off-setting flag
  4. Add penalty 1st down conversion flag
  5. Add comments/fix style stuff?

ep_calcs.R

  1. Add order_by = id_play to all lead functions out of caution.

  2. Add negligibly important penalty vector and move all play_type vecs to start of function

  3. Add penalty logic to pred_df_epa2 function for the following variables:

    • new_down
    • new_distance
    • new_yardline
  4. return penalty_flag and penalty_declined columns from prep_df_epa2 into return df from cfb_pbp_data function.

  5. remove kickoff down ==5 ifelse statement. It doesn't feel like it needs to be in there and causes problems as is. Was introduced into the prep_df_epa2 function code 4 days ago, not sure why.

meysubb commented 4 years ago

Fixed merge conflicts. Good to go.

Updated version to 0.1.3 - includes turnover/punt fix