TimStats commited on
Commit
174e300
·
verified ·
1 Parent(s): a2824a2

Update app.R

Browse files
Files changed (1) hide show
  1. app.R +11 -9
app.R CHANGED
@@ -206,7 +206,7 @@ ui <- fluidPage(
206
  sidebarPanel(
207
  width = 2,
208
  dateInput("date", "Date:"),
209
- selectizeInput("level", "Level:", c("MLB", "AAA", "FSL", "College (Statcast Parks Only)", "Futures Game","AFL")),
210
  actionButton("submit", "Get Dashboard"),
211
  downloadButton("download_summary", "Download Summary"),
212
  selectizeInput("pitcherf", "Pitcher Pitch Level Stuff", c("")),
@@ -219,7 +219,6 @@ ui <- fluidPage(
219
  )
220
  )
221
 
222
-
223
  server <- function(input, output, session) {
224
  data <- reactiveVal()
225
  games <- reactiveVal()
@@ -236,8 +235,15 @@ server <- function(input, output, session) {
236
  data(mlb_schedule(season = season, level_ids = "14"))
237
  } else if (input$level == "College (Statcast Parks Only)") {
238
  data(mlb_schedule(season = season, level_ids = "22"))
239
- } else if (input$level == "Futures Game"){
240
- data(mlb_schedule(season = season, level_ids = "21"))
 
 
 
 
 
 
 
241
  } else if (input$level == "AFL") {
242
  sbid <- mlb_schedule(2024,17)
243
  sbid <- sbid %>%
@@ -332,8 +338,4 @@ server <- function(input, output, session) {
332
  )
333
  }
334
 
335
- shinyApp(ui, server)
336
-
337
-
338
-
339
-
 
206
  sidebarPanel(
207
  width = 2,
208
  dateInput("date", "Date:"),
209
+ selectizeInput("level", "Level:", c("MLB", "AAA", "FSL", "College (Statcast Parks Only)", "Draft League","AFL")),
210
  actionButton("submit", "Get Dashboard"),
211
  downloadButton("download_summary", "Download Summary"),
212
  selectizeInput("pitcherf", "Pitcher Pitch Level Stuff", c("")),
 
219
  )
220
  )
221
 
 
222
  server <- function(input, output, session) {
223
  data <- reactiveVal()
224
  games <- reactiveVal()
 
235
  data(mlb_schedule(season = season, level_ids = "14"))
236
  } else if (input$level == "College (Statcast Parks Only)") {
237
  data(mlb_schedule(season = season, level_ids = "22"))
238
+ } else if (input$level == "Draft League"){
239
+ dl <- mlb_schedule(season = season, level_ids = "22") %>%
240
+ filter(teams_away_team_name == "Frederick Keys" |
241
+ teams_away_team_name == "State College Spikes" |
242
+ teams_away_team_name == "Trenton Thunder" |
243
+ teams_away_team_name == "Williamsport Crosscutters" |
244
+ teams_away_team_name == "West Virginia Black Bears" |
245
+ teams_away_team_name == "Mahoning Valley Scrappers") %>%
246
+ data(dl)
247
  } else if (input$level == "AFL") {
248
  sbid <- mlb_schedule(2024,17)
249
  sbid <- sbid %>%
 
338
  )
339
  }
340
 
341
+ shinyApp(ui, server)