From bdd1a58a5616918841b014ea40740aca54fb4f3e Mon Sep 17 00:00:00 2001 From: dylanbenzi Date: Sun, 21 Sep 2025 12:58:21 -0400 Subject: [PATCH] remove fatality ui --- dashboard.Rmd | 159 +------------------------------------------------- 1 file changed, 1 insertion(+), 158 deletions(-) diff --git a/dashboard.Rmd b/dashboard.Rmd index 8d1463d..cd04428 100644 --- a/dashboard.Rmd +++ b/dashboard.Rmd @@ -167,7 +167,7 @@ fluidRow( '
Select a Storm
- We are currently tracking 201 CONUS storms with over $3.6T in losses spanning from 1900 to 2024 + We are currently tracking 201 CONUS storms with over $3T in losses spanning from 1900 to 2024
@@ -1000,14 +1000,6 @@ output$great_miami_dt <- renderDT({ DTOutput("great_miami_dt") ``` -Storm Fatalities {data-navmenu="Storm Details"} -=== - -### {} -```{r} -# TODO: add storm specific fatalities -``` - Normalization Calculator {data-navmenu="Compute"} === @@ -1741,154 +1733,5 @@ output$all_storms_map <- renderLeaflet({ leafletOutput("all_storms_map", height = "100%") ``` -Fatalities {data-navmenu="All Storms"} -=== - -### {data-height=500} -```{r eval=FALSE, include=FALSE} -fatality_years <- seq(1900, 2010, by = 10) -direct_deaths <- c(6000, 275, 0, 408, 26, 654, 466, 213, 104, 228, 1136, 321) -indirect_deaths <- c(0, 0, 0, 0, 0, 1, 8, 15, 40, 54, 1171, 368) - -yearly_fatalities <- data.frame( - fatality_years, - direct_deaths, - indirect_deaths -) %>% - mutate( - fatality_years = as.Date(paste0(fatality_years, "-01-01")) - ) - -yearly_fatalities_ts <- yearly_fatalities %>% - select(-fatality_years) %>% - xts(order.by = yearly_fatalities$fatality_years) - -output$decade_fatalities <- renderDygraph( - dygraph(yearly_fatalities_ts, main = "Fatalities By Decade") %>% - dySeries("direct_deaths", label = "Direct Deaths") %>% - dySeries("indirect_deaths", label = "Indirect Deaths") %>% - dyRangeSelector() -) - -dygraphOutput("decade_fatalities") -``` - -### {data-height=500} -```{r eval=FALSE, include=FALSE} -surge_yearly <- c(0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 410, 107) -surf_yearly <- c(0, 0, 0, 0, 0, 0, 0, 14, 2, 12, 12, 17) -rough_seas_yearly <- c(0, 0, 0, 0, 16, 0, 2, 0, 24, 17, 0, 14) -rip_current_yearly <- c(0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 14, 3) -freshwater_floods_yearly <- c(0, 0, 0, 0, 0, 200, 12, 151, 0, 117, 50, 284) -wind_yearly <- c(0, 0, 0, 0, 0, 0, 0, 8, 14, 23, 11, 82) -tree_fall_yearly <- c(0, 0, 0, 0, 1, 0, 0, 1, 0, 9, 24, 56) -tornado_yearly <- c(0, 0, 0, 0, 1, 12, 43, 7, 0, 7, 11, 7) -traffic_yearly <- c(0, 0, 0, 0, 0, 0, 0, 4, 0, 3, 2, 1) -traffic_accident_yearly <- c(0, 0, 0, 0, 0, 0, 5, 0, 0, 8, 26, 11) -electrocution_yearly <- c(0, 0, 0, 0, 0, 0, 2, 0, 0, 5, 2, 7) -other_yearly <- c(0, 0, 0, 0, 5, 0, 5, 11, 15, 13, 37, 7) - -yearly_fatalities_type <- data.frame( - fatality_years, - surge_yearly, - surf_yearly, - rough_seas_yearly, - rip_current_yearly, - freshwater_floods_yearly, - wind_yearly, - tree_fall_yearly, - tornado_yearly, - traffic_yearly, - traffic_accident_yearly, - electrocution_yearly, - other_yearly -) %>% - mutate( - fatality_years = as.Date(paste0(fatality_years, "-01-01")) - ) - -yearly_fatalities_type_ts <- yearly_fatalities_type %>% - select(-fatality_years) %>% - xts(order.by = yearly_fatalities_type$fatality_years) - -output$decade_fatalities_type <- renderDygraph( - dygraph(yearly_fatalities_type_ts, main = "Fatality Types By Decade") %>% - dySeries("surge_yearly", label = "Surge") %>% - dySeries("surf_yearly", label = "Surf") %>% - dySeries("rough_seas_yearly", label = "Rough Seas") %>% - dySeries("rip_current_yearly", label = "Rip Current") %>% - dySeries("freshwater_floods_yearly", label = "Freshwater Floods") %>% - dySeries("wind_yearly", label = "Wind") %>% - dySeries("tree_fall_yearly", label = "Tree Fall") %>% - dySeries("tornado_yearly", label = "Tornado") %>% - dySeries("traffic_yearly", label = "Traffic") %>% - dySeries("traffic_accident_yearly", label = "Traffic Accident") %>% - dySeries("electrocution_yearly", label = "Electrocution") %>% - dySeries("other_yearly", label = "Other") %>% - dyRangeSelector() -) - -dygraphOutput("decade_fatalities_type") -``` - -### {data-height=500} -```{r eval=FALSE, include=FALSE} -fatality_type <- c( - "Surge", - "Surf", - "Rough Seas", - "Rip Current", - "Floods", - "Wind", - "Tree Fall", - "Tornado", - "Traffic", - "Traffic Accident", - "Electrocution", - "Other" -) -fatality_totals <- c(520, 56, 77, 23, 826, 131, 91, 88, 10, 45, 16, 56) - -aggregate_fatality_types <- data.frame(fatality_type, fatality_totals) - -output$aggregate_fatalities <- renderBillboarder( - billboarder() %>% - bb_piechart(aggregate_fatality_types) - #%>% bb_legend(position = "right") -) - -billboarderOutput("aggregate_fatalities") -``` - -### {data-height=500} -```{r eval=FALSE, include=FALSE} -``` - -Column {data-width=500 .tabset} ---- - -### Fatality Map {} -```{r} - -``` - -### Fatality Geo Data {} -```{r} - -``` - -Column {data-width=500} ---- - -### Perils {data-height=500} -```{r} - -``` - -### Trends {data-height} -```{r} - -``` - About ===