Information on the Summer Townet Survey is available on the California Department of Fish and Wildlife website: https://wildlife.ca.gov/Conservation/Delta/Townet-Survey
## Annual, no regions:
STN_annual_values <- STN_combined_derived %>%
group_by(Year, Method, CommonName) %>%
summarise(Biomass=mean(Biomass),
Catch_per_tow=mean(Count)) %>%
group_by(Year, Method, CommonName) %>%
summarise(Biomass=mean(Biomass),
Catch_per_tow=mean(Catch_per_tow))
STN_annual_values_CPUE <- STN_annual_values %>%
filter(Method=="STN net") %>%
subset(select=c(Year,CommonName,Catch_per_tow)) %>%
pivot_wider(names_from=CommonName,
values_from=Catch_per_tow,
names_prefix="STN_fish_catch_per_tow_") %>%
mutate(STN_fish_catch_per_tow_Estuarine_pelagic_forage_fishes=
(STN_fish_catch_per_tow_AmericanShad +
STN_fish_catch_per_tow_ThreadfinShad +
STN_fish_catch_per_tow_DeltaSmelt +
STN_fish_catch_per_tow_LongfinSmelt +
STN_fish_catch_per_tow_StripedBass_age0),
STN_fish_catch_per_tow_Marine_pelagic_forage_fishes=
(STN_fish_catch_per_tow_NorthernAnchovy +
STN_fish_catch_per_tow_PacificHerring))
STN_annual_values_biomass <- STN_annual_values %>%
filter(Method=="STN net") %>%
subset(select=c(Year,CommonName,Biomass)) %>%
pivot_wider(names_from=CommonName,
values_from=Biomass,
names_prefix="STN_fish_biomass_") %>%
mutate(STN_fish_biomass_Estuarine_pelagic_forage_fishes=
(STN_fish_biomass_AmericanShad +
STN_fish_biomass_ThreadfinShad +
STN_fish_biomass_DeltaSmelt +
STN_fish_biomass_LongfinSmelt +
STN_fish_biomass_StripedBass_age0),
STN_fish_biomass_Marine_pelagic_forage_fishes=
(STN_fish_biomass_NorthernAnchovy +
STN_fish_biomass_PacificHerring))
STN_annual_values_final <- full_join(STN_annual_values_CPUE,
STN_annual_values_biomass)
write.csv(STN_annual_values_final, row.names=FALSE,
file=file.path("data/annual_averages/fish_STN_noregions.csv"))
## Annual, with regions:
STN_annual_regional_values <- STN_combined_derived %>%
group_by(Year, Region, Method, CommonName) %>%
summarise(Biomass=mean(Biomass),
Catch_per_tow=mean(Count)) %>%
group_by(Year, Method, CommonName, Region) %>%
summarise(Biomass=mean(Biomass),
Catch_per_tow=mean(Catch_per_tow))
STN_annual_regional_values_CPUE <- STN_annual_regional_values %>%
filter(Method=="STN net") %>%
subset(select=c(Year,CommonName,Catch_per_tow, Region)) %>%
pivot_wider(names_from=CommonName,
values_from=Catch_per_tow,
names_prefix="STN_fish_catch_per_tow_") %>%
mutate(STN_fish_catch_per_tow_Estuarine_pelagic_forage_fishes=
(STN_fish_catch_per_tow_AmericanShad +
STN_fish_catch_per_tow_ThreadfinShad +
STN_fish_catch_per_tow_DeltaSmelt +
STN_fish_catch_per_tow_LongfinSmelt +
STN_fish_catch_per_tow_StripedBass_age0),
STN_fish_catch_per_tow_Marine_pelagic_forage_fishes=
(STN_fish_catch_per_tow_NorthernAnchovy +
STN_fish_catch_per_tow_PacificHerring))
STN_annual_regional_values_biomass <- STN_annual_regional_values %>%
filter(Method=="STN net") %>%
subset(select=c(Year,CommonName,Biomass, Region)) %>%
pivot_wider(names_from=CommonName,
values_from=Biomass,
names_prefix="STN_fish_biomass_") %>%
mutate(STN_fish_biomass_Estuarine_pelagic_forage_fishes=
(STN_fish_biomass_AmericanShad +
STN_fish_biomass_ThreadfinShad +
STN_fish_biomass_DeltaSmelt +
STN_fish_biomass_LongfinSmelt +
STN_fish_biomass_StripedBass_age0),
STN_fish_biomass_Marine_pelagic_forage_fishes=
(STN_fish_biomass_NorthernAnchovy +
STN_fish_biomass_PacificHerring))
STN_annual_regional_values_final <- full_join(STN_annual_regional_values_CPUE,
STN_annual_regional_values_biomass)
write.csv(STN_annual_regional_values_final, row.names=FALSE,
file=file.path("data/annual_averages/fish_STN_regions.csv"))
Lastly, export out station list to data/stations folder
## Use STN_combined_derived so the stations saved here match those used in the annual
## and annual regional datasets saved above.
STN_combined_derived %>%
dplyr::select(Station, Latitude, Longitude) %>%
dplyr::distinct() %>%
dplyr::arrange(Station) %>%
dplyr::mutate(Survey="Summer Townet") %>%
write.csv(row.names=FALSE,
file=file.path("data/stations/stations_fish_STN_annual.csv"))