OwenStOnge commited on
Commit
396532a
·
verified ·
1 Parent(s): 8f5c8ab

Update app.R

Browse files
Files changed (1) hide show
  1. app.R +3 -1
app.R CHANGED
@@ -13,6 +13,7 @@ library(curl)
13
  library(xgboost)
14
  library(recipes)
15
 
 
16
  stuffplus_model <- xgb.load("stuffplus_xgb.json")
17
  stuffplus_recipe <- readRDS("stuffplus_recipe.rds")
18
 
@@ -387,7 +388,8 @@ clean_college_data <- function(data, teams = NA){
387
  PitchCall == "InPlay" & PlayResult == "Triple" ~ "Triple",
388
  PitchCall == "InPlay" & PlayResult == "Homerun" ~ "Home Run",
389
  T ~ NA
390
- ))
 
391
 
392
 
393
  return(data)
 
13
  library(xgboost)
14
  library(recipes)
15
 
16
+ rv <- read_csv(non_context_run_values.csv)
17
  stuffplus_model <- xgb.load("stuffplus_xgb.json")
18
  stuffplus_recipe <- readRDS("stuffplus_recipe.rds")
19
 
 
388
  PitchCall == "InPlay" & PlayResult == "Triple" ~ "Triple",
389
  PitchCall == "InPlay" & PlayResult == "Homerun" ~ "Home Run",
390
  T ~ NA
391
+ )) %>%
392
+ left_join(rv, by = "event_type")
393
 
394
 
395
  return(data)