Code
library(tidyverse)
library(here)
library(patchwork)
library(lubridate)
library(janitor)
library(tsibble)
library(feasts)
library(fable)
library(RColorBrewer)
February 2, 2024
This report describes the abundance of three species of fish (coho salmon, jack coho salmon, and steel-head salmon) from 2001 to 2010 in the Willamette Falls fish ladder passage on the Willamette river in Oregon. The abundance of salmon is visualized over the 10 year study for each species and by the total counts of each species for each year. Trends and seasonality in salmon abundance between species are discussed in this report.
Over the last 10 years, salmon abundance in the Willamette Falls fish passage has clear seasonality and oscillations for the three species. Coho salmon abundance has increased over the 10 year span, while Jack-coho and steelhead remained consistent as shown in Figure 1, Plot A. In any given year, coho and jack-coho salmon abundances peak in the fall months (Sept - Nov) and the steelhead salmon abundance peaks in the summer (May - July) as shown in Figure 1, Plot B.
fish_df <- read_csv(here('posts', '2024-02-02-time-series','data', 'willamette_fish_passage.csv')) %>%
clean_names()
salmon_df <- fish_df %>%
select('project', 'date', 'coho', 'jack_coho', 'steelhead') %>%
replace_na(replace = list(coho = 0, jack_coho = 0, steelhead = 0))
salmon_ts <- salmon_df %>%
mutate(date = lubridate::mdy(date)) %>%
as_tsibble(key = NULL,
index = date)
salmon_ts_pivot <- salmon_ts %>%
pivot_longer(cols = c('coho', 'jack_coho', 'steelhead'),
names_to = "species",
values_to = "count")
plot_ts <- ggplot(data = salmon_ts_pivot, aes(x = date, y = count, color = species)) +
geom_line() +
labs(x = " ",
y = 'Abundance',
color = "Species",
subtitle = "2001 to 2010")+
theme_minimal() +
scale_x_date(date_breaks = "1 year", date_labels = "%Y")+
scale_color_manual(values = c("darkgreen", "red", "#999999"),
labels = c("Coho", "Jack Coho", "Steelhead"))+
theme(axis.text.x = element_text(angle = 45, hjust = 1))
salmon_ts_filter <- salmon_ts_pivot %>%
filter_index("2009-01-01" ~ ".")
zoom_plot_ts <- ggplot(data = salmon_ts_filter, aes(x = date, y = count, color = species)) +
geom_line() +
labs(x = " ",
y = 'Abundance',
color = "Species",
subtitle = "2009 to 2010")+
theme_minimal() +
scale_x_date(date_breaks = "2 month", date_labels = "%b")+
scale_color_manual(values = c("darkgreen", "red", "#999999"),
labels = c("Coho", "Jack Coho", "Steelhead"))+
theme(axis.text.x = element_text(angle = 45, hjust = 1))
As shown in Figure 2, the coho salmon abundance peaks in the fall months from Sept. to Nov. There is a clear increase in the species population size from 2001 to 2010. Likewise, the jack-coho abundance spikes in the fall months and also has an increase in species abundance over the ten years span. In comparison, Steelhead salmon abundance more steadily rises from January through July. There numbers appear to be declining over the years.
As shown in Figure 3, there are clear trends in annual salmon counts for each species from 2001 to 2010. The Steelhead salmon have the greatest abundance out of the three species and have an overall declining trend with a increase from 2009 to 2010. Coho salmon remain consistent from 2001 to 2008 and then have a large increase in their abundance. And Jack coho salmon have the lowest species abundance across the years and remain at a constant size.”
year_plot2 <- ggplot(data = fish_year, aes(x = year, y = count, color = species)) +
geom_line() +
scale_color_manual(values = c("darkgreen", "red", "#999999"),
labels = c("Coho", "Jack Coho", "Steelhead")) +
labs(x = '',
y = 'Abundance',
color = "Species")+
theme_minimal() +
theme(axis.text.x = element_text(angle = 45, hjust = 1))+
scale_x_continuous(breaks = fish_year$year)
year_plot2
U.S. Army Corps of Engineers, NWD; Chelan, Douglas, and Grant County PUDs; Yakima Klickitat Fisheries Project; Colville Tribes Fish & Wildlife (OBMEP); Oregon Department of Fish & Wildlife; Washington Department of Fish & Wildlife. DART Adult Passage Counts Graphics & Text. Columbia Basin Research, Univeristy of Washington. Accessed on January 25, 2024. https://www.cbr.washington.edu/dart/query/adult_graph_text
@online{calbert2024,
author = {Calbert, Madison},
title = {Time {Series} {Analysis}},
date = {2024-02-02},
url = {https://madicalbert.github.io/posts/2024-02-02-time-series/},
langid = {en}
}