add input filtering to coverage table

This commit is contained in:
2026-04-09 22:44:39 -04:00
parent 91efb99dba
commit a2d0b7830a
3 changed files with 202 additions and 37 deletions
+88 -3
View File
@@ -48,9 +48,94 @@ ui <- page_navbar(
layout_columns(
col_widths = c(8, 4),
card(
card_body(
DTOutput("storm_coverage_table")
)
div(
class = "px-1 pt-1",
layout_columns(
col_widths = c(6, 6),
textInput(
"table_search",
"Storm Search",
placeholder = "Search storm name...",
width = "100%"
),
div(
tags$label(class = "form-label", "Data Availability"),
layout_columns(
col_widths = c(4, 4, 4),
tags$div(
class = "btn-group w-100",
role = "group",
tags$button(
class = "btn btn-primary w-100",
style = "pointer-events: none;",
"HURDAT2"
)
),
checkboxGroupButtons(
"filter_cost",
label = NULL,
choices = "Cost",
selected = character(0),
status = "outline-success",
justified = TRUE,
width = "100%"
),
checkboxGroupButtons(
"filter_fatality",
label = NULL,
choices = "Fatality",
selected = character(0),
status = "outline-danger",
justified = TRUE,
width = "100%"
)
)
)
),
layout_columns(
col_widths = c(6, 6),
sliderInput(
"dt_year_filter",
"Year",
min = 1900,
max = 2024,
value = c(1900, 2024),
sep = "",
step = 1,
ticks = FALSE,
width = "100%"
),
numericRangeInput(
"dt_deaths_filter",
"Direct Deaths",
value = c(0, dt_death_max),
min = 0,
separator = "",
width = "100%"
)
),
layout_columns(
col_widths = c(6, 6),
numericRangeInput(
"dt_mmh_filter",
"MMH ($)",
value = c(0, round(dt_mmh_max, digits = 0)),
min = 0,
separator = "",
width = "100%"
),
numericRangeInput(
"dt_mmp_filter",
"MMP ($)",
value = c(0, round(dt_mmp_max, digits = 0)),
min = 0,
separator = "",
width = "100%"
)
)
),
hr(class = "m-0"),
DTOutput("storm_coverage_table")
),
layout_columns(
col_widths = 12,