mirror of
https://github.com/dylanbenzi/hurricane_normalization_app.git
synced 2026-07-30 05:08:57 +00:00
update queries for growth maps
This commit is contained in:
+8
-4
@@ -845,7 +845,8 @@ output$growth_map <- renderLeaflet({
|
|||||||
fillColor = "red",
|
fillColor = "red",
|
||||||
color = "red",
|
color = "red",
|
||||||
fillOpacity = ~population_opacity,
|
fillOpacity = ~population_opacity,
|
||||||
weight = 2
|
weight = 2,
|
||||||
|
popup = ~ name
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
map <- map %>%
|
map <- map %>%
|
||||||
@@ -854,7 +855,8 @@ output$growth_map <- renderLeaflet({
|
|||||||
fillColor = "blue",
|
fillColor = "blue",
|
||||||
color = "blue",
|
color = "blue",
|
||||||
fillOpacity = ~housing_opacity,
|
fillOpacity = ~housing_opacity,
|
||||||
weight = 2
|
weight = 2,
|
||||||
|
popup = ~ name
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -882,7 +884,8 @@ observe({
|
|||||||
fillColor = "red",
|
fillColor = "red",
|
||||||
color = "red",
|
color = "red",
|
||||||
fillOpacity = ~population_opacity,
|
fillOpacity = ~population_opacity,
|
||||||
weight = 2
|
weight = 2,
|
||||||
|
popup = ~ name
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
leafletProxy("growth_map", data = growth_county_year) %>%
|
leafletProxy("growth_map", data = growth_county_year) %>%
|
||||||
@@ -891,7 +894,8 @@ observe({
|
|||||||
fillColor = "blue",
|
fillColor = "blue",
|
||||||
color = "blue",
|
color = "blue",
|
||||||
fillOpacity = ~housing_opacity,
|
fillOpacity = ~housing_opacity,
|
||||||
weight = 2
|
weight = 2,
|
||||||
|
popup = ~ name
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
+10
-1
@@ -354,7 +354,14 @@ get_hurdat_landfalls <- function(storm) {
|
|||||||
|
|
||||||
# returns all tracked storm conus landfalls
|
# returns all tracked storm conus landfalls
|
||||||
get_all_conus_landfalls <- function() {
|
get_all_conus_landfalls <- function() {
|
||||||
query <- view.all_conus_landfalls
|
query <- view.all_conus_landfalls %>%
|
||||||
|
select(
|
||||||
|
storm_year,
|
||||||
|
storm_name,
|
||||||
|
lon,
|
||||||
|
lat,
|
||||||
|
rmw_meters
|
||||||
|
)
|
||||||
|
|
||||||
result <- query %>% collect()
|
result <- query %>% collect()
|
||||||
|
|
||||||
@@ -479,6 +486,7 @@ get_normalized_metric_growth <- function(storm, full_lf_id) {
|
|||||||
state_fips,
|
state_fips,
|
||||||
county_fips,
|
county_fips,
|
||||||
year,
|
year,
|
||||||
|
name,
|
||||||
population,
|
population,
|
||||||
housing_units,
|
housing_units,
|
||||||
normalized_population,
|
normalized_population,
|
||||||
@@ -543,6 +551,7 @@ get_normalized_metric_growth <- function(storm, full_lf_id) {
|
|||||||
select(
|
select(
|
||||||
state_fips,
|
state_fips,
|
||||||
year,
|
year,
|
||||||
|
name,
|
||||||
population,
|
population,
|
||||||
housing_units,
|
housing_units,
|
||||||
normalized_population,
|
normalized_population,
|
||||||
|
|||||||
Reference in New Issue
Block a user