add storm comparison

This commit is contained in:
2025-06-10 16:48:52 -04:00
parent f86b73aa97
commit 6107521acb
+79 -22
View File
@@ -42,7 +42,7 @@ library(scales)
library(billboarder) library(billboarder)
library(mirai) library(mirai)
daemons(3) #mirai::daemons(3)
linuxdir <- "/home/dylan/Personal/Projects/Hurricane Normalization/" linuxdir <- "/home/dylan/Personal/Projects/Hurricane Normalization/"
macdir <- "~/Desktop/Personal/Projects/Hurricane Normalization/" macdir <- "~/Desktop/Personal/Projects/Hurricane Normalization/"
@@ -110,13 +110,13 @@ loading_states <- reactiveValues(
onStop(function() { onStop(function() {
dbDisconnect(con) dbDisconnect(con)
if(!is.null(async_reqs$track_request)) { #if(!is.null(async_reqs$hurdat_track)) {
tryCatch({ # tryCatch({
async_reqs$track_request <- NULL # async_reqs$hurdat_track <- NULL
}, error = function(e) { # }, error = function(e) {
cat(e) # cat(e)
}) # })
} #}
}) })
``` ```
@@ -136,7 +136,7 @@ HTML(
<h6>Our Data</h6> <h6>Our Data</h6>
<p>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 <i>Bulletin of the American Meteorlogical Society</i> and <i>****JOURNAL****</i> 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.</p> <p>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 <i>Bulletin of the American Meteorlogical Society</i> and <i>****JOURNAL****</i> 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.</p>
<ul> <ul>
<li><b>PL22:</b> The Pielke-Landsea (2022) normalization that adjusts for inflation, wealth per capita, and population changes. This data has been updated to 2022.</li> <li><b>PL22:</b> The Pielke-Landsea (2022) normalization that adjusts for inflation, wealth per capita, and population changes. This data has been updated to 2022.</li>
@@ -161,10 +161,6 @@ HTML(
<li><b>Up-to-date Data:</b> Using the latest population, housing unit, and economic data through 2024.</li> <li><b>Up-to-date Data:</b> Using the latest population, housing unit, and economic data through 2024.</li>
</ul> </ul>
<h6>Questions?</h6>
<p>CONTACT INFO?</p>
' '
) )
@@ -180,7 +176,7 @@ HTML(
<h6>Our Data</h6> <h6>Our Data</h6>
<p>The core datasets used in this app are based on research by Muller et al. (2025) published in the <i>Bulletin of the American Meteorlogical Society</i>. This study updates and refines hurricane damage normalization methodologies to provide a more accurate picture of how historical hurricanes would impact today\'s society.</p> <p>The core datasets used in this app are based on research by Muller et al. (2025) published in <i>Bulletin of the American Meteorlogical Society</i>. This study updates and refines hurricane damage normalization methodologies to provide a more accurate picture of how historical hurricanes would impact today\'s society.</p>
<ul> <ul>
<li><b>PL22:</b> The Pielke-Landsea (2022) normalization that adjusts for inflation, wealth per capita, and population changes. This data has been updated to 2022.</li> <li><b>PL22:</b> The Pielke-Landsea (2022) normalization that adjusts for inflation, wealth per capita, and population changes. This data has been updated to 2022.</li>
@@ -205,10 +201,6 @@ HTML(
<li><b>Up-to-date Data:</b> Using the latest population, housing unit, and economic data through 2024.</li> <li><b>Up-to-date Data:</b> Using the latest population, housing unit, and economic data through 2024.</li>
</ul> </ul>
<h6>Questions?</h6>
<p>CONTACT INFO?</p>
' '
) )
@@ -617,7 +609,74 @@ fillCol(
Storm Fatalities {data-navmenu="Storm Details"} 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"} Fatalities {data-navmenu="Fatalities"}
=== ===
@@ -706,8 +765,8 @@ aggregate_fatality_types <- data.frame(fatality_type, fatality_totals)
output$aggregate_fatalities <- renderBillboarder( output$aggregate_fatalities <- renderBillboarder(
billboarder() %>% billboarder() %>%
bb_piechart(aggregate_fatality_types) %>% bb_piechart(aggregate_fatality_types)
bb_legend(position = "right") #%>% bb_legend(position = "right")
) )
billboarderOutput("aggregate_fatalities") billboarderOutput("aggregate_fatalities")
@@ -717,8 +776,6 @@ billboarderOutput("aggregate_fatalities")
```{r} ```{r}
``` ```
Storm Comparison {data-navmenu="Compute"}
===
Sandbox {data-navmenu="Compute"} Sandbox {data-navmenu="Compute"}
=== ===