Skip to content

Commit

Permalink
Fix pbp_pass YAC, closes #19 (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
tanho63 authored Aug 9, 2024
1 parent d9329ab commit ccae89c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
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

0 comments on commit ccae89c

Please sign in to comment.