add storm selector logic to calc

This commit is contained in:
2025-08-02 18:40:23 -04:00
parent 68b00b6338
commit ddf3f196e3
2 changed files with 51 additions and 2 deletions
+23
View File
@@ -55,6 +55,11 @@ view.yearly_normalized_losses <- tbl(con, "yearly_normalized_losses")
view.simplified_county_geom <- tbl(con, "simplified_county_geom")
view.all_loss_storms_tracks <- tbl(con, "all_loss_storms_tracks")
view.all_conus_landfalls <- tbl(con, "all_conus_landfalls")
<<<<<<< Updated upstream
=======
view.hurdat_ids <- tbl(con, "hurdat_ids")
view.all_lf_type_landfalls <- tbl(con, "all_lf_type_landfalls")
>>>>>>> Stashed changes
#qry <- econ.storm_base_loss %>%
# left_join(view.hurdat_track, by = c("storm_basin", "storm_year", "storm_name"))
@@ -110,6 +115,15 @@ get_all_loss_storms <- function() {
return(result)
}
# returns a list of all stored hurdat ids
get_all_hurdat_ids <- function() {
query <- view.hurdat_ids
result <- query %>% collect()
return(result)
}
# returns a list of latest normalized losses
get_latest_aggregate_losses <- function() {
query <- view.all_normalized_losses
@@ -435,3 +449,12 @@ get_normalized_metric_growth <- function(storm, full_lf_id) {
return(result)
}
# returns all lf type landfalls
get_all_lf_type_landfalls <- function() {
query <- view.all_lf_type_landfalls
result <- query %>% collect()
return(result)
}