-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rethink Player Stats Logic #445
Comments
Yep this makes more sense |
Thought about this for a while and there are several design decisions to be made.
My current thought process is something like this : calculate_stats <- function(seasons = nflreadr::most_recent_season(),
summary_level = c("season", "week"),
stat_type = c("player", "team")){
pbp <- nflreadr::load_pbp(seasons = seasons)
playstats <- # a load_pbp pendant for playstats from https://github.com/nflverse/nflverse-pbp/releases/download/playstats/play_stats_{season}.rds
# set grouping variables based off summary_level and stat_type
#
# sumarise epa stats and dakota using pbp
#
# summarise all other stats using playstats. That's a big call to summarise
# where we create all sorts of stats with the various stat IDs
#
# load player data if stat_type is player to joing player info
#
# join everything
} |
This all sounds logical to me! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We see new issues in #444 and already had lots of problems caused by the fact that we summarize play stats into a tidy form.
I think for player stats, we should make a transition to a new concept.
We load raw game data, extract the play stats and row bind them. This will make it pretty easy and straightforward to correctly summarize player stats and team stats.
The text was updated successfully, but these errors were encountered: