Spaces:
Sleeping
Sleeping
Update app.R
Browse files
app.R
CHANGED
|
@@ -25,9 +25,8 @@ VAA <- function(milbtotal){
|
|
| 25 |
mutate(VAA = -atan((vz0+(az*(-sqrt((vy0*vy0)-(2*ay*(y0-(17/12))))-vy0)/
|
| 26 |
ay))/(-sqrt((vy0*vy0)-(2*ay*(y0-(17/12))))))*(180/pi))
|
| 27 |
}
|
| 28 |
-
pitcher_summary <- function(game_pk){
|
| 29 |
-
gdate <- as.Date.character(
|
| 30 |
-
gdate <- as.Date(gdate)
|
| 31 |
tmilb <- mlb_pbp(game_pk)
|
| 32 |
tmilb <- tmilb |>
|
| 33 |
filter(type == "pitch")
|
|
@@ -52,9 +51,9 @@ pitcher_summary <- function(game_pk){
|
|
| 52 |
tmilb <- tmilb |>
|
| 53 |
mutate(is_strike_swinging = ifelse(description == "Swinging Strike" |
|
| 54 |
description == "Foul Tip",TRUE,FALSE))
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
|
| 59 |
}
|
| 60 |
break_plot <- function(game){
|
|
|
|
| 25 |
mutate(VAA = -atan((vz0+(az*(-sqrt((vy0*vy0)-(2*ay*(y0-(17/12))))-vy0)/
|
| 26 |
ay))/(-sqrt((vy0*vy0)-(2*ay*(y0-(17/12))))))*(180/pi))
|
| 27 |
}
|
| 28 |
+
pitcher_summary <- function(game_pk,date){
|
| 29 |
+
#gdate <- as.Date.character(date)
|
|
|
|
| 30 |
tmilb <- mlb_pbp(game_pk)
|
| 31 |
tmilb <- tmilb |>
|
| 32 |
filter(type == "pitch")
|
|
|
|
| 51 |
tmilb <- tmilb |>
|
| 52 |
mutate(is_strike_swinging = ifelse(description == "Swinging Strike" |
|
| 53 |
description == "Foul Tip",TRUE,FALSE))
|
| 54 |
+
# tmilb <- tmilb |>
|
| 55 |
+
# mutate(date = gdate)
|
| 56 |
+
# return(tmilb)
|
| 57 |
|
| 58 |
}
|
| 59 |
break_plot <- function(game){
|