mirror of
https://github.com/dylanbenzi/hurricane_normalization_app.git
synced 2026-07-30 05:08:57 +00:00
add mirai setup
This commit is contained in:
@@ -40,6 +40,9 @@ library(tigris)
|
|||||||
library(caret)
|
library(caret)
|
||||||
library(scales)
|
library(scales)
|
||||||
library(billboarder)
|
library(billboarder)
|
||||||
|
library(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/"
|
||||||
@@ -95,8 +98,25 @@ storm_selection <- reactiveValues(
|
|||||||
is_table_selection = FALSE,
|
is_table_selection = FALSE,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
async_reqs <- reactiveValues(
|
||||||
|
hurdat_track = NULL,
|
||||||
|
)
|
||||||
|
|
||||||
|
loading_states <- reactiveValues(
|
||||||
|
hurdat_track = FALSE,
|
||||||
|
track_error = NULL,
|
||||||
|
)
|
||||||
|
|
||||||
onStop(function() {
|
onStop(function() {
|
||||||
dbDisconnect(con)
|
dbDisconnect(con)
|
||||||
|
|
||||||
|
if(!is.null(async_reqs$track_request)) {
|
||||||
|
tryCatch({
|
||||||
|
async_reqs$track_request <- NULL
|
||||||
|
}, error = function(e) {
|
||||||
|
cat(e)
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
library(tidyverse)
|
library(tidyverse)
|
||||||
library(dplyr)
|
library(dplyr)
|
||||||
library(DBI)
|
library(DBI)
|
||||||
#library(sf)
|
|
||||||
|
|
||||||
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/"
|
||||||
@@ -217,6 +216,15 @@ get_hurdat_landfalls <- function(storm) {
|
|||||||
|
|
||||||
result <- query %>% collect()
|
result <- query %>% collect()
|
||||||
|
|
||||||
|
#return(
|
||||||
|
# list(
|
||||||
|
# data = result,
|
||||||
|
# storm_info = storm,
|
||||||
|
# row_count = nrow(result),
|
||||||
|
# timestamp = Sys.time()
|
||||||
|
# )
|
||||||
|
#)
|
||||||
|
|
||||||
return(result)
|
return(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user