if (FALSE) {
library(dplyr)
df0 <- do_divide_court_zones(acb_shooting_data_2425)
df1 <- do_filter_data(df0, "2024-2025", "", "", "", "", "")
# LEAGUE METRICS:
shots_stats <- do_shots_stats(df1, df0)
summary_shots_zone_lg <- shots_stats$summary_shots_zone
summary_shots_zone_league <- summary_shots_zone_lg %>%
mutate(pps_league = ifelse(location_color == "2pt",
(2 * count) / total,
(3 * count) / total)) %>%
select(location, perc_league = perc, pps_league)
# PLAYER METRICS:
df1 <- do_filter_data(df0, "2024-2025", "", "", "", "", "D. Ennis")
shots_stats <- do_shots_stats(df1, df0)
all_shots_pl <- shots_stats$all_shots
summary_shots_zone_pl <- shots_stats$summary_shots_zone
res_grad <- do_prepare_data_gradient(all_shots_pl, summary_shots_zone_pl, summary_shots_zone_league)
}
Run the code above in your browser using DataLab