-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
made a map of studya rea and sampling lcoations for manuscript
- Loading branch information
1 parent
c4bf325
commit 7a5aba5
Showing
19 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Create map of FASTR sampling locations | ||
# Laura Twardochleb | ||
# 11/21/23 | ||
|
||
#1. Global Code and Functions --------------------------------------------------------------------------------------------------------------------------------------------- | ||
|
||
library(tidyverse) | ||
|
||
setwd("C:/Users/ltwardochleb/Documents/NDFA/ND-FASTR/manuscript_synthesis/") | ||
|
||
require(sf) | ||
require(ggplot2) | ||
require(dplyr) | ||
|
||
SubRegions<-deltamapr::R_EDSM_Subregions_Mahardja%>% | ||
filter(Region!="South")%>% | ||
filter(!SubRegion%in%c("Upper Napa River", "Lower Napa River", "San Pablo Bay", "San Francisco Bay")) | ||
|
||
yolo<-sf::st_read("/data/Yolo Bypass Extent")%>% | ||
st_transform(crs=st_crs(SubRegions))%>% | ||
st_union() | ||
|
||
add<-tibble(Latitude=c(37.9, 38.8), Longitude=c(-121.9, -121.2))%>% | ||
st_as_sf(coords=c("Longitude", "Latitude"), crs=4326)%>% | ||
st_transform(crs=st_crs(SubRegions)) | ||
|
||
base<-deltamapr::WW_Watershed%>% | ||
st_transform(crs=st_crs(SubRegions))%>% | ||
st_crop(st_union(st_union(st_buffer(yolo, units::set_units(3000, "m")), SubRegions), add))%>% | ||
filter(!HNAME%in%c("PUTAH CREEK", "LAKE BERRYESSA", "SOUTH FORK PUTAH CREEK", "LAKE CURRY", "UPPER SAN LEANDRO RESERVOIR", "BETHANY RESERVOIR", "LAKE CHABOT", "SAN FRANCISCO BAY"))%>% | ||
st_union() | ||
|
||
stations<-tibble(Station=c("RCS", "RD22", "I80", "LIS", "STTD", "BL5", "LIB", "RYI", "RVB"), | ||
Region=c(rep("Upstream", 5), rep("Downstream", 4)), | ||
Latitude=c(38.793457, 38.676367, 38.573111, 38.474816, 38.353461, 38.274460, 38.242100, 38.213167, 38.159737), | ||
Longitude=c(-121.725447, -121.643972, -121.582958, -121.588584, -121.642975, -121.665652, -121.684900,-121.668591, -121.686355))%>% | ||
st_as_sf(coords=c("Longitude", "Latitude"), crs=4326)%>% | ||
mutate(Region=factor(Region, levels=c("Upstream", "Downstream"))) | ||
|
||
locations_points<-tibble(Location=c( "Freeport", "Antioch", "Rio Vista"), | ||
Latitude=c(38.461562, 38.004094, 38.155604), | ||
Longitude=c(-121.499371, -121.805606, -121.691347))%>% | ||
st_as_sf(coords=c("Longitude", "Latitude"), crs=4326) | ||
|
||
locations_text<-tibble(Location=c("Freeport", "Antioch", "Rio Vista", "Cache Slough", "Yolo Bypass", "Sacramento River"), | ||
Latitude=c(38.481562, 37.99, 38.155603, 38.36, 38.5, 38.51), | ||
Longitude=c(-121.419371, -121.805606, -121.8, -121.8, -121.75, -121.35))%>% | ||
st_as_sf(coords=c("Longitude", "Latitude"), crs=4326) | ||
|
||
|
||
p<-ggplot()+ | ||
geom_sf(data=yolo, color=NA, fill="gray80", alpha=0.5)+ | ||
geom_sf(data=base, fill="slategray3", color="slategray4")+ | ||
geom_sf(data=locations_points)+ | ||
geom_sf(data=stations, aes(fill=Region), shape=21, color="black", size=3)+ | ||
geom_sf_text(data=locations_text, aes(label=Location), lineheight = 1)+ | ||
scale_fill_manual(values=c("#E41A1C", "#377EB8"))+ | ||
theme_void() | ||
p | ||
|
||
ggsave("FASTR_MS_map.png", plot=p, device="png", width=8, height=8, units = "in") |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Empty file.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]] |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Empty file.
Binary file not shown.