From 6107521acb1ef5ad658c7ff84bac1ab1bc99b10a Mon Sep 17 00:00:00 2001 From: dylanbenzi Date: Tue, 10 Jun 2025 16:48:52 -0400 Subject: [PATCH] add storm comparison --- dashboard.Rmd | 101 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 79 insertions(+), 22 deletions(-) diff --git a/dashboard.Rmd b/dashboard.Rmd index cafb9da..62585da 100644 --- a/dashboard.Rmd +++ b/dashboard.Rmd @@ -42,7 +42,7 @@ library(scales) library(billboarder) library(mirai) -daemons(3) +#mirai::daemons(3) linuxdir <- "/home/dylan/Personal/Projects/Hurricane Normalization/" macdir <- "~/Desktop/Personal/Projects/Hurricane Normalization/" @@ -110,13 +110,13 @@ loading_states <- reactiveValues( onStop(function() { dbDisconnect(con) - if(!is.null(async_reqs$track_request)) { - tryCatch({ - async_reqs$track_request <- NULL - }, error = function(e) { - cat(e) - }) - } + #if(!is.null(async_reqs$hurdat_track)) { + # tryCatch({ + # async_reqs$hurdat_track <- NULL + # }, error = function(e) { + # cat(e) + # }) + #} }) ``` @@ -136,7 +136,7 @@ HTML(
Our Data
-

The core datasets used in this app are based on research by Muller et al. (2025) and the expanded analysis by Mooney et al. (2025), published in the Bulletin of the American Meteorlogical Society and ****JOURNAL**** respectively. These studies update and refine hurricane damage normalization methodologies to provide a more accurate picture of how historical hurricanes would impact today\'s society.

+

The core datasets used in this app are based on research by Muller et al. (2025) and the expanded analysis by Mooney et al. (2025), published in Bulletin of the American Meteorlogical Society and ****JOURNAL**** respectively. These studies update and refine hurricane damage normalization methodologies to provide a more accurate picture of how historical hurricanes would impact today\'s society.

- -
Questions?
- -

CONTACT INFO?

' ) @@ -180,7 +176,7 @@ HTML(
Our Data
-

The core datasets used in this app are based on research by Muller et al. (2025) published in the Bulletin of the American Meteorlogical Society. This study updates and refines hurricane damage normalization methodologies to provide a more accurate picture of how historical hurricanes would impact today\'s society.

+

The core datasets used in this app are based on research by Muller et al. (2025) published in Bulletin of the American Meteorlogical Society. This study updates and refines hurricane damage normalization methodologies to provide a more accurate picture of how historical hurricanes would impact today\'s society.

- -
Questions?
- -

CONTACT INFO?

' ) @@ -617,7 +609,74 @@ fillCol( Storm Fatalities {data-navmenu="Storm Details"} === +Storm Comparison {data-navmenu="Storm Details"} +=== +Column {data-width=500} +--- + +### Storm One {data-height=550} +```{r} +# selected storm + +# dygraph of normalization + +fillCol( + flex = c(.2, .8), + fluidRow( + column(4, + selectInput("locked_storm_one_basin", NULL, choices = "AL") + ), + column(4, + selectInput("locked_storm_one_year", NULL, choices = 2005) + ), + column(4, + selectInput("locked_storm_one_name", NULL, choices = "KATRINA") + ) + ), + #dygraphOutput("cost_index_chart") +) +``` + +### Storm One Track {data-height=450 .no-padding} +```{r} +# hurdat track +#leafletOutput("track_map", height="100%") +``` + +Column {data-width=500} +--- + +### Storm Two {data-height=550} +```{r} +# selected storm + +# dygraph of normalization + +fillCol( + flex = c(.2, .8), + fluidRow( + column(3, + selectInput("locked_storm_two_basin", NULL, choices = "AL") + ), + column(3, + selectInput("locked_storm_two_year", NULL, choices = 2005) + ), + column(3, + selectInput("locked_storm_two_name", NULL, choices = "KATRINA") + ), + column(3, + actionButton("select_storm_two", "Submit", class = "btn-primary") + ) + ), + #dygraphOutput("cost_index_chart") +) +``` + +### Storm Two Track {data-height=450} +```{r} +# hurdat track +``` Fatalities {data-navmenu="Fatalities"} === @@ -706,8 +765,8 @@ aggregate_fatality_types <- data.frame(fatality_type, fatality_totals) output$aggregate_fatalities <- renderBillboarder( billboarder() %>% - bb_piechart(aggregate_fatality_types) %>% - bb_legend(position = "right") + bb_piechart(aggregate_fatality_types) + #%>% bb_legend(position = "right") ) billboarderOutput("aggregate_fatalities") @@ -717,8 +776,6 @@ billboarderOutput("aggregate_fatalities") ```{r} ``` -Storm Comparison {data-navmenu="Compute"} -=== Sandbox {data-navmenu="Compute"} ===