Skip to content

Commit

Permalink
Update mod_figures.R
Browse files Browse the repository at this point in the history
- fixed issue Selena discovered - plot subsetting was originally incorrect
- added more narrative to the plots below the map.
  • Loading branch information
elisehinman committed Sep 9, 2023
1 parent 1e1adeb commit c9261ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/mod_figures.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ mod_figures_server <- function(id, tadat){
sites = c("All sites", unique(react$mapdata$MonitoringLocationIdentifier))
shiny::fluidRow(
htmltools::h3("3. Select Specific Sites (Optional)"),
htmltools::HTML("Use the drop down to pick the sites you'd like to include in the plots below and then click 'Generate Plots'. Defaults to all sites in the dataset."),
htmltools::HTML(paste0("Use the drop down to pick the sites you'd like to include in the plots below and then click 'Generate Plots'. Defaults to all sites in the dataset. <B>NOTE:</B> Currently, the single-characteristic scatterplot, histogram, and boxplot show the first characteristic from the drop down above the map: <B>", react$groups[1],"</B>.")),
htmltools::br(),
column(6, # column containing drop down menu for all grouping column combinations
shiny::selectizeInput(ns("selsites1"),"Select sites",choices = sites, selected = sites[1], multiple = TRUE, width = "100%")),
Expand All @@ -217,7 +217,7 @@ mod_figures_server <- function(id, tadat){
if(all(input$selsites1=="All sites")){
react$plotdata = subset(react$dat, react$dat$groupname%in%c(react$groups))
}else{
react$plotdata = react$plotdata %>% dplyr::filter(MonitoringLocationIdentifier%in%input$selsites1)
react$plotdata = react$dat %>% dplyr::filter(MonitoringLocationIdentifier%in%input$selsites1)
}
})

Expand Down

0 comments on commit c9261ff

Please sign in to comment.