-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsimplifyCUs.R
64 lines (42 loc) · 3.52 KB
/
simplifyCUs.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
###############################################################################
# Read in shapefiles for CU boundaries from DFO and simplify these and save as
# .rds for reading into shiny app
###############################################################################
library(rgdal)
library(rmapshaper)
# Shapefiles are huge. Easier to save as RDS?
#------------------------------------------------------------------------------
# Chinook
#------------------------------------------------------------------------------
CU_CK <- readOGR("/Users/stephaniepeacock/Dropbox (Salmon Watersheds)/X Drive/5_DATA/Mapping/Transboundary/conservation units/DFO_CUs_updated_Dec2021_chinook.shp", layer = "DFO_CUs_updated_Dec2021_chinook", GDAL1_integer64_policy = TRUE)
saveRDS(CU_CK, file = "shiny-app/data/CU/CU_CK.rds")
#------------------------------------------------------------------------------
# Coho
#------------------------------------------------------------------------------
CU_CO <- readOGR("/Users/stephaniepeacock/Dropbox (Salmon Watersheds)/X Drive/5_DATA/Mapping/Transboundary/conservation units/DFO_CUs_updated_Dec2021_coho.shp", layer = "DFO_CUs_updated_Dec2021_coho", GDAL1_integer64_policy = TRUE)
saveRDS(CU_CO, file = "shiny-app/data/CU/CU_CO.rds")
#------------------------------------------------------------------------------
# Chum
#------------------------------------------------------------------------------
CU_CM <- readOGR("/Users/stephaniepeacock/Dropbox (Salmon Watersheds)/X Drive/5_DATA/Mapping/Transboundary/conservation units/DFO_CUs_updated_Dec2021_chum.shp", layer = "DFO_CUs_updated_Dec2021_chum", GDAL1_integer64_policy = TRUE)
saveRDS(CU_CM, file = "shiny-app/data/CU/CU_CM.rds")
#------------------------------------------------------------------------------
# Even-year pink
#------------------------------------------------------------------------------
CU_PKE <- readOGR("/Users/stephaniepeacock/Dropbox (Salmon Watersheds)/X Drive/5_DATA/Mapping/Transboundary/conservation units/DFO_CUs_updated_Dec2021_PKE.shp", layer = "DFO_CUs_updated_Dec2021_PKE", GDAL1_integer64_policy = TRUE)
saveRDS(CU_PKE, file = "shiny-app/data/CU/CU_PKE.rds")
#------------------------------------------------------------------------------
# Odd-year pink
#------------------------------------------------------------------------------
CU_PKO <- readOGR("/Users/stephaniepeacock/Dropbox (Salmon Watersheds)/X Drive/5_DATA/Mapping/Transboundary/conservation units/DFO_CUs_updated_Dec2021_PKO.shp", layer = "DFO_CUs_updated_Dec2021_PKO", GDAL1_integer64_policy = TRUE)
saveRDS(CU_PKO, file = "shiny-app/data/CU/CU_PKO.rds")
#------------------------------------------------------------------------------
# Lake-type sockeye
#------------------------------------------------------------------------------
CU_SEL <- readOGR("/Users/stephaniepeacock/Dropbox (Salmon Watersheds)/X Drive/5_DATA/Mapping/Transboundary/conservation units/DFO_CUs_updated_Dec2021_SEL.shp", layer = "DFO_CUs_updated_Dec2021_SEL", GDAL1_integer64_policy = TRUE)
saveRDS(CU_SEL, file = "shiny-app/data/CU/CU_SEL.rds")
#------------------------------------------------------------------------------
# River-type sockeye
#------------------------------------------------------------------------------
CU_SER <- readOGR("/Users/stephaniepeacock/Dropbox (Salmon Watersheds)/X Drive/5_DATA/Mapping/Transboundary/conservation units/DFO_CUs_updated_Dec2021_SER.shp", layer = "DFO_CUs_updated_Dec2021_SER", GDAL1_integer64_policy = TRUE)
saveRDS(CU_SER, file = "shiny-app/data/CU/CU_SER.rds")