remove tabset for map and move map data to separate column

This commit is contained in:
2025-07-20 19:44:40 -04:00
parent e268fe7892
commit 2f364651b1
2 changed files with 76 additions and 53 deletions
+53 -51
View File
@@ -238,7 +238,7 @@ observe({
}) })
``` ```
Col {data-width=500 .tabset} Col {data-width=500}
------------------------------------ ------------------------------------
### Track Map {.no-padding} ### Track Map {.no-padding}
@@ -486,37 +486,12 @@ output$track_map <- renderLeaflet({
leafletOutput("track_map", height = "100%") leafletOutput("track_map", height = "100%")
``` ```
### Track Data {.no-padding} Col {data-width=500 .tabset}
```{r}
# Overview - Track Data
output$track_data <- renderDT({
datatable(
storm_track() %>% select(datetime, storm_status, lon, lat, rmw, pressure, windspeed, record_identifier),
rownames = F,
colnames = c("Date", "Status", "Lon", "Lat", "RMW", "Pressure", "Windpseed", "Identifier"),
selection = "none",
options = list(
pageLength = 1000,
order = list(0, 'desc'),
searching = F,
paging = F,
info = F,
lengthChange = F,
server = T
)
)
})
DTOutput("track_data")
```
Col {data-width=500}
------------------------------------ ------------------------------------
### Normalization Cost Index {data-height=700} ### Normalization and Landfalls {}
```{r} ```{r}
# Overview - Normalization Chart # Overview - Normalization and Landfalls
storm_yearly_normalization <- reactive({ storm_yearly_normalization <- reactive({
req(storm_selection$is_selected) req(storm_selection$is_selected)
@@ -598,28 +573,6 @@ output$cost_index_chart <- renderDygraph({
dyRangeSelector() dyRangeSelector()
}) })
fluidRow(
style = "height: 100%",
column(3,
virtualSelectInput("storm_overview_cost_index_lf_select", "Landfalls",
choices = NULL,
showValueAsTags = T,
multiple = T,
autoSelectFirstOption = T),
radioGroupButtons("storm_overview_cost_index_scale", label = "Value", choices = c("Index", "Loss"), status = "outline-primary rounded-0", justified = T),
checkboxGroupButtons("storm_overview_cost_index_mmh_mmp", label = "MMH/MMP", choices = c("MMH", "MMP"), selected = c("MMH", "MMP"), status = "outline-primary rounded-0", justified = T),
radioGroupButtons("storm_overview_cost_index_y_scale", label = "Y-Axis Scale", choices = c("Linear", "Log"), status = "outline-primary rounded-0", justified = T)
),
column(9,
dygraphOutput("cost_index_chart")
)
)
```
### Landfalls {data-height=300 .no-padding}
```{r}
# Overview - Landfalls Table
output$landfalls_table <- renderDT({ output$landfalls_table <- renderDT({
req(storm_selection$is_selected) req(storm_selection$is_selected)
@@ -641,7 +594,56 @@ output$landfalls_table <- renderDT({
formatDate(columns = "datetime", method = "toUTCString") formatDate(columns = "datetime", method = "toUTCString")
}) })
fillCol(
flex = c(0.7, 0.3),
div(
fluidRow(
style = "height: 100%",
column(3,
virtualSelectInput("storm_overview_cost_index_lf_select", "Landfalls",
choices = NULL,
showValueAsTags = T,
multiple = T,
autoSelectFirstOption = T),
radioGroupButtons("storm_overview_cost_index_scale", label = "Value", choices = c("Index", "Loss"), status = "outline-primary rounded-0", justified = T),
checkboxGroupButtons("storm_overview_cost_index_mmh_mmp", label = "MMH/MMP", choices = c("MMH", "MMP"), selected = c("MMH", "MMP"), status = "outline-primary rounded-0", justified = T),
radioGroupButtons("storm_overview_cost_index_y_scale", label = "Y-Axis Scale", choices = c("Linear", "Log"), status = "outline-primary rounded-0", justified = T)
),
column(9,
dygraphOutput("cost_index_chart")
)
)
),
div(
DTOutput("landfalls_table") DTOutput("landfalls_table")
)
)
```
### Track Data {.no-padding}
```{r}
# Overview - Track Data
output$track_data <- renderDT({
datatable(
storm_track() %>% select(formatted_datetime, storm_status, lon, lat, rmw, pressure, windspeed),
rownames = F,
colnames = c("Date", "Status", "Lon", "Lat", "RMW", "Pressure", "Windspeed"),
selection = "none",
options = list(
pageLength = 1000,
order = list(0, 'asc'),
searching = F,
paging = F,
info = F,
lengthChange = F,
server = T
)
)
})
DTOutput("track_data")
``` ```
+22 -1
View File
@@ -295,7 +295,28 @@ get_hurdat_track <- function(storm) {
rmw_meters rmw_meters
) )
result <- query %>% collect() result <- query %>%
collect() %>%
mutate(
formatted_datetime = paste0(
format(datetime, "%m/%d/%Y"),
" ",
format(datetime, "%H"),
"Z"
)
) %>%
select(
formatted_datetime,
datetime,
storm_status,
lon,
lat,
rmw,
pressure,
windspeed,
record_identifier,
rmw_meters
)
return(result) return(result)
} }