-
Notifications
You must be signed in to change notification settings - Fork 51
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
Calculate Defense Player Stats #288
Conversation
…ing on some stuff and also to get my noob code ready for seasons and weeks.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
more globally, every NSE variable will need .data$ prefixed to it for CRAN purposes, e.g. every time you use a column name without quotations |
The principle way We need a way to write the pivot_longer, pivot_wider calls (which are nice btw) to do it per game rather than directly across the complete dataset |
OK I started updating this. I have removed irrelevant stuff and added a function that can be used to sum across columns using tidyselect variable delection to avoid crashes if a stat is missing. I also redid the principle counting of tackling stats and implemented a weekly summary. I'd like to use this method for all other stats as well so to be able to summarise over weeks optionally. |
Spent a stream working through this. TODO:
|
…tR-1 into christianlohr9-formidable
Fumble stats refactored for season week distinction. |
Thanks for writing this, @christianlohr9 ! If either @mrcaseb or @tanho63 can push a commit updating |
I'm unavailable, but @christianlohr9 is the branch owner and should be able to add it to the branch directly! |
I just finished work on that function and tested it. Tell me how I submit anything new as branch owner (sorry Tan, I'm a noob :( ) and I will do so :D |
So @tanho63 are you in agreement in saying that this function needs a decent philosophical upgrade/re-write? Right now I'm seeing like 20 references to |
I think before the next update gets pushed, it will be helpful to clarify what we should do with the side-of-the-ball issue, especially for those variables that are presently repeats of |
…nfo analog offensive stats
Most recent commit
To-Do
|
I don't care what it's named that much but think the current name is fine since it comes up in autocomplete immediately after the current (offense) version.
In hindsight we can be lazy and solve this by naming everything with |
FWIW I like putting def_ in front of everything that is already included in the current |
Hm I think we'll put |
also delineates def_tackles from st_tackles later. Penalty code currently checks for penalty_team = defteam which to me means defensive penalties only. |
Yeah I guess it could just get a bit confusing when that happens on "special teams plays". I knew of specific instances where it was counting special teams penalties when the player was on the defensive side of the ball. |
Naming finalized as discussed.
Problem to resolve sometime later, let's ship this. Waiting on @mrcaseb review. |
@tanho63 we will merge another PR soon that will cause conflicts with NEWS. Can you merge when it is in? |
Yep, just gimme a PR content review when you get a chance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go with this now
Thanks for all of the hard work and feedback, everyone! |
Please note that I just saw in line 618 still is a static year. Let @mrcaseb fix this, he has nothing else to do anyways :)
This script only works season long if the season is pre defined. Working on some stuff and also to get my noob code ready for seasons and weeks.