add slider for growth trends map

This commit is contained in:
2025-06-06 02:08:18 -04:00
parent 0fe907690b
commit 8442e6d6bd
+23 -28
View File
@@ -774,7 +774,13 @@ Growth Trends {data-navmenu="Storm Details"}
Column {data-width=550} Column {data-width=550}
------------------------------- -------------------------------
### {data-height=1000 .no-padding} ### Map Year {data-height=100}
```{r}
sliderInput("growth_trend_map_year", label = NULL, min = 2005, max = 2024, step = 1, animate = T, value = 2005, sep = "", width = "100%", ticks = F)
```
### {data-height=900 .no-padding}
```{r} ```{r}
dbStormCounties <- reactive({ dbStormCounties <- reactive({
@@ -813,28 +819,28 @@ dbStormCounties <- reactive({
}) })
output$popMapPoly <- renderLeaflet({ output$popMapPoly <- renderLeaflet({
leaflet(dbStormCounties()) %>% leaflet() %>%
addProviderTiles("CartoDB.Positron", option = providerTileOptions(minZoom = 2, maxZoom = 18)) %>% addProviderTiles("CartoDB.Positron", option = providerTileOptions(minZoom = 2, maxZoom = 18)) %>%
setView(lng = -89.8, lat = 29.6, zoom = 8) %>% setView(lng = -89.8, lat = 29.6, zoom = 8) #%>%
addPolygons( #addPolygons(
fillColor = "red", # fillColor = "red",
fillOpacity = 0.3, # fillOpacity = 0.3,
color = "black", # color = "black",
weight = 2 # weight = 2
) #)
}) })
output$housingMapPoly <- renderLeaflet({ output$housingMapPoly <- renderLeaflet({
leaflet() %>% leaflet() %>%
addProviderTiles("CartoDB.Positron", option = providerTileOptions(minZoom = 2, maxZoom = 18)) %>% addProviderTiles("CartoDB.Positron", option = providerTileOptions(minZoom = 2, maxZoom = 18)) %>%
setView(lng = -89.8, lat = 29.6, zoom = 8) %>% setView(lng = -89.8, lat = 29.6, zoom = 8) #%>%
addPolygons( #addPolygons(
data = dbStormCounties(), # data = dbStormCounties(),
fillColor = "blue", # fillColor = "blue",
fillOpacity = 0.3, # fillOpacity = 0.3,
color = "black", # color = "black",
weight = 2 # weight = 2
) #)
}) })
fillCol( fillCol(
@@ -850,17 +856,6 @@ Column {data-width=450}
### Landfall Selection {data-height=550} ### Landfall Selection {data-height=550}
```{r} ```{r}
#observe({
# req(storm_overview_reactive$full_lf_id)
#
# updateSelectInput(
# session,
# "storm_overview_cost_index_lf",
# choices = storm_unique_landfalls()$full_lf_id,
# selected = storm_overview_reactive$full_lf_id
# )
#})
normalized_growth_metrics_lf_ts <- reactive ({ normalized_growth_metrics_lf_ts <- reactive ({
req(growth_trends$full_lf_id) req(growth_trends$full_lf_id)