All functions |
|
---|---|
add_receiver_target_rates calculate how frequently receivers are targeted in entire dataset |
|
add_throw_vector_to_positions takes player positions at release along with throw information to calculate how close the player is to the throw |
|
aggregate_week_files aggregate all of the PBP data |
|
build_final_leaderboard The top-15 leaderboard in the final report |
|
build_raw_stat_table Get data on speed, acceleration to use in shiny app |
|
build_target_prob_tune_results function to create target prob tuning results from stored file |
|
build_target_results output all of the results of the target models to be used |
|
build_weather_df returns a dataframe with parsed weather information for each gameId |
|
catch_prob_diagnostic_plots make catch prob model diagnostic plots |
|
connect_to_heroku_postgres |
|
convert_secret |
|
create_throw_vectors returns a data frame with throw vectors |
|
divvy_credit divvy credit between defenders |
|
do_catch_prob_arrival_feat_eng build a data frame of catch prob features |
|
do_catch_prob_throw_feat_eng build a data frame of catch prob features |
|
do_target_prob_feat_eng build a data frame of target prob features |
|
fit_catch_prob_xgb fit the xgboost catch prob model |
|
fit_logit_platt_scaler fit the Platt scaler to calibrate the xgboost predictions |
|
fit_logit_target_platt_scaler fit the Platt scaler to calibrate the xgboost predictions |
|
fit_prior_target_prob create an estimate of the likelihood a receiver is targeted before the play starts |
|
fit_target_prob_rf fit the rf target prob model |
|
fit_target_prob_xgb fit the xgb target prob model |
|
full feature engineering and classification for man v zone coverages WARNING: this takes a lot of time to run |
|
get_constants get project-wide constants |
|
get_defense_locs_at_arrival returns a data from of the locations of the defense at throw time |
|
get_defense_locs_at_throw returns a data from of the locations of the defense at throw time |
|
|
get_football_location_at_arrival returns a data frame of the location of the football on each play |
get_football_locations get a data frame of the location of the football on each play |
|
get_heights returns a data frame of player heights |
|
get_max_throw_velo returns a data frame of maximum throw velos for each play |
|
get_pi_and_sack returns a data frame of pass interferences and sacks |
|
get_play_outcomes returns a data frame of play outcomes |
|
get_target_location_at_arrival returns a data frame of the locations of the targeted receiver at throw time on each play |
|
get_target_location_at_throw returns a data frame of the locations of the targeted receiver at throw time on each play |
|
get_targeted_receiver get a data frame of the targeted receiver on each play |
|
get_throw_dists returns a data frame of throw distances on each play |
|
get_weather return the weather forecast in a given week |
|
gt_theme_538 the Fivethirtyeight GT theme Credit to Thomas Mock: https://themockup.blog/posts/2020-09-26-functions-and-themes-for-gt-tables/#fivethirtyeight |
|
heroku_postgres_inserts |
|
load_encrypted |
|
load_key_and_nonce |
|
load_player_summary_table Function that builds the overall results |
|
make_catch_prob_table makes the drops added table |
|
make_tendency_table makes the deterrence table |
|
read_from_data load data from csv file |
|
read_individual_week load a single week of PBP data |
|
read_non_week_files read all of the non-PBP data |
|
read_pff load PFF grades |
|
recalc_prob recalculate the catch probabilities after removing a defender |
|
run_catch_prob_tuning_pipeline runs the catch prob tuning pipeline |
|
run_catch_prob_tuning_pipeline runs the catch prob tuning pipeline |
|
run_target_prob_tuning_pipeline pipeline for target prob model |
|
save_encrypted |
|
standardize_position_coordinates Takes raw position data and normalizes it so that drives only go one way and X coordinates are relative to goal line rather than back of end zone |
|
stepwise_catch_prob_predict Make calibrated predictions from xgboost + Platt scaling |
|
stepwise_target_prob_predict Make calibrated predictions from rf + Platt scaling |
|
stepwise_target_prob_predict Make calibrated predictions from rf + Platt scaling |
|
target_prob_diagnostic_plots same diagnostic plots for target probs |
|
tune_catch_prob_xgb tune the xgboost catch prob model |
|
tune_target_prob_rf tune the rf target prob model |
|
tune_target_prob_xgb tune the XGB target probability model TODO: actually document this rather than just copy paste |