## [1] "Row.Labels" "d15N" "d13C" "Station"
## [5] "Length" "spc" "Avg.Length" "Avg.d15N"
## [9] "Avg.d13C" "Lat" "Long" "d15N.stdev"
## [13] "d13C.stdev" "Length.stdev" "Avg.d15N.res" "Station.Depth"
## [17] "Zoop.d15N" "Zoop.d13C"
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 | spc == 3) %>%
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 = "green", high = "red") +
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 = "green", high = "red") +
ggtitle("Fig 5.1 *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, with wWJ cod added") +
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, fill = Avg.d15N.res),
shape = 24, stroke = 1, size = 4, alpha = 0.7) +
geom_point(data = cod.WWJ, aes(Long/-100, Lat/100, fill = d15N),
shape = 22, stroke = 1, size = 3, alpha=.7) +
scale_fill_gradientn(colors = terrain.colors(4)) +
ggtitle("Figure 10: Cod d15N overlayed with 250um Zoop 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).
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,'')), size = 3) +
geom_text(aes(label=ifelse(Avg.Length>20,Station,'')),hjust=-.25, size = 3) +
geom_errorbar(aes(x=Avg.d13C, ymax=Avg.d15N+d15N.stdev, ymin=Avg.d15N-d15N.stdev, width=0.1)) +
geom_errorbarh(aes(x=Avg.d13C, y=Avg.d15N, xmax=Avg.d13C+d13C.stdev, xmin=Avg.d13C-d13C.stdev, height=.2)) +
ggtitle("Fig 11: Average d15N vs average d13C per station, w/250um zoop") +
labs(x="Station Average d13C", y="Station Avg d15N") +
theme_bw()
ggplot(d %>% filter(spc != 2), aes(Station.Depth, Avg.d15N, color=Station, label=Station))+
geom_point() +
geom_text_repel(aes(label=ifelse(Avg.d15N<=10,Station,'')), size = 3) +
geom_text(aes(label=ifelse(Avg.Length>20,Station,'')),hjust=-.25, size = 3) +
ggtitle("Fig 12: Average d15N per station vs depth") +
labs(x="Depth (m)", y="Station Avg d15N") +
theme_bw()
ggplot(d %>% filter(spc != 2), aes(Station.Depth, Avg.d13C, color=Station, label=Station))+
geom_point() +
geom_text_repel(aes(label=ifelse(Avg.d15N<=10,Station,'')), size = 3) +
geom_text(aes(label=ifelse(Avg.Length>20,Station,'')),hjust=-.25, size = 3) +
ggtitle("Fig 13: Average d13C per station vs depth") +
xlim(0,300) +
labs(x="Depth (m)", y="Station Avg d13C") +
theme_bw()
ggplot(d %>% filter(spc == 1), aes(Zoop.d15N, Avg.d15N, color=Station, label=Station))+
geom_point() +
geom_text(aes(label=Station),hjust=-.25) +
ggtitle("Fig 14: Average d15N plankton vs cod") +
xlim(5, 7) +
labs(x="Zoop d15N", y="Cod d15N") +
theme_bw()
ggplot(d %>% filter(spc == 1), aes(Zoop.d13C, Avg.d13C, color=Station, label=Station))+
geom_point() +
geom_text(aes(label=Station),hjust=-.25) +
ggtitle("Fig 15: Average d13C plankton vs cod") +
xlim(-22.5, -18) +
labs(x="Zoop d13C", y="Cod d13C") +
theme_bw()
cod.Keo <- d %>% filter(spc == 1)
cor.test(cod.Keo$Length, cod.Keo$d15N)
##
## Pearson's product-moment correlation
##
## data: cod.Keo$Length and cod.Keo$d15N
## t = 2.8428, df = 17, p-value = 0.01124
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.1528300 0.8123902
## sample estimates:
## cor
## 0.5676358
cor.test(cod.Keo$Zoop.d15N, cod.Keo$Avg.d15N)
##
## Pearson's product-moment correlation
##
## data: cod.Keo$Zoop.d15N and cod.Keo$Avg.d15N
## t = 1.4823, df = 17, p-value = 0.1566
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.1369479 0.6869558
## sample estimates:
## cor
## 0.338305
cor.test(cod.Keo$Station.Depth, cod.Keo$Avg.d15N)
##
## Pearson's product-moment correlation
##
## data: cod.Keo$Station.Depth and cod.Keo$Avg.d15N
## t = 2.4841, df = 17, p-value = 0.02371
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.08078024 0.78602284
## sample estimates:
## cor
## 0.5160549
###################################################
###################################################
###################################################
cod.All <- d %>% filter(spc == 1 | spc == 3)
cor.test(cod.All$Length, cod.All$d15N)
##
## Pearson's product-moment correlation
##
## data: cod.All$Length and cod.All$d15N
## t = 0.8713, df = 20, p-value = 0.3939
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.2505794 0.5671167
## sample estimates:
## cor
## 0.191232
cor.test(cod.All$Zoop.d15N, cod.All$Avg.d15N)
##
## Pearson's product-moment correlation
##
## data: cod.All$Zoop.d15N and cod.All$Avg.d15N
## t = 2.7373, df = 20, p-value = 0.0127
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.1287930 0.7734288
## sample estimates:
## cor
## 0.5220538
cor.test(cod.All$Station.Depth, cod.All$Avg.d15N)
##
## Pearson's product-moment correlation
##
## data: cod.All$Station.Depth and cod.All$Avg.d15N
## t = 0.64839, df = 20, p-value = 0.5241
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## -0.2960318 0.5328584
## sample estimates:
## cor
## 0.1434849
(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