The Northeast U.S. Shelf (NES) Long-Term Ecological Research (LTER) project integrates observations, experiments, and models to understand and predict how planktonic food webs are changing, and how those changes impact the productivity of higher trophic levels. These data represent the diet composition of small pelagic fishes across the Northeast U.S. Continental Shelf.

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Loading Data

library(bonanza)
library(tidyverse)

diet <- na.omit(bonanza::nes_diet) %>%
  filter(preyCount < 50000)

diet$logPrey <- log(diet$preyCount)

Initial Plots

Creating scatterplots of preyCount versus two predictors of interest:

ggplot(data = diet, aes(x = forkLength, y = logPrey)) +
         geom_point()

ggplot(data = diet, aes(x = average_depth, y = logPrey)) +
         geom_point()

While a majority of the points hover around a very small number, some trends are visible. Using the log transformation, we are able to see that the prey count seems to decrease as the average sampling depth decreases.

Grouped Histograms

Extracting data concerning a specific prey species:

sub <- diet %>%
  filter(scientificName_preyTaxon == "Centropages")

Creating histogram of preyCount, grouped by predator species:

ggplot(sub, aes(x = logPrey)) +
  geom_histogram(aes(color = vernacularName, fill = vernacularName),
                 position = "identity", bins = 10, alpha=I(0.3)) +
  scale_color_manual(values = c("#00AFBB", "#E7B800", "#FADB7D", "#E38566", "#F68FFF")) +
  scale_fill_manual(values = c("#00AFBB", "#E7B800", "#FADB7D", "#E38566", "#F68FFF")) +
  ggtitle("Centropage Prey Count by Predator Species")

Choosing another species:

sub <- diet %>%
  filter(scientificName_preyTaxon == "Calanoida")

ggplot(sub, aes(x = logPrey)) +
  geom_histogram(aes(color = vernacularName, fill = vernacularName),
                 position = "identity", bins = 10, alpha=I(0.3)) +
  scale_color_manual(values = c("#00AFBB", "#E7B800", "#FADB7D", "#E38566", "#F68FFF")) +
  scale_fill_manual(values = c("#00AFBB", "#E7B800", "#FADB7D", "#E38566", "#F68FFF")) +
  ggtitle("Calanoida Prey Count by Predator Species")
ale <- diet %>%
  filter(vernacularName == "Alewife")

ggplot(ale, aes(x = logPrey)) +
  geom_histogram(aes(color = scientificName_preyTaxon, fill = scientificName_preyTaxon),
                 position = "identity", bins = 10, alpha=I(0.3)) +
  ggtitle("Alewife Diet Observation by Prey Species")

It is clear that Alewife prefers certain species of prey, such as Parathemisto and Calanoida, which exhibit either high frequency of appearance or a high count. Using these two forms of grouped histograms is useful for determining predator diet preferences and the overall structure of the food web.

Network Analysis (In Progress)

Loading igraph package:

library(igraph)

g = graph_from_data_frame(diet, directed = TRUE, vertices = NULL)

print(g)

Citation

Suca, J.J. 2019. Diet Composition for Small Pelagic Fishes across the Northeast U.S. Continental Shelf from 2013-2015 ver 2. Environmental Data Initiative. https://doi.org/10.6073/pasta/4c1ef62808519d46b14a8493616e1580 (Accessed 2021-03-07).

Raw Data Processing

See "data-raw/nes_diet.R".



TokyoExpress/bonanza documentation built on March 24, 2021, 2:21 a.m.