Skip to content

Instantly share code, notes, and snippets.

@jthomasmock
Last active November 9, 2022 00:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jthomasmock/24645bb156f74b186a3c9bae4225ff51 to your computer and use it in GitHub Desktop.
Save jthomasmock/24645bb156f74b186a3c9bae4225ff51 to your computer and use it in GitHub Desktop.
library(dplyr)
raw_metrics <- espnscrapeR::get_espn_wr_metrics()
raw_metrics |> glimpse()
raw_metrics |>
group_by(gsis_id) |>
summarise(across(c(overall:rtm_targets, yds), mean),
across(ends_with("nm"), unique)) |>
mutate(score_rank = rank(overall), yds_rt = yds/rtm_routes) |>
filter(full_nm == "Chase Claypool") |>
select(full_nm, score_rank, overall:yac_score, yds_rt)
#> # A tibble: 1 × 7
#> full_nm score_rank overall open_score catch_score yac_score yds_rt
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 Chase Claypool 240 55.2 57.4 46.8 54.2 1.79
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment