Spaces:
Running
Running
Update app.R
Browse files
app.R
CHANGED
|
@@ -193,9 +193,6 @@ ui <- fluidPage(
|
|
| 193 |
# ---------- Server ----------
|
| 194 |
server <- function(input, output, session){
|
| 195 |
|
| 196 |
-
cur <- plot_data()
|
| 197 |
-
cur$TaggedPitchType <- as.character(cur$TaggedPitchType)
|
| 198 |
-
|
| 199 |
# reactives
|
| 200 |
processed_data <- reactiveVal(NULL)
|
| 201 |
plot_data <- reactiveVal(NULL)
|
|
@@ -414,6 +411,8 @@ output$location_plot <- renderPlotly({
|
|
| 414 |
info <- selected_pitch(); req(info)
|
| 415 |
new_type <- input$modal_new_pitch_type; req(new_type)
|
| 416 |
cur <- plot_data(); req("Pitcher" %in% names(cur))
|
|
|
|
|
|
|
| 417 |
|
| 418 |
# map row_key back to absolute index for this pitcher slice
|
| 419 |
idx_pitcher <- which(cur$Pitcher == info$pitcher)
|
|
@@ -468,6 +467,8 @@ output$location_plot <- renderPlotly({
|
|
| 468 |
selected_keys(integer(0))
|
| 469 |
showNotification(paste("Updated", length(abs_rows), "pitches to", new_type),
|
| 470 |
type="message", duration=3)
|
|
|
|
|
|
|
| 471 |
})
|
| 472 |
|
| 473 |
# click info small text
|
|
|
|
| 193 |
# ---------- Server ----------
|
| 194 |
server <- function(input, output, session){
|
| 195 |
|
|
|
|
|
|
|
|
|
|
| 196 |
# reactives
|
| 197 |
processed_data <- reactiveVal(NULL)
|
| 198 |
plot_data <- reactiveVal(NULL)
|
|
|
|
| 411 |
info <- selected_pitch(); req(info)
|
| 412 |
new_type <- input$modal_new_pitch_type; req(new_type)
|
| 413 |
cur <- plot_data(); req("Pitcher" %in% names(cur))
|
| 414 |
+
cur <- plot_data(); req("Pitcher" %in% names(cur))
|
| 415 |
+
cur$TaggedPitchType <- as.character(cur$TaggedPitchType)
|
| 416 |
|
| 417 |
# map row_key back to absolute index for this pitcher slice
|
| 418 |
idx_pitcher <- which(cur$Pitcher == info$pitcher)
|
|
|
|
| 467 |
selected_keys(integer(0))
|
| 468 |
showNotification(paste("Updated", length(abs_rows), "pitches to", new_type),
|
| 469 |
type="message", duration=3)
|
| 470 |
+
cur <- plot_data(); req("Pitcher" %in% names(cur))
|
| 471 |
+
cur$TaggedPitchType <- as.character(cur$TaggedPitchType)
|
| 472 |
})
|
| 473 |
|
| 474 |
# click info small text
|