AE 22: Building a climate risk dashboard - UI

Application exercise
Modified

April 22, 2025

Communicating climate risk

FEMA has asked us to build an improved dashboard that visualizes the risk of climate change in the United States.

Based on your submitted designs and our skill level, we will work to implement this Shiny dashboard.

Construct a user interface

Structure the dashboard layout

Useful resources

Position the outputs

Useful resources
    • climate_risk |>
        gt() |>
        opt_interactive()

Define the inputs

Utilize appropriate sidebars to define all the inputs for the app.

National tab

County tab

Get all county names
climate_sf |>
  arrange(STATEFP) |>
  pull(county)
Get all risk measures
# hazard types
hazard_types <- climate_risk |>
  select(contains("hazard")) |>
  colnames()

# human-readable labels
hazard_types_labels <- hazard_types |>
  str_remove(pattern = "_hazard_type_risk_index_score") |>
  make_clean_names(case = "title")