add demo growth trend map

This commit is contained in:
2025-06-10 20:18:05 -04:00
parent 6107521acb
commit b780058112
2 changed files with 158 additions and 35 deletions
+27
View File
@@ -230,6 +230,8 @@ get_hurdat_landfalls <- function(storm) {
# returns storm track from HURDAT
get_hurdat_track <- function(storm) {
#Sys.sleep(5)
query <- hurdat.best_track %>%
filter(
storm_basin == storm$storm_basin,
@@ -326,6 +328,31 @@ get_normalized_metric_growth <- function(storm, full_lf_id) {
return(result)
}
async_db_query <- function(query_func, ...) {
args <- list(...)
mirai_call <- mirai({
linuxdir <- "/home/dylan/Personal/Projects/Hurricane Normalization/"
macdir <- "~/Desktop/Personal/Projects/Hurricane Normalization/"
#baseDir <- macdir
baseDir <- linuxdir
config <- config::get(file = paste0(baseDir, "R/dataScripts/restructured/app/config.yml"))
source(file = paste0(baseDir, "R/dataScripts/restructured/app/queries.R"))
if(length(args) == 0) {
query_func()
}else{
do.call(query_func, args)
}
},
environment()
)
return(mirai_call)
}
# test functions
#storm <- list(storm_basin = "AL", storm_name = "KATRINA", storm_year = 2005)