From 84d415cbef71a158b777c6b51a847b9f5fe86010 Mon Sep 17 00:00:00 2001 From: James Bisese Date: Wed, 4 Dec 2024 13:33:59 -0500 Subject: [PATCH] providers as a filter option on import tab #129 Add Providers (EPA/NWIS) as a filter option on import tab #129. And create a 'Select Both' option, and do not allow a Select None option --- R/mod_query_data.R | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/R/mod_query_data.R b/R/mod_query_data.R index f5b716bb..c9fafc84 100644 --- a/R/mod_query_data.R +++ b/R/mod_query_data.R @@ -188,10 +188,9 @@ mod_query_data_ui <- function(id) { shiny::fluidRow( column( 4, - shiny::checkboxGroupInput(ns("providers"), + shiny::radioButtons(ns("providers"), "Data Source", - c("NWIS (USGS)" = "NWIS", "WQX (EPA)" = "STORET"), - selected = c("NWIS", "STORET")) + c("NWIS (USGS)" = "NWIS", "WQX (EPA)" = "STORET", "Both (NWIS and WQX)" = "all"), selected = "all") ) ), shiny::fluidRow(column( @@ -402,7 +401,7 @@ mod_query_data_server <- function(id, tadat) { } else { tadat$countrycode <- input$countryocean } - if (is.null(input$providers)) { + if (is.null(input$providers) | input$providers == "all") { tadat$providers <- "null" } else { tadat$providers <- input$providers