Skip to content

Commit dc07dbd

Browse files
committed
feature(community_climate_vulnerability): replace "community_climate_vulnerability" with "community_risks" throughout plot function code
1 parent 39b86c7 commit dc07dbd

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

R/plot_community_risks.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#' @export
1818
#'
1919

20-
plot_community_climate_vulnerability <- function(
20+
plot_community_risks <- function(
2121
shadedRegion = NULL,
2222
report = "MidAtlantic",
2323
varName = "vulnSum",
@@ -58,7 +58,7 @@ plot_community_climate_vulnerability <- function(
5858
if (plottype == "propcomm") {
5959
#proportion of communities
6060

61-
props <- ecodata::community_climate_vulnerability |>
61+
props <- ecodata::community_risks |>
6262
dplyr::filter(!stringr::str_detect(Var, "Regional-")) |>
6363
tidyr::separate(Var, into = c("Town", "StateVar"), sep = ",") |> #using two steps because some towns have - in the name
6464
tidyr::separate(StateVar, into = c("State", "Var"), sep = "-") |> # which also seps the variable
@@ -149,7 +149,7 @@ plot_community_climate_vulnerability <- function(
149149
plottype == "regionland" ~ "_region_lb"
150150
)
151151

152-
regional <- ecodata::community_climate_vulnerability |>
152+
regional <- ecodata::community_risks |>
153153
# dplyr::filter(stringr::str_detect(Var, "Regional-")) |>
154154
# dplyr::mutate(Varin = stringr::str_extract(Var, '\\b\\w+$'), #keep everything before -
155155
# Varpre = stringr::str_to_lower(stringr::str_split_i(Varin, "Sum", 1)),
@@ -225,18 +225,18 @@ plot_community_climate_vulnerability <- function(
225225
}
226226
}
227227

228-
attr(plot_community_climate_vulnerability, "report") <- c(
228+
attr(plot_community_risks, "report") <- c(
229229
"MidAtlantic",
230230
"NewEngland"
231231
)
232-
attr(plot_community_climate_vulnerability, "varName") <- c(
232+
attr(plot_community_risks, "varName") <- c(
233233
"oaSum",
234234
"tempSum",
235235
"stckSum",
236236
"sensSum",
237237
"vulnSum"
238238
)
239-
attr(plot_community_climate_vulnerability, "plottype") <- c(
239+
attr(plot_community_risks, "plottype") <- c(
240240
"propcomm",
241241
"regionrev",
242242
"regionland"

0 commit comments

Comments
 (0)