From 68ef668b16da0349aee64bad70c79585a95445af Mon Sep 17 00:00:00 2001 From: dylanbenzi Date: Wed, 9 Jul 2025 18:06:50 -0400 Subject: [PATCH] add ui layout --- dashboard.Rmd | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 95 insertions(+), 1 deletion(-) diff --git a/dashboard.Rmd b/dashboard.Rmd index 7b6a652..bd01ee7 100644 --- a/dashboard.Rmd +++ b/dashboard.Rmd @@ -40,6 +40,7 @@ library(tigris) library(caret) library(scales) library(billboarder) +library(shinyWidgets) # local testing env setup os <- Sys.info()["sysname"] @@ -778,9 +779,102 @@ billboarderOutput("aggregate_fatalities") ``` -Sandbox {data-navmenu="Compute"} +Impact Analysis {data-navmenu="Compute"} === +Column {data-width=700} +--- + +### {.no-padding} +```{r} +output$impact_analysis_map <- renderLeaflet({ + leaflet() %>% + addProviderTiles("CartoDB.Positron", option = providerTileOptions(minZoom = 2, maxZoom = 18)) + # %>% setView(lng = -89.8, lat = 29.6, zoom = 8) +}) + +leafletOutput("impact_analysis_map") +``` + +Column {data-width=300} +--- + +### {} +```{r} +fillCol( + flex = c(.5, .5), + div( + p("Storm Selector"), + selectInput("impact_storm_basin", label = NULL, choices = "AL", width = "100%"), + selectInput("impact_storm_year", label = NULL, choices = 2005, width = "100%"), + selectInput("impact_storm_name", label = NULL, choices = "KATRINA", width = "100%"), + + fluidRow( + column(6, + selectInput("impact_storm_lf_type", label = NULL, choices = "LF", width = "100%") + ), + column(6, + selectInput("impact_storm_lf_id", label = NULL, choices = "1", width = "100%") + ) + ), + + actionButton("impact_populate_storm", label = "Populate", width = "100%", class = "btn-primary rounded") + ), + div( + p("Impact Area"), + + fluidRow( + column(6, + textInput("impact_lat", placeholder = "Lat", label = NULL, width = "100%") + ), + column(6, + textInput("impact_lon", placeholder = "Lon", label = NULL, width = "100%") + ) + ), + + fluidRow( + column(4, + textInput("impact_rmw", placeholder = "RMW", label = NULL, width = "100%") + ), + column(8, + sliderInput("impact_rmw_slider", label = NULL, min = 1, max = 20, value = 5, ticks = F, width = "100%") + ) + ), + + #fluidRow( + # column(3, + # actionButton("impact_rmw_one", label = "1x", width = "100%", class = "btn-primary") + # ), + # column(3, + # actionButton("impact_rmw_two", label = "2x", width = "100%", class = "btn-outline-primary btn-#block") + # ), + # column(3, + # actionButton("impact_rmw_three", label = "3x", width = "100%", class = "btn-outline-primary btn-#block") + # ) + #), + + radioGroupButtons("impact_rmw_multiplier", label = NULL, choices = c("1x", "2x", "3x"), status = "outline-primary rounded-0", justified = T), + + fluidRow( + column(6, + textInput("impact_base_year", placeholder = "Impact Year", label = NULL, width = "100%") + ), + column(6, + textInput("impact_ref_year", placeholder = "Reference Year", label = NULL, width = "100%") + ) + ), + + actionButton("impact_calculate", label = "Calculate", width = "100%", class = "btn-primary rounded") + ) +) +``` + + + + + + + Data {data-navmenu="Compute"} ===