Skip to content
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

Fix pbp_pass YAC, closes #19 #21

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
Package: ffopportunity
Title: Models for Fantasy Football Expected Points
Version: 0.1.0.06
Version: 0.1.0.07
Authors@R: c(
person("Joe", "Sydlowski", , "[email protected]", role = c("aut", "cre", "cph")),
person("Tan", "Ho", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0001-8388-5155"))
person("Tan", "Ho", , "[email protected]", role = "aut", comment = c(ORCID = "0000-0001-8388-5155"))
)
Description: Downloads expected fantasy points data from 'ffverse'
repositories if available, and otherwise builds up expected points
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
* Combine variants of ep_load into one function `ep_load()` with arguments
* Rename to ffopportunity
* Include spikes and kneel downs to tie out to official stats with `ep_summarize()`
* Fix YAC bug in pbp_pass data
3 changes: 1 addition & 2 deletions R/ep_preprocess.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ ep_preprocess <- function(pbp){
stringr::str_detect(.data$desc, " right") ~ "right",
stringr::str_detect(.data$desc, " middle") ~ "middle",
TRUE ~ "unk"),
yards_after_catch = dplyr::if_else(
.data$two_point_attempt == 1,0, .data$xpass),
yards_after_catch = dplyr::if_else(.data$two_point_attempt == 1, 0, .data$yards_after_catch),
air_yards = dplyr::if_else(
.data$two_point_attempt == 1, .data$yardline_100, .data$air_yards),
two_point_converted = dplyr::case_when(
Expand Down
Loading