- addLegend("bottomright", pal = pal, values = ~total_2008, opacity = 1.0,
- labFormat = labelFormat(transform = function(x) x))
- })
-
- observe({
- counties <- if (is.null(input$states)) character(0) else {
- filter(us_elections_history, state_code %in% input$states) %>%
- `$`('county_name') %>%
- unique() %>%
- sort()
- }
- stillSelected <- isolate(input$counties[input$counties %in% counties])
- updateSelectInput(session, "counties", choices = counties,
- selected = stillSelected)
- })
-
- output$us_elections_history <- DT::renderDataTable({
- df <- us_elections_history %>%
- filter(
- is.null(input$states) | state_code %in% input$states,
This file has been truncated. show original