Skip to content

Commit

Permalink
updating ROIs
Browse files Browse the repository at this point in the history
  • Loading branch information
kimberlylthompson committed Nov 17, 2024
1 parent edbf949 commit bc8e59f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ extracted_sf <- arrange(extracted_sf, desc(change.amt))

# Write the shapefile with change
st_write(extracted_sf,
paste(path, "/01_Analysis/BBS and LULC/BBS_Rtes_wLULC.shp",
paste(path, "/01_Analyses/BBS and LULC/BBS_Rtes_wLULC.shp",
sep = ""))


Expand Down
10 changes: 7 additions & 3 deletions Code/Paper_1/Cleaning_and_Sample_Generation/06_Fire in ROIs.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ library(ggplot2)
###############################################

# Set path to Bioviewpoint folder (where data resides)
# path <- "~/Library/CloudStorage/[email protected]/.shortcut-targets-by-id/1HhR4gs3fKXyAXBhQom6t69gAqR6SeKhx/BioViewPoint"
path <- "~/share/groups/MAS/04_personal/Kim_T/BioViewPoint"
path <- "~/Library/CloudStorage/[email protected]/.shortcut-targets-by-id/1HhR4gs3fKXyAXBhQom6t69gAqR6SeKhx/BioViewPoint"
# path <- "~/share/groups/MAS/04_personal/Kim_T/BioViewPoint"
# path <- "I:/mas/04_personal/Kim_T/BioViewPoint"

# Define the coordinate system
albers = sp:: CRS("+init=epsg:5070")

# Load the square polygons (ROIs) with the column containing amount of change
bbs.roi <- st_read(paste(path, "/01_Analysis/BBS and LULC/BBS_Rtes_wLULC.shp",
bbs.roi <- st_read(paste(path, "/01_Analyses/BBS and LULC/BBS_Rtes_wLULC.shp",
sep = ""))

bbs.roi <- sf :: st_transform(bbs.roi, albers)
Expand Down Expand Up @@ -108,6 +108,10 @@ routes.to.remove <- unique(overlap$uniq_rt)
# Remove from the BBS ROI
bbs.roi_revised <- bbs.roi[!(bbs.roi$uniq_rt %in% routes.to.remove), ]

# Write the revised sf object
st_write(bbs.roi_revised,
paste(path, "/01_Analyses/BBS and LULC/BBS_Rtes_wLULC_minusfire.shp",
sep = ""))


###############################################
Expand Down

0 comments on commit bc8e59f

Please sign in to comment.