## [1] "Row.Labels" "d15N" "d13C" "Station"
## [5] "Length" "spc" "Avg.Length" "Avg.d15N"
## [9] "Avg.d13C" "Lat" "Long" "d15N.stdev"
## [13] "Length.stdev" "Avg.d15N.res" "Station.Depth"
d %>% filter(spc == 1) %>%
ggplot()+
geom_point(aes(d13C, d15N, color = Station, size = Length)) +
ggtitle("Fig 1: Cod d15N vs d13C") +
labs(x="d13C", y="d15N") +
theme_bw()
d %>% filter(spc == 1) %>%
ggplot()+
geom_point(aes(Length, d15N, color = Station, size = Length)) +
ggtitle("Fig 2: Cod d15N vs length") +
labs(x="Length", y="d15N") +
theme_bw()
d %>% filter(spc == 1 | spc == 3) %>%
ggplot()+
geom_point(aes(Avg.Length, Avg.d15N, color = Station), size=5) +
geom_errorbar(aes(x=Avg.Length, ymax=Avg.d15N+d15N.stdev, ymin=Avg.d15N-d15N.stdev, width=0.2)) +
geom_errorbarh(aes(x=Avg.Length, y=Avg.d15N, xmax=Avg.Length+Length.stdev, xmin=Avg.Length-Length.stdev, height=.07)) +
ggtitle("Fig 3: Average d15N vs average length per station") +
labs(x="Station Average Length", y="Station Avg d15N") +
theme_bw()
d %>% filter(spc == 1) %>%
ggplot()+
geom_point(aes(Long/-100, Lat/100, color = Station), size=5) +
ggtitle("Fig 4: Station vs GPS coords") +
labs(x="longitude", y="latitude") +
theme_bw()
#xlim=c(36.644226,45.109741), ylim=c(-78.514394,-64.061092)
#36.644226, -78.514394
#45.109741, -64.061092
cod <- d %>% filter(spc == 1)
map <- ggmap(get_map(location="Gulf of Maine", zoom=7, maptype="hybrid"))
## Map from URL : http://maps.googleapis.com/maps/api/staticmap?center=Gulf+of+Maine&zoom=7&size=640x640&scale=2&maptype=hybrid&language=en-EN&sensor=false
## Information from URL : http://maps.googleapis.com/maps/api/geocode/json?address=Gulf%20of%20Maine&sensor=false
datamap <- map +
geom_point(data = cod, aes(Long/-100, Lat/100, color = Avg.d15N, size = Avg.Length), alpha=.7) +
scale_color_gradient(low = "red", high = "green") +
ggtitle("Fig 5: Station vs GPS coords, w/d15N and length avgs") +
labs(x="longitude", y="latitude")
datamap
cod <- d %>% filter(spc == 1 | spc==3)
map <- ggmap(get_map(location="Gulf of Maine", zoom=7, maptype="hybrid"))
## Map from URL : http://maps.googleapis.com/maps/api/staticmap?center=Gulf+of+Maine&zoom=7&size=640x640&scale=2&maptype=hybrid&language=en-EN&sensor=false
## Information from URL : http://maps.googleapis.com/maps/api/geocode/json?address=Gulf%20of%20Maine&sensor=false
datamap <- map +
geom_point(data = cod, aes(Long/-100, Lat/100, color = Avg.d15N, size = Avg.Length), alpha=.7) +
scale_color_gradient(low = "red", high = "green") +
ggtitle("Fig 5.5 *w/WWJ: Station vs GPS coords, w/d15N and length avgs") +
labs(x="longitude", y="latitude")
datamap
cod <- d %>% filter(spc==1)
fit <- lm(d15N~Length, data = cod)
coef(fit)
## (Intercept) Length
## 6.1866122 0.1296773
d15N.predicted <- predict(fit)
d15N.res <- resid(fit)
ggplot(cod, aes(x=Length, y=d15N)) +
geom_point() +
geom_point(aes(y=d15N.predicted), shape = 1) +
ggtitle("Figure 6: Length trend") +
theme_bw()
ggplot(cod, aes(x=Length, y=d15N.res)) +
geom_point() +
geom_hline(yintercept=0) +
ggtitle("Figure 7: Detrended") +
theme_bw()
cod.WWJ <- d %>% filter(spc==3)
ggplot(cod, aes(x=Station, y=d15N.res)) +
stat_summary(fun.y="mean", geom="point") +
geom_point(data=cod.WWJ, aes(x=Station,y=Avg.d15N.res)) +
#stat_summary(fun.y="mean", geom="text", aes(label=sprintf("%1.9f", ..y..))) +
ggtitle("Figure 8: Detrended average per station") +
theme_bw()
map <- ggmap(get_map(location="Gulf of Maine", zoom=7, maptype="hybrid"))
## Map from URL : http://maps.googleapis.com/maps/api/staticmap?center=Gulf+of+Maine&zoom=7&size=640x640&scale=2&maptype=hybrid&language=en-EN&sensor=false
## Information from URL : http://maps.googleapis.com/maps/api/geocode/json?address=Gulf%20of%20Maine&sensor=false
datamap <- map +
geom_point(data = cod, aes(Long/-100, Lat/100, color = Avg.d15N.res), alpha=.7, size = 3) +
ggtitle("Figure 9: Detrended d15N average per station, mapped") +
labs(x="longitude", y="latitude")
datamap
cod.WWJ <- d %>% filter(spc==3)
map <- ggmap(get_map(location="Gulf of Maine", zoom=7, maptype="hybrid"))
## Map from URL : http://maps.googleapis.com/maps/api/staticmap?center=Gulf+of+Maine&zoom=7&size=640x640&scale=2&maptype=hybrid&language=en-EN&sensor=false
## Information from URL : http://maps.googleapis.com/maps/api/geocode/json?address=Gulf%20of%20Maine&sensor=false
datamap <- map +
geom_point(data = cod, aes(Long/-100, Lat/100, color = Avg.d15N.res), alpha=.7, size = 3) +
geom_point(data = cod.WWJ, aes(Long/-100, Lat/100, color = Avg.d15N.res), alpha=.7, size = 3) +
ggtitle("Figure 9.1: Same as Fig 9 but with WWJ data added") +
labs(x="longitude", y="latitude")
datamap
map <- ggmap(get_map(location="Gulf of Maine", zoom=7, maptype="hybrid"))
## Map from URL : http://maps.googleapis.com/maps/api/staticmap?center=Gulf+of+Maine&zoom=7&size=640x640&scale=2&maptype=hybrid&language=en-EN&sensor=false
## Information from URL : http://maps.googleapis.com/maps/api/geocode/json?address=Gulf%20of%20Maine&sensor=false
datamap <- map +
geom_point(data = cod, aes(Long/-100, Lat/100, color = Avg.d15N.res), alpha=.7, size = 3) +
geom_point(data = cod.WWJ, aes(Long/-100, Lat/100, color = Avg.d15N.res), alpha=.7, size = 3) +
#scale_colour_manual(values=c("blue","yellow")) +
ggtitle("Figure 10: Cod d15N overlayed with plankton d15N") +
labs(x="longitude", y="latitude")
datamap +
geom_point(data = z250_2015, aes(long, lat, color = d15N), alpha =.7, size =3)
## Warning: Removed 3 rows containing missing values (geom_point).
#+ scale_colour_manual(values=c("red","green"))
ggplot(d %>% filter(spc != 2), aes(Avg.d13C, Avg.d15N, color=Station, label=Station))+
geom_point() +
geom_text_repel(aes(label=ifelse(Avg.d15N<=10,Station,''))) +
geom_text(aes(label=ifelse(Avg.Length>20,Station,'')),hjust=-.1,yjust=0) +
geom_errorbar(aes(x=Avg.d13C, ymax=Avg.d15N+d15N.stdev, ymin=Avg.d15N-d15N.stdev, width=0.2)) +
ggtitle("Fig 11: Average d15N vs average d13C per station") +
labs(x="Station Average d13C", y="Station Avg d15N") +
theme_bw()
## Warning: Ignoring unknown parameters: yjust
ggplot(d %>% filter(spc != 2), aes(Station.Depth, Avg.d15N, color=Station, label=Station))+
geom_point() +
geom_text(aes(label=Station),hjust=-.1) +
ggtitle("Fig 12: Average d15N per station vs depth") +
labs(x="Depth", y="Station Avg d15N") +
theme_bw()
ggplot(d %>% filter(spc != 2), aes(Station.Depth, Avg.d13C, color=Station, label=Station))+
geom_point() +
geom_text(aes(label=Station),hjust=-.1,yjust=0) +
ggtitle("Fig 13: Average d13C per station vs depth") +
labs(x="Depth", y="Station Avg d15N") +
theme_bw()
## Warning: Ignoring unknown parameters: yjust
(Intercept) Length 6.1866122 0.1296773
11.62525 12.08419 10.91293
Phytoplankton 250um WWJ west 400/500 <-> Jordan Basin/Acid 5 GOM WWJ east 600 <-> 45 GOM 1 306/307 <-> 28 GB 2 328 <-> NE Channel 297 <-> 30 GB 1
400 - St George 500 - Damariscotta 600 - Passamaquoddy
CODN15 V SIZE COD & PLANK ON THE MAP PLOT N V DEPTH
Graph data over other maps
Small cod have more trophic variability Plot Willis values from lower sites for compatibility N fixation vs nitrate = oceanic signal
Closest possible zoop station, not exact