Skip to contents

The length based multispecies model (Hydra) uses diet composition information to set up predator prey interactions, and fits to survey indices of diet composition by species size class. The NEFSC spring and fall bottom trawl surveys collect the information required to obtain estimates of these indices.

NEFSC bottom-trawl sampling encompasses about 293,000 square km of continental shelf from Cape Hatteras, NC, to Nova Scotia, Canada in depths from 8-400 m. Food habits sampling has been conducted since 1973. Stomachs are collected at sea by NEFSC, and have been primarily analyzed at sea since 1981. Total stomach volume is estimated, each prey item is identified and sorted to the lowest possible taxonomic level, and the proportion of each prey item is estimated. Detailed methods are described in Link and Almeida (2000).

Prey composition percent by weight as shown in Figure 1 \(\ref{fig:NEFSCdecade}\) was calculated using a weighted mean (\(\overline{w_{ijs}}\)) (Link and Almeida, 2000) to estimate mean weight of prey \(i\) in predator \(j\) for statistical group \(s\). Note: Prey volumes are used as proxies for prey weight. It may be calculated as

\[\overline{w_{ijs}} = \frac{\sum_{t=1}^{N_{ts}} N_{jts}\overline{w_{ijts}}}{N_{ts}}\]

where \(t\) represents an individual bottom trawl tow, \(N_{jts}\) is the number of predator \(j\) stomachs in tow \(t\) for statistical group \(s\), \(N_{ts}\) is the number of tows in statistical group \(s\), and

\[\overline{w_{ijts}} = \frac{\sum_{k=1}^{N_{jts}} \overline{w_{ijtsk}}}{N_{jts}}\]

The mskeyrun::surveyDietcomp dataset was created using create_real_dietcomp() in ms-keyrun/data-raw.

survdiet <- mskeyrun::surveyDietcomp

#split survdiet to species then make a plot list

tmp <- survdiet %>% dplyr::filter(variable=="relmsw")

plist2 = lapply(split(tmp, tmp$Name), function(d) {
  #p1 <- 
   ggplot(d, aes(year, value, fill=prey)) +
   geom_bar(stat = "identity") + #
   ylab("Percent in Diet") +
   xlab("Year") +
   facet_wrap("season", nrow=4) +
   theme_bw() +
   viridis::scale_fill_viridis(discrete = TRUE) +
   theme(legend.position = "none"
         #legend.position="bottom",
         #legend.text=element_text(size=5)
         ) +
    geom_bar_interactive(stat = "identity", aes(tooltip = prey, data_id = prey))

})


#ggiraph(code = print(p1), height=14)  

We visualize full diet compositions below. Hover over a bar to see which prey species is represented. In this visualization, color coding is only consistent within, not across, predators.

Annual survey diet composition by species

ggiraph(code = print(plist2$Atlantic_cod), height=14)
ggiraph(code = print(plist2$Atlantic_herring), height=14)
ggiraph(code = print(plist2$Atlantic_mackerel), height=14)
ggiraph(code = print(plist2$Goosefish), height=14)
ggiraph(code = print(plist2$Haddock), height=14)
ggiraph(code = print(plist2$Silver_hake), height=14)
ggiraph(code = print(plist2$Spiny_dogfish), height=14)
ggiraph(code = print(plist2$Winter_flounder), height=14)
ggiraph(code = print(plist2$Winter_skate), height=14)
ggiraph(code = print(plist2$Yellowtail_flounder), height=14)

Species interactions

In this visualization, the 10 mskeyrun focal species have the same color across predator plots, and all other prey species are gray. Define colors:

#from http://medialab.github.io/iwanthue/ using 10 categories, colorblind friendly

preycol <- c(  #make object preycol by combining this list of hex codes
  "#007e32",
  "#000266",
  "#d4c434",
  "#692e00",
  "#96bd77",
  "#388eff",
  "#c24914",
  "#8afcdc",
  "#ffadfe",
  "#cdff94")

names(preycol) <- as.factor(names(plist2))
focalprey <- mskeyrun::focalSpecies %>%
  dplyr::filter(modelName != "Pollock") %>% # not using in these models
  dplyr::select(-NESPP3) %>%
  dplyr::mutate(Name = modelName) %>%
  dplyr::distinct() %>%
  dplyr::select(SCIENTIFIC_NAME, SPECIES_ITIS, Name)

tmpcol <- tmp %>%
  dplyr::left_join(focalprey, by=c("prey" = "SCIENTIFIC_NAME")) %>%
  dplyr::rename(preyName = Name.y,
                Name = Name.x) 

preycolsel <- preycol[names(preycol) %in% tmpcol$preyName] 
#names(preycolsel) <- toupper(names(preycolsel))

plist3 = lapply(split(tmpcol, tmpcol$Name), function(d) {
  #p1 <- 
   ggplot(d, aes(year, value, fill=preyName)) +
   geom_bar(stat = "identity") + #
   ylab("Percent in Diet") +
   xlab("Year") +
   facet_wrap("season", nrow=4) +
   theme_bw() +
   scale_fill_manual(values=preycolsel) +
   #viridis::scale_fill_viridis(discrete = TRUE) +
   theme(#legend.position = "none"
         legend.position="right",
         legend.text=element_text(size=5)
         ) #+
    #geom_bar_interactive(stat = "identity", aes(tooltip = prey, data_id = prey))

})

Proportion of diets that are mskeyrun focal species

ggiraph(code = print(plist3$Atlantic_cod), height=14)
ggiraph(code = print(plist3$Atlantic_herring), height=14)
ggiraph(code = print(plist3$Atlantic_mackerel), height=14)
ggiraph(code = print(plist3$Goosefish), height=14)
ggiraph(code = print(plist3$Haddock), height=14)
ggiraph(code = print(plist3$Silver_hake), height=14)
ggiraph(code = print(plist3$Spiny_dogfish), height=14)
ggiraph(code = print(plist3$Winter_flounder), height=14)
ggiraph(code = print(plist3$Winter_skate), height=14)
ggiraph(code = print(plist3$Yellowtail_flounder), height=14)

Diet composition by predator length

The dataset mskeyrun::surveyLenDietcomp is not intended as an end product. It is an interim product for input into hydradata and other model specific dataset processing code to aggregate meansw at length into length or age specific predator groups. The variances calculated here are meaningless as many are based on a single tow when splitting predators to 1 cm length bins.

You have been warned.