Spaces:
Sleeping
Sleeping
Update app.R
Browse files
app.R
CHANGED
|
@@ -189,7 +189,7 @@ build_hitter_table <- function(lb, min_pa, portal_only, bat_side, hitter_pos) {
|
|
| 189 |
df %>%
|
| 190 |
select(Name, Level, Team, Portal, Position, BatSide, `Twitter`, `Board`,
|
| 191 |
HomeState, Height, Weight, PA,
|
| 192 |
-
|
| 193 |
`IZ Whiff%`, `Chase%`, `Hard Hit%`, `Avg EV`, `GB%`, `FB%`, `LD%`) %>%
|
| 194 |
arrange(desc(PA))
|
| 195 |
}
|
|
@@ -811,7 +811,7 @@ make_color_ramp <- function(values, low, high, flip = FALSE,
|
|
| 811 |
}")
|
| 812 |
)
|
| 813 |
) %>%
|
| 814 |
-
formatStyle("
|
| 815 |
formatStyle("OBP", backgroundColor = styleEqual(dt$OBP, col_obp)) %>%
|
| 816 |
formatStyle("SLG", backgroundColor = styleEqual(dt$SLG, col_slg)) %>%
|
| 817 |
formatStyle("BB%", backgroundColor = styleEqual(dt$`BB%`, col_bb)) %>%
|
|
@@ -828,7 +828,7 @@ make_color_ramp <- function(values, low, high, flip = FALSE,
|
|
| 828 |
formatStyle("wOBA", backgroundColor = styleEqual(dt$wOBA, col_woba)) %>%
|
| 829 |
formatStyle("xwOBA", backgroundColor = styleEqual(dt$xwOBA, col_xwoba)) %>%
|
| 830 |
formatStyle(
|
| 831 |
-
c("
|
| 832 |
"Chase%","Hard Hit%","Avg EV","GB%","FB%","LD%","PA","Height","Weight"),
|
| 833 |
fontWeight = "bold"
|
| 834 |
) %>%
|
|
|
|
| 189 |
df %>%
|
| 190 |
select(Name, Level, Team, Portal, Position, BatSide, `Twitter`, `Board`,
|
| 191 |
HomeState, Height, Weight, PA,
|
| 192 |
+
BA, OBP, SLG, wOBA, xwOBA, `BB%`, `K%`, `Swing%`, `Contact%`,
|
| 193 |
`IZ Whiff%`, `Chase%`, `Hard Hit%`, `Avg EV`, `GB%`, `FB%`, `LD%`) %>%
|
| 194 |
arrange(desc(PA))
|
| 195 |
}
|
|
|
|
| 811 |
}")
|
| 812 |
)
|
| 813 |
) %>%
|
| 814 |
+
formatStyle("BA", backgroundColor = styleEqual(dt$BA, col_ba)) %>%
|
| 815 |
formatStyle("OBP", backgroundColor = styleEqual(dt$OBP, col_obp)) %>%
|
| 816 |
formatStyle("SLG", backgroundColor = styleEqual(dt$SLG, col_slg)) %>%
|
| 817 |
formatStyle("BB%", backgroundColor = styleEqual(dt$`BB%`, col_bb)) %>%
|
|
|
|
| 828 |
formatStyle("wOBA", backgroundColor = styleEqual(dt$wOBA, col_woba)) %>%
|
| 829 |
formatStyle("xwOBA", backgroundColor = styleEqual(dt$xwOBA, col_xwoba)) %>%
|
| 830 |
formatStyle(
|
| 831 |
+
c("BA","OBP","SLG","wOBA","xwOBA","BB%","K%","Swing%","Contact%","IZ Whiff%",
|
| 832 |
"Chase%","Hard Hit%","Avg EV","GB%","FB%","LD%","PA","Height","Weight"),
|
| 833 |
fontWeight = "bold"
|
| 834 |
) %>%
|