Spaces:
Sleeping
Sleeping
Update app.R
Browse files
app.R
CHANGED
|
@@ -191,12 +191,12 @@ ui <- grid_page(
|
|
| 191 |
selectizeInput("gamenum","Game Number (For Doubleheaders):",c("1","2")),
|
| 192 |
actionButton("update","Find Pitchers",icon("magnifying-glass"),
|
| 193 |
style = "color: #FFFFFF; background-color: #0077B6"),
|
| 194 |
-
selectizeInput("pitcher","Pitcher (For Spring Breakout if pitchers not loading, try changing game number
|
| 195 |
selectizeInput("league","MLB or MiLB Photo",c("MLB","MiLB")),
|
| 196 |
textInput("title","Card Title"),
|
| 197 |
actionButton("update1","Make Card",icon("plus"),
|
| 198 |
style = "color: #FFFFFF; background-color: #0077B6"),
|
| 199 |
-
width =
|
| 200 |
),
|
| 201 |
grid_card_text(
|
| 202 |
area = "header",
|
|
@@ -275,7 +275,7 @@ server <- function(input, output) {
|
|
| 275 |
filter(teams_away_team_name == input$awayT) |>
|
| 276 |
filter(game_number == input$gamenum))
|
| 277 |
pname <- reactive(tryCatch({pitcher_summary(pname()[,6])},error=function(e){cat("ERROR :",conditionMessage(e), "\n")}))
|
| 278 |
-
updateSelectizeInput(session = getDefaultReactiveDomain(),"pitcher","Pitcher:",choices = pname()[,3])
|
| 279 |
}
|
| 280 |
if(input$level == "FSL"){
|
| 281 |
pname <- fslid |>
|
|
@@ -284,7 +284,7 @@ server <- function(input, output) {
|
|
| 284 |
filter(teams_away_team_name == input$awayT) |>
|
| 285 |
filter(game_number == input$gamenum)
|
| 286 |
pname <- tryCatch({pitcher_summary(pname[,6])},error=function(e){cat("ERROR :",conditionMessage(e), "\n")})
|
| 287 |
-
updateSelectizeInput(session = getDefaultReactiveDomain(),"pitcher","Pitcher:",choices = pname[,3])
|
| 288 |
}
|
| 289 |
if(input$level == "MLB"){
|
| 290 |
pname <- mlbid |>
|
|
@@ -293,7 +293,7 @@ server <- function(input, output) {
|
|
| 293 |
filter(teams_away_team_name == input$awayT) |>
|
| 294 |
filter(game_number == input$gamenum)
|
| 295 |
pname <- tryCatch({pitcher_summary(pname[,6])},error=function(e){cat("ERROR :",conditionMessage(e), "\n")})
|
| 296 |
-
updateSelectizeInput(session = getDefaultReactiveDomain(),"pitcher","Pitcher:",choices = pname[,3])
|
| 297 |
}
|
| 298 |
if(input$level == "Spring Breakout"){
|
| 299 |
pname <- reactive(sbid |>
|
|
@@ -302,7 +302,7 @@ server <- function(input, output) {
|
|
| 302 |
filter(teams_away_team_name == input$awayT) |>
|
| 303 |
filter(game_number == input$gamenum))
|
| 304 |
pname <- reactive(tryCatch({pitcher_summary(pname()[,6])},error=function(e){cat("ERROR :",conditionMessage(e), "\n")}))
|
| 305 |
-
updateSelectizeInput(session = getDefaultReactiveDomain(),"pitcher","Pitcher:",choices = pname()[,3])
|
| 306 |
}
|
| 307 |
})
|
| 308 |
observeEvent(input$update1,{
|
|
|
|
| 191 |
selectizeInput("gamenum","Game Number (For Doubleheaders):",c("1","2")),
|
| 192 |
actionButton("update","Find Pitchers",icon("magnifying-glass"),
|
| 193 |
style = "color: #FFFFFF; background-color: #0077B6"),
|
| 194 |
+
selectizeInput("pitcher","Pitcher (For Spring Breakout if pitchers not loading, try changing game number)",c(" ")),
|
| 195 |
selectizeInput("league","MLB or MiLB Photo",c("MLB","MiLB")),
|
| 196 |
textInput("title","Card Title"),
|
| 197 |
actionButton("update1","Make Card",icon("plus"),
|
| 198 |
style = "color: #FFFFFF; background-color: #0077B6"),
|
| 199 |
+
width = 5,
|
| 200 |
),
|
| 201 |
grid_card_text(
|
| 202 |
area = "header",
|
|
|
|
| 275 |
filter(teams_away_team_name == input$awayT) |>
|
| 276 |
filter(game_number == input$gamenum))
|
| 277 |
pname <- reactive(tryCatch({pitcher_summary(pname()[,6])},error=function(e){cat("ERROR :",conditionMessage(e), "\n")}))
|
| 278 |
+
updateSelectizeInput(session = getDefaultReactiveDomain(),"pitcher","Pitcher:(For Spring Breakout if pitchers not loading, try changing game number)",choices = pname()[,3])
|
| 279 |
}
|
| 280 |
if(input$level == "FSL"){
|
| 281 |
pname <- fslid |>
|
|
|
|
| 284 |
filter(teams_away_team_name == input$awayT) |>
|
| 285 |
filter(game_number == input$gamenum)
|
| 286 |
pname <- tryCatch({pitcher_summary(pname[,6])},error=function(e){cat("ERROR :",conditionMessage(e), "\n")})
|
| 287 |
+
updateSelectizeInput(session = getDefaultReactiveDomain(),"pitcher","Pitcher:(For Spring Breakout if pitchers not loading, try changing game number)",choices = pname[,3])
|
| 288 |
}
|
| 289 |
if(input$level == "MLB"){
|
| 290 |
pname <- mlbid |>
|
|
|
|
| 293 |
filter(teams_away_team_name == input$awayT) |>
|
| 294 |
filter(game_number == input$gamenum)
|
| 295 |
pname <- tryCatch({pitcher_summary(pname[,6])},error=function(e){cat("ERROR :",conditionMessage(e), "\n")})
|
| 296 |
+
updateSelectizeInput(session = getDefaultReactiveDomain(),"pitcher","Pitcher:(For Spring Breakout if pitchers not loading, try changing game number)",choices = pname[,3])
|
| 297 |
}
|
| 298 |
if(input$level == "Spring Breakout"){
|
| 299 |
pname <- reactive(sbid |>
|
|
|
|
| 302 |
filter(teams_away_team_name == input$awayT) |>
|
| 303 |
filter(game_number == input$gamenum))
|
| 304 |
pname <- reactive(tryCatch({pitcher_summary(pname()[,6])},error=function(e){cat("ERROR :",conditionMessage(e), "\n")}))
|
| 305 |
+
updateSelectizeInput(session = getDefaultReactiveDomain(),"pitcher","Pitcher:(For Spring Breakout if pitchers not loading, try changing game number)",choices = pname()[,3])
|
| 306 |
}
|
| 307 |
})
|
| 308 |
observeEvent(input$update1,{
|