Update app.R
Browse files
app.R
CHANGED
|
@@ -545,17 +545,6 @@ summary_table <- function(game) {
|
|
| 545 |
return(combined_summary)
|
| 546 |
}
|
| 547 |
|
| 548 |
-
FF_model <- readRDS("FF_model.rds")
|
| 549 |
-
SI_model <- readRDS("SI_model.rds")
|
| 550 |
-
CT_model <- readRDS("CT_model.rds")
|
| 551 |
-
SL_model <- readRDS("SL_model.rds")
|
| 552 |
-
CB_model <- readRDS("CB_model.rds")
|
| 553 |
-
CH_SPL_model <- readRDS("CH_SPL_model.rds")
|
| 554 |
-
|
| 555 |
-
team_data <- read.csv("teampic.csv") %>%
|
| 556 |
-
select(newestTeamName, newestTeamId) %>%
|
| 557 |
-
arrange(newestTeamName) # Sort alphabetically
|
| 558 |
-
|
| 559 |
# Modify the UI
|
| 560 |
ui <- fluidPage(
|
| 561 |
titlePanel("Trackman Summary Card Demo"),
|
|
@@ -566,9 +555,6 @@ ui <- fluidPage(
|
|
| 566 |
actionButton("update", "Load Pitchers", icon("magnifying-glass"),
|
| 567 |
class = "btn-primary btn-block"),
|
| 568 |
selectizeInput("pitcher", "Pitcher Name:", NULL),
|
| 569 |
-
selectizeInput("teamName", "Team:",
|
| 570 |
-
choices = c("Default" = "default", setNames(team_data$newestTeamId, team_data$newestTeamName)),
|
| 571 |
-
selected = "default"),
|
| 572 |
numericInput("rollnum", "Rolling Pitch #", c("1")),
|
| 573 |
textInput("pass", "Password"),
|
| 574 |
actionButton("update1", "Make Card", icon("plus"),
|
|
@@ -663,7 +649,7 @@ server <- function(input, output, session) {
|
|
| 663 |
return()
|
| 664 |
}
|
| 665 |
get_logo <- function() {
|
| 666 |
-
if (
|
| 667 |
# Try to get team logo using the selected team ID
|
| 668 |
logo_url <- paste0("https://static.trumedianetworks.com/images/ncaabaseball/teams/", input$teamName, ".png")
|
| 669 |
img_result <- download_and_process_image(logo_url)
|
|
|
|
| 545 |
return(combined_summary)
|
| 546 |
}
|
| 547 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 548 |
# Modify the UI
|
| 549 |
ui <- fluidPage(
|
| 550 |
titlePanel("Trackman Summary Card Demo"),
|
|
|
|
| 555 |
actionButton("update", "Load Pitchers", icon("magnifying-glass"),
|
| 556 |
class = "btn-primary btn-block"),
|
| 557 |
selectizeInput("pitcher", "Pitcher Name:", NULL),
|
|
|
|
|
|
|
|
|
|
| 558 |
numericInput("rollnum", "Rolling Pitch #", c("1")),
|
| 559 |
textInput("pass", "Password"),
|
| 560 |
actionButton("update1", "Make Card", icon("plus"),
|
|
|
|
| 649 |
return()
|
| 650 |
}
|
| 651 |
get_logo <- function() {
|
| 652 |
+
if (FALSE) {
|
| 653 |
# Try to get team logo using the selected team ID
|
| 654 |
logo_url <- paste0("https://static.trumedianetworks.com/images/ncaabaseball/teams/", input$teamName, ".png")
|
| 655 |
img_result <- download_and_process_image(logo_url)
|