mirror of
https://github.com/dylanbenzi/hurricane_normalization_app.git
synced 2026-07-30 05:08:57 +00:00
add demo growth trend map
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user