diff --git a/dashboard.Rmd b/dashboard.Rmd index 2cc3159..9892415 100644 --- a/dashboard.Rmd +++ b/dashboard.Rmd @@ -794,13 +794,7 @@ observe({ ) }) -test_storm <- reactiveValues( - storm_basin = "AL", - storm_year = 1926, - storm_name = "GREAT MIAMI", -) - -test_counties <- reactive({ +growth_counties <- reactive({ req( storm_selection$is_selected, input$growth_trend_lf_select @@ -831,30 +825,28 @@ test_counties <- reactive({ output$pop_growth_map <- renderLeaflet({ leaflet() %>% - addProviderTiles("Stadia.AlidadeSmooth") %>% - setView(lng = -81.3, lat = 25.6, zoom = 7) + addProviderTiles("Stadia.AlidadeSmooth") }) output$housing_growth_map <- renderLeaflet({ leaflet() %>% - addProviderTiles("Stadia.AlidadeSmooth") %>% - setView(lng = -81.3, lat = 25.6, zoom = 7) + addProviderTiles("Stadia.AlidadeSmooth") }) observe({ req( - test_counties, + growth_counties, input$growth_trend_map_slider ) growth_year <- input$growth_trend_map_slider - test_county_year <- test_counties() %>% + growth_county_year <- growth_counties() %>% filter( year == growth_year ) - leafletProxy("pop_growth_map", data = test_county_year) %>% + leafletProxy("pop_growth_map", data = growth_county_year) %>% clearShapes() %>% addPolygons( fillColor = "red", @@ -863,7 +855,7 @@ observe({ weight = 2 ) - leafletProxy("housing_growth_map", data = test_county_year) %>% + leafletProxy("housing_growth_map", data = growth_county_year) %>% clearShapes() %>% addPolygons( fillColor = "blue",