|
17 | 17 | #' @export |
18 | 18 | #' |
19 | 19 |
|
20 | | -plot_community_climate_vulnerability <- function( |
| 20 | +plot_community_risks <- function( |
21 | 21 | shadedRegion = NULL, |
22 | 22 | report = "MidAtlantic", |
23 | 23 | varName = "vulnSum", |
@@ -58,7 +58,7 @@ plot_community_climate_vulnerability <- function( |
58 | 58 | if (plottype == "propcomm") { |
59 | 59 | #proportion of communities |
60 | 60 |
|
61 | | - props <- ecodata::community_climate_vulnerability |> |
| 61 | + props <- ecodata::community_risks |> |
62 | 62 | dplyr::filter(!stringr::str_detect(Var, "Regional-")) |> |
63 | 63 | tidyr::separate(Var, into = c("Town", "StateVar"), sep = ",") |> #using two steps because some towns have - in the name |
64 | 64 | tidyr::separate(StateVar, into = c("State", "Var"), sep = "-") |> # which also seps the variable |
@@ -149,7 +149,7 @@ plot_community_climate_vulnerability <- function( |
149 | 149 | plottype == "regionland" ~ "_region_lb" |
150 | 150 | ) |
151 | 151 |
|
152 | | - regional <- ecodata::community_climate_vulnerability |> |
| 152 | + regional <- ecodata::community_risks |> |
153 | 153 | # dplyr::filter(stringr::str_detect(Var, "Regional-")) |> |
154 | 154 | # dplyr::mutate(Varin = stringr::str_extract(Var, '\\b\\w+$'), #keep everything before - |
155 | 155 | # Varpre = stringr::str_to_lower(stringr::str_split_i(Varin, "Sum", 1)), |
@@ -225,18 +225,18 @@ plot_community_climate_vulnerability <- function( |
225 | 225 | } |
226 | 226 | } |
227 | 227 |
|
228 | | -attr(plot_community_climate_vulnerability, "report") <- c( |
| 228 | +attr(plot_community_risks, "report") <- c( |
229 | 229 | "MidAtlantic", |
230 | 230 | "NewEngland" |
231 | 231 | ) |
232 | | -attr(plot_community_climate_vulnerability, "varName") <- c( |
| 232 | +attr(plot_community_risks, "varName") <- c( |
233 | 233 | "oaSum", |
234 | 234 | "tempSum", |
235 | 235 | "stckSum", |
236 | 236 | "sensSum", |
237 | 237 | "vulnSum" |
238 | 238 | ) |
239 | | -attr(plot_community_climate_vulnerability, "plottype") <- c( |
| 239 | +attr(plot_community_risks, "plottype") <- c( |
240 | 240 | "propcomm", |
241 | 241 | "regionrev", |
242 | 242 | "regionland" |
|
0 commit comments