AE 17: Building a climate risk dashboard - UI
Application exercise
Communicating climate risk
FEMA has asked us to build an improved dashboard that visualizes the risk of climate change in the United States. We will work to implement this Shiny dashboard.
Construct a user interface
Structure the dashboard layout
TipUseful resources
Position the outputs
TipUseful resources
- Shiny outputs
- Make sure to organize your outputs using cards
-
-
-
-
climate_risk |> gt() |> opt_interactive()
-
Define the inputs
Utilize appropriate sidebars to define all the inputs for the app.
TipUseful resources
National tab
County tab
TipGet all county names
climate_sf |>
arrange(STATEFP) |>
pull(county)
TipGet 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")