1- # ### Get Community Climate Change Risk Indicators (CCCRI )
1+ # ### Get Community Risks Indicators (CEVRI )
22
33library(readxl )
44library(dplyr )
@@ -12,7 +12,7 @@ comm_clim_vuln_xlsx <- "CEVRI_NE_Subregions_Clean.xlsx"
1212comm_clim_vuln_xlsx_lbs <- " CEVRI_NE_Subregions_LBS_Clean.xlsx"
1313# comm_clim_subregion_xlsx <- "SOE SubRegions_CCCRI_Clean.xlsx"
1414
15- get_community_climate_vulnerability <- function (save_clean = F ) {
15+ get_community_risks <- function (save_clean = F ) {
1616 # Create data frame to define State-EPU
1717 df <- data.frame (
1818 State = c(" ME" , " MA" , " RI" , " CT" , " DE" , " NH" , " NY" , " NJ" , " MD" , " VA" , " NC" ),
@@ -32,7 +32,7 @@ get_community_climate_vulnerability <- function(save_clean = F) {
3232 )
3333
3434 # Transform vulnerability input file into SOE format ----
35- community_climate_vulnerability <- readxl :: read_excel(
35+ community_risks <- readxl :: read_excel(
3636 file.path(raw.dir , comm_clim_vuln_xlsx ),
3737 sheet = " CEVRI_NE_Subregions"
3838 ) | >
@@ -70,7 +70,7 @@ get_community_climate_vulnerability <- function(save_clean = F) {
7070 dplyr :: select(Time , Var , Value , EPU , Units )
7171
7272 # LBS: Transform vulnerability input file into SOE format ----
73- community_climate_vulnerability_lbs <- readxl :: read_excel(
73+ community_risks_lbs <- readxl :: read_excel(
7474 file.path(raw.dir , comm_clim_vuln_xlsx_lbs ),
7575 sheet = " CEVRI_NE_Subregions_LBS"
7676 ) | >
@@ -104,22 +104,22 @@ get_community_climate_vulnerability <- function(save_clean = F) {
104104 dplyr :: select(Time , Var , Value , EPU , Units )
105105
106106 # combine data ----
107- community_climate_vulnerability <- rbind(
108- community_climate_vulnerability ,
109- community_climate_vulnerability_lbs
107+ community_risks <- rbind(
108+ community_risks ,
109+ community_risks_lbs
110110 )
111111
112112 # 2022 data were found to be incomplete
113113 # Removing from ecodata until further review
114- community_climate_vulnerability <- dplyr :: filter(
115- community_climate_vulnerability ,
114+ community_risks <- dplyr :: filter(
115+ community_risks ,
116116 Time != 2025
117117 )
118118
119119 if (save_clean ) {
120- usethis :: use_data(community_climate_vulnerability , overwrite = T )
120+ usethis :: use_data(community_risks , overwrite = T )
121121 } else {
122- return (community_climate_vulnerability )
122+ return (community_risks )
123123 }
124124}
125- get_community_climate_vulnerability (save_clean = T )
125+ get_community_risks (save_clean = T )
0 commit comments