Taken from California Department of Fish and Wildlife (CDFW) Website (https://wildlife.ca.gov/Conservation/Delta/Bay-Study):
The San Francisco Bay Study (Bay Study) was established in 1980 to determine the effects of freshwater outflow on the abundance and distribution of fish and mobile crustaceans in the San Francisco Estuary, primarily downstream of the Sacramento-San Joaquin Delta.
Sampling ranges from south of the Dumbarton Bridge in South San Francisco Bay, to just west of Alcatraz Island in Central San Francisco Bay, throughout San Pablo and Suisun bays, north to the confluence Steamboat and Cache sloughs on the Sacramento River, and east to Old River Flats on the San Joaquin River. The open water or boat survey samples 52 stations monthly: 35 original stations, 7 stations added in 1988, 4 stations added in 1991, and 6 stations added in 1994. The study included a beach seine survey, discontinued in 1987, and a shore-based ringnet survey for crabs, discontinued in 1994.
The Bay Study uses a 42-foot stern trawler to sample with 2 trawl nets at each open water station. The otter trawl, which samples demersal fishes, shrimp, and crabs, is towed against the current at a standard engine rpm for 5 minutes then retrieved. The midwater trawl, which samples pelagic fishes, is towed with the current at a standard engine rpm for 12 minutes and retrieved obliquely such that all depths are sampled equally. The open water survey included a plankton net that sampled larval fish and crustaceans, but this was discontinued in 1989.
Fish, caridean shrimp, and brachyuran crabs are identified, measured, and counted. Shrimp and crabs are also sexed. Sampling effort is quantified (i.e. distance towed, volume of water filtered) and salinity, water temperature, Secchi depth, and station depth are measured; wave height, tide, cloud cover, and tow direction are categorized. The length, catch, and effort data is used to calculate catch-per-unit-effort (CPUE) by species and age class. The CPUE data is used to calculate monthly and annual abundance indices, which are used to track seasonal and annual population trends. Important factors that control or regulate abundance and distribution of fish and mobile crustaceans in the estuary include salinity, temperature, freshwater outflow, ocean temperature, upwelling, and surface currents, primary and secondary productivity, and introduced species. We are interested in how species respond to changes in the physical environment on several temporal scales – seasonal, annual, decadal, and longer.
Load data for key species using deltafish package and show map with CDFW Bay Study stations. Yellow indicates stations we will be using for the study per Denise’s suggestion and the CDFW station “regions”.
#Load all species except for Striped Bass (Delta Smelt, Longfin Smelt, Threadfin Shad, American Shad, Northern Anchovy, and Pacific Herring)
BayStudy_allfish<-get_fish(source="Bay Study",
taxa=c("Hypomesus transpacificus","Spirinchus thaleichthys","Dorosoma petenense", "Alosa sapidissima","Engraulis mordax","Clupea pallasii"),
remove_cols=c("Sal_bot", "Secchi_estimated", "Cable_length", "Notes_flowmeter", "Notes_catch"))
#Load Striped Bass length cutoff file from Christina
length_cutoff_striped_bass<-read_excel("data/data_in/Bay Study Cut Off Lengths_7Oct21.xlsx", sheet = "CutoffLengths") %>%
filter(AlphaCode=="STRBAS") %>% select(Month,Age0Cut)
#Load Striped Bass age-0
#Load data, join with excel sheet for age cutoff
BayStudy_Striped_Bass_age0 <-get_fish(source="Bay Study",
taxa="Morone saxatilis",
remove_cols=c("Sal_bot", "Secchi_estimated", "Cable_length", "Notes_flowmeter", "Notes_catch")) %>%
mutate(Month=month(Date)) %>%
left_join(length_cutoff_striped_bass)
#Change larger Striped Bass count to zero
BayStudy_Striped_Bass_age0$Count<-ifelse(BayStudy_Striped_Bass_age0$Length<BayStudy_Striped_Bass_age0$Age0Cut,BayStudy_Striped_Bass_age0$Count,0)
BayStudy_Striped_Bass_age0$Count[is.na(BayStudy_Striped_Bass_age0$Count)] <- 0
#Load Striped Bass age-1 or above
BayStudy_Striped_Bass_large <-get_fish(source="Bay Study",
taxa="Morone saxatilis",
remove_cols=c("Sal_bot", "Secchi_estimated", "Cable_length", "Notes_flowmeter", "Notes_catch")) %>%
mutate(Month=month(Date)) %>% left_join(length_cutoff_striped_bass)
#Change age-0 Striped Bass count to zero; note that there was no 'unmeasured' fish in the dataset
BayStudy_Striped_Bass_large$Count<-ifelse(BayStudy_Striped_Bass_large$Length>=BayStudy_Striped_Bass_large$Age0Cut,BayStudy_Striped_Bass_large$Count,0)
BayStudy_Striped_Bass_large$Count[is.na(BayStudy_Striped_Bass_large$Count)] <- 0
BayStudy_Striped_Bass_large$Taxa<-"Morone saxatilis large"
#Extract coordinates
BayStudyCoords<-BayStudy_allfish %>% group_by(Station) %>% summarise(Latitude=mean(Latitude),Longitude=mean(Longitude))
BayStudyCoords<-BayStudyCoords[complete.cases(BayStudyCoords), ]
# plot the map
map <- create_station_map(BayStudyCoords)
map
All station sampling effort. Export stations with full year’s worth of data since 1980 (including those outside the regional boundaries).
##Sample size
BayStudy_full <- bind_rows(BayStudy_allfish,BayStudy_Striped_Bass_age0,BayStudy_Striped_Bass_large) %>%
mutate(Month=month(Date)) %>% filter(Month %in% c(4:10) & !is.na(Latitude) & !is.na(Longitude)) %>%
mutate(Station=as.numeric(Station))
##Sample size
Baystudy_sample_size <- BayStudy_full %>% group_by(SampleID,Date,Month,Station,Method) %>%
summarise(Latitude=mean(Latitude),Longitude=mean(Longitude)) %>% mutate(sample_size=1,Year=year(Date)) %>%
group_by(Year,Station,Method,Latitude,Longitude) %>% summarise(sample_size=sum(sample_size))
#Plot effort across stations and years for midwater trawl
ggplot(Baystudy_sample_size %>% filter(Method== "Midwater trawl"),aes(x=Year,y=as.factor(Station),fill=sample_size))+geom_tile()+
scale_x_continuous(breaks=c(1970,1980,1990,1995,2000,2010,2015,2020)) + labs(title= "Bay Study Midwater Trawl")
#Plot effort across stations and years for otter trawl
ggplot(Baystudy_sample_size %>% filter(Method== "Otter trawl"),aes(x=Year,y=as.factor(Station),fill=sample_size))+geom_tile()+
scale_x_continuous(breaks=c(1970,1980,1990,1995,2000,2010,2015,2020)) + labs(title= "Bay Study Otter Trawl")
BayStudyCoords<-Baystudy_sample_size %>% filter(Station %in% c(101:110,211:216,317:323,325,427:433,534,535,736,837)) %>% group_by(Station) %>% summarise(Latitude=mean(Latitude),Longitude=mean(Longitude))
create_station_map(BayStudyCoords)
Per Denise’s suggestion, we will be subsetting data from just April to October. Will also subset according to the regional cutoffs.
#Limit the data to just April to October
BayStudy_annual <- bind_rows(BayStudy_allfish,BayStudy_Striped_Bass_age0,BayStudy_Striped_Bass_large) %>%
mutate(Month=month(Date)) %>% filter(Month %in% c(4:10) & !is.na(Latitude) & !is.na(Longitude)) %>%
region_assigner(analysis="annual",plot=TRUE) %>%
mutate(Station=as.numeric(Station))
unique(BayStudy_annual$Station)
## [1] 427 428 429 430 431 432 433 534 535 736 837 447 750 751 752 853 760 761 863
## [20] 864 865
Check sampling effort through the years for stations within the regions (separated by gear)
##Sample size
Baystudy_sample_size <- BayStudy_annual %>% group_by(SampleID,Date,Month,Station,Method) %>%
summarise(Latitude=mean(Latitude),Longitude=mean(Longitude)) %>% mutate(sample_size=1,Year=year(Date)) %>%
group_by(Year,Station,Method,Latitude,Longitude) %>% summarise(sample_size=sum(sample_size))
#Plot effort across stations and years for midwater trawl
ggplot(Baystudy_sample_size %>% filter(Method== "Midwater trawl"),aes(x=Year,y=as.factor(Station),fill=sample_size))+geom_tile()+
scale_x_continuous(breaks=c(1970,1980,1990,1995,2000,2010,2015,2020)) + labs(title= "Bay Study Midwater Trawl")
#Plot effort across stations and years for otter trawl
ggplot(Baystudy_sample_size %>% filter(Method== "Otter trawl"),aes(x=Year,y=as.factor(Station),fill=sample_size))+geom_tile()+
scale_x_continuous(breaks=c(1970,1980,1990,1995,2000,2010,2015,2020)) + labs(title= "Bay Study Otter Trawl")
Check sampling effort through the years for the annual stations (separated by gear). Used only those sampled since 1980.
##Sample size
Baystudy_sample_size <- BayStudy_annual %>% group_by(SampleID,Date,Month,Station,Method) %>%
summarise(Latitude=mean(Latitude),Longitude=mean(Longitude)) %>% mutate(sample_size=1,Year=year(Date)) %>%
filter(Station %in% c(427,428,429,439,431,432,433,534,535,736,837)) %>%
group_by(Year,Station,Method,Latitude,Longitude) %>% summarise(sample_size=sum(sample_size))
#Plot effort across stations and years for midwater trawl
ggplot(Baystudy_sample_size %>% filter(Method== "Midwater trawl"),aes(x=Year,y=as.factor(Station),fill=sample_size))+geom_tile()+
scale_x_continuous(breaks=c(1970,1980,1990,2000,2010,2015,2020)) + labs(title= "Bay Study Midwater Trawl")
#Plot effort across stations and years for otter trawl
ggplot(Baystudy_sample_size %>% filter(Method== "Otter trawl"),aes(x=Year,y=as.factor(Station),fill=sample_size))+geom_tile()+
scale_x_continuous(breaks=c(1970,1980,1990,2000,2010,2015,2020)) + labs(title= "Bay Study Otter Trawl")
#Plot map
BayStudyCoords<-Baystudy_sample_size %>% group_by(Station) %>% summarise(Latitude=mean(Latitude),Longitude=mean(Longitude))
create_station_map(BayStudyCoords)
BayStudy_annual<- BayStudy_annual %>% filter(Station %in% c(427,428,429,439,431,432,433,534,535,736,837))
Subset data to just the final stations and calculate biomass. We then calculated average biomass and CPUE for each region and year, and then averaged across regions to calculate annual values.
#Calculate final annual values by:
#1) Calculate biomass based on Kimmerer et al. 2005
#2) Averaging CPUE and biomass by region for each year
#3) Average across region for each year to get an annual value
BayStudy_annual_derived <- BayStudy_annual %>%
mutate(Length=ifelse(is.na(Length),0,Length)) %>%
mutate(Year=year(Date)) %>%
mutate(Biomass = case_when(
Taxa=="Hypomesus transpacificus" ~ (0.0018*(Length^3.38))*Count,
Taxa=="Spirinchus thaleichthys" ~ (0.0005*(Length^3.69))*Count,
Taxa=="Dorosoma petenense" ~ (0.0072*(Length^3.16))*Count,
Taxa=="Alosa sapidissima" ~ (0.0074*(Length^3.09))*Count,
Taxa=="Engraulis mordax" ~ (0.0015*(Length^3.37))*Count,
Taxa=="Clupea pallasii" ~ (0.0015*(Length^3.44))*Count,
Taxa=="Morone saxatilis" ~ (0.0066*(Length^3.12))*Count,
Taxa=="Morone saxatilis large" ~ (0.0066*(Length^3.12))*Count))
BayStudy_annual_values <- BayStudy_annual_derived %>%
group_by(Year,Date,Station,Method,Taxa) %>%
summarise(Biomass=sum(Biomass),Catch_per_tow=sum(Count)) %>%
group_by(Year,Station,Method,Taxa) %>%
summarise(Biomass=mean(Biomass),Catch_per_tow=mean(Catch_per_tow)) %>%
group_by(Year,Method,Taxa) %>%
summarise(Biomass=mean(Biomass),Catch_per_tow=mean(Catch_per_tow)) %>%
mutate(CommonName= case_when(
Taxa=="Hypomesus transpacificus" ~ "DeltaSmelt",
Taxa=="Spirinchus thaleichthys" ~ "LongfinSmelt",
Taxa=="Dorosoma petenense" ~ "ThreadfinShad",
Taxa=="Alosa sapidissima" ~ "AmericanShad",
Taxa=="Engraulis mordax" ~ "NorthernAnchovy",
Taxa=="Clupea pallasii" ~ "PacificHerring",
Taxa=="Morone saxatilis" ~ "StripedBass_age0",
Taxa=="Morone saxatilis large" ~ "StripedBass_age1above"))
#If you check the original dataset, there are no unmeasured fish flag
#Summarize biomass as you would normally
Additional processing code to get separate values for each gear and unit(biomass or catch per tow). Also added estuarine forage and marine forage guilds as seen in FMWT data. Lastly, export stations into the stations folder.
#How to subset just estuarine species
toMatchEstuarine<- c("Smelt","age0","Shad")
#How to subset just marine species
toMatchMarine<- c("Herring","Anchovy")
#Add function to process each data set type
fish_data_compiler<-function(data, gear_filter, metric_filter, columns_subset, prefix_name, plot=TRUE){
if(!gear_filter%in%c("Midwater trawl", "Otter trawl")){
stop("Gear must be in Bay Study")
}
if(!metric_filter%in%c("Catch_per_tow", "Biomass")){
stop("Must be either Catch_per_tow OR Biomass")
}
out <- data %>% filter(Method==gear_filter) %>% subset(select=columns_subset) %>%
{if(metric_filter=="Catch_per_tow"){
pivot_wider(.,names_from =CommonName,values_from = Catch_per_tow,names_prefix= prefix_name)
}else{
pivot_wider(.,names_from =CommonName,values_from = Biomass,names_prefix= prefix_name)
}}
out$EstuarineFishes<-rowSums(out[,grep(paste(toMatchEstuarine,collapse="|"), names(out))])
out$MarineFishes<-rowSums(out[,grep(paste(toMatchMarine,collapse="|"), names(out))])
names(out)[names(out) == 'EstuarineFishes'] <- paste(prefix_name,"Estuarine_pelagic_forage_fishes",sep = "")
names(out)[names(out) == 'MarineFishes'] <- paste(prefix_name,"Marine_pelagic_forage_fishes",sep = "")
return(out)
}
BayStudy_Midwater_annual_values_CPUE<- fish_data_compiler(data=BayStudy_annual_values,metric_filter="Catch_per_tow",gear_filter="Midwater trawl",columns_subset = c("Year","CommonName","Catch_per_tow"),prefix_name = "BayStudy_MidwaterTrawl_fish_catch_per_tow_")
BayStudy_Otter_annual_values_CPUE <- fish_data_compiler(data=BayStudy_annual_values,metric_filter="Catch_per_tow",gear_filter="Otter trawl",columns_subset = c("Year","CommonName","Catch_per_tow"),prefix_name = "BayStudy_OtterTrawl_fish_catch_per_tow_")
BayStudy_Midwater_annual_values_biomass <- fish_data_compiler(data=BayStudy_annual_values,metric_filter="Biomass",gear_filter="Midwater trawl",columns_subset = c("Year","CommonName","Biomass"),prefix_name = "BayStudy_MidwaterTrawl_fish_biomass_")
BayStudy_Otter_annual_values_biomass <- fish_data_compiler(data=BayStudy_annual_values,metric_filter="Biomass",gear_filter="Otter trawl",columns_subset = c("Year","CommonName","Biomass"),prefix_name = "BayStudy_OtterTrawl_fish_biomass_")
BayStudy_annual_values_final<-full_join(BayStudy_Midwater_annual_values_CPUE,
BayStudy_Midwater_annual_values_biomass) %>%
full_join(BayStudy_Otter_annual_values_CPUE, by="Year") %>% full_join(BayStudy_Otter_annual_values_biomass, by="Year")
write.csv(BayStudy_annual_values_final,row.names=FALSE,file=file.path("data/annual_averages/fish_BayStudy.csv"))
Same as previous code, but add region.
BayStudy_annual_values_by_region <- BayStudy_annual_derived %>%
group_by(Year,Region,Date,Station,Method,Taxa) %>%
summarise(Biomass=sum(Biomass),Catch_per_tow=sum(Count)) %>%
group_by(Year,Region,Station,Method,Taxa) %>%
summarise(Biomass=mean(Biomass),Catch_per_tow=mean(Catch_per_tow)) %>%
group_by(Year,Region,Method,Taxa) %>%
summarise(Biomass=mean(Biomass),Catch_per_tow=mean(Catch_per_tow)) %>%
mutate(CommonName= case_when(
Taxa=="Hypomesus transpacificus" ~ "DeltaSmelt",
Taxa=="Spirinchus thaleichthys" ~ "LongfinSmelt",
Taxa=="Dorosoma petenense" ~ "ThreadfinShad",
Taxa=="Alosa sapidissima" ~ "AmericanShad",
Taxa=="Engraulis mordax" ~ "NorthernAnchovy",
Taxa=="Clupea pallasii" ~ "PacificHerring",
Taxa=="Morone saxatilis" ~ "StripedBass_age0",
Taxa=="Morone saxatilis large" ~ "StripedBass_age1above"))
BayStudy_Midwater_annual_values_CPUE_by_region<- fish_data_compiler(data=BayStudy_annual_values_by_region,metric_filter="Catch_per_tow",gear_filter="Midwater trawl",columns_subset = c("Year","CommonName","Region","Catch_per_tow"),prefix_name = "BayStudy_MidwaterTrawl_fish_catch_per_tow_")
BayStudy_Otter_annual_values_CPUE_by_region <- fish_data_compiler(data=BayStudy_annual_values_by_region,metric_filter="Catch_per_tow",gear_filter="Otter trawl",columns_subset = c("Year","CommonName","Region","Catch_per_tow"),prefix_name = "BayStudy_OtterTrawl_fish_catch_per_tow_")
BayStudy_Midwater_annual_values_biomass_by_region <- fish_data_compiler(data=BayStudy_annual_values_by_region,metric_filter="Biomass",gear_filter="Midwater trawl",columns_subset = c("Year","CommonName","Region","Biomass"),prefix_name = "BayStudy_MidwaterTrawl_fish_biomass_")
BayStudy_Otter_annual_values_biomass_by_region <- fish_data_compiler(data=BayStudy_annual_values_by_region,metric_filter="Biomass",gear_filter="Otter trawl",columns_subset = c("Year","CommonName","Region","Biomass"),prefix_name = "BayStudy_OtterTrawl_fish_biomass_")
BayStudy_annual_values_final_by_region<-full_join(BayStudy_Midwater_annual_values_CPUE_by_region,
BayStudy_Otter_annual_values_CPUE_by_region) %>%
full_join(BayStudy_Midwater_annual_values_biomass_by_region) %>% full_join(BayStudy_Otter_annual_values_biomass_by_region)
write.csv(BayStudy_annual_values_final_by_region,row.names=FALSE,file=file.path("data/annual_averages/fish_BayStudy_by_region.csv"))
Export annual station list to data/stations folder
## Use BayStudy_annual_derived so the stations saved here match those used
## in the annual and annual regional datasets saved above.
BayStudy_annual_derived %>%
select(Station, Latitude, Longitude) %>%
distinct() %>%
mutate(Survey="San Francisco Bay Study") %>%
write.csv(file=file.path("data/stations/stations_fish_BayStudy_annual.csv"),
row.names=FALSE)
Denise code: Create a dataframe for the consistent monthly stations since 1994. Do not include stations 324 and 326 (sampled one year only)
# monthly (expanded) station list
BayStudy_full_monthly <- bind_rows(BayStudy_allfish,BayStudy_Striped_Bass_age0,BayStudy_Striped_Bass_large) %>%
mutate(Month=month(Date)) %>% filter(!is.na(Latitude) & !is.na(Longitude)) %>%
mutate(Station=as.numeric(Station)) %>%
select(Source, Station, Latitude, Longitude) %>%
distinct() %>%
filter(Station != "326" & Station != "324" & Station != "753") %>%
#filter(Station > 300) %>% #remove central and south bay stations #Removed per Sam's suggestion
mutate(Monthly=TRUE)
View(BayStudy_full_monthly)
#Map showing final list of monthly stations
create_station_map(BayStudy_full_monthly)
Create dataset for month and region
BayStudy_monthly_derived <- bind_rows(BayStudy_allfish,BayStudy_Striped_Bass_age0,BayStudy_Striped_Bass_large) %>%
mutate(Month=month(Date)) %>% filter(!is.na(Latitude) & !is.na(Longitude)) %>%
mutate(Station=as.numeric(Station)) %>% mutate(Month=month(Date)) %>%
filter(Station != "326" & Station != "324" & Station != "753") %>%
filter(!is.na(Latitude) & !is.na(Longitude)) %>%
region_assigner(analysis="monthly",plot=TRUE) %>%
mutate(Length=ifelse(is.na(Length),0,Length)) %>%
mutate(Year=year(Date)) %>%
mutate(Biomass = case_when(
Taxa=="Hypomesus transpacificus" ~ (0.0018*(Length^3.38))*Count,
Taxa=="Spirinchus thaleichthys" ~ (0.0005*(Length^3.69))*Count,
Taxa=="Dorosoma petenense" ~ (0.0072*(Length^3.16))*Count,
Taxa=="Alosa sapidissima" ~ (0.0074*(Length^3.09))*Count,
Taxa=="Engraulis mordax" ~ (0.0015*(Length^3.37))*Count,
Taxa=="Clupea pallasii" ~ (0.0015*(Length^3.44))*Count,
Taxa=="Morone saxatilis" ~ (0.0066*(Length^3.12))*Count,
Taxa=="Morone saxatilis large" ~ (0.0066*(Length^3.12))*Count))
BayStudy_monthly_values_by_region <- BayStudy_monthly_derived %>%
group_by(Year,Month,Region,Date,Station,Method,Taxa) %>%
summarise(Biomass=sum(Biomass),Catch_per_tow=sum(Count)) %>%
group_by(Year,Month,Region,Station,Method,Taxa) %>%
summarise(Biomass=mean(Biomass),Catch_per_tow=mean(Catch_per_tow)) %>%
group_by(Year,Month,Region,Method,Taxa) %>%
summarise(Biomass=mean(Biomass),Catch_per_tow=mean(Catch_per_tow)) %>%
mutate(CommonName= case_when(
Taxa=="Hypomesus transpacificus" ~ "DeltaSmelt",
Taxa=="Spirinchus thaleichthys" ~ "LongfinSmelt",
Taxa=="Dorosoma petenense" ~ "ThreadfinShad",
Taxa=="Alosa sapidissima" ~ "AmericanShad",
Taxa=="Engraulis mordax" ~ "NorthernAnchovy",
Taxa=="Clupea pallasii" ~ "PacificHerring",
Taxa=="Morone saxatilis" ~ "StripedBass_age0",
Taxa=="Morone saxatilis large" ~ "StripedBass_age1above"))
BayStudy_Midwater_monthly_values_CPUE_by_region<- fish_data_compiler(data=BayStudy_monthly_values_by_region,metric_filter="Catch_per_tow",gear_filter="Midwater trawl",columns_subset = c("Year","Month","CommonName","Region","Catch_per_tow"),prefix_name = "BayStudy_MidwaterTrawl_fish_catch_per_tow_")
BayStudy_Otter_monthly_values_CPUE_by_region <- fish_data_compiler(data=BayStudy_monthly_values_by_region,metric_filter="Catch_per_tow",gear_filter="Otter trawl",columns_subset = c("Year","Month","CommonName","Region","Catch_per_tow"),prefix_name = "BayStudy_OtterTrawl_fish_catch_per_tow_")
BayStudy_Midwater_monthly_values_biomass_by_region <- fish_data_compiler(data=BayStudy_monthly_values_by_region,metric_filter="Biomass",gear_filter="Midwater trawl",columns_subset = c("Year","Month","CommonName","Region","Biomass"),prefix_name = "BayStudy_MidwaterTrawl_fish_biomass_")
BayStudy_Otter_monthly_values_biomass_by_region <- fish_data_compiler(data=BayStudy_monthly_values_by_region,metric_filter="Biomass",gear_filter="Otter trawl",columns_subset = c("Year","Month","CommonName","Region","Biomass"),prefix_name = "BayStudy_OtterTrawl_fish_biomass_")
BayStudy_monthly_values_final_by_region<-full_join(BayStudy_Midwater_monthly_values_CPUE_by_region,
BayStudy_Otter_monthly_values_CPUE_by_region) %>%
full_join(BayStudy_Midwater_monthly_values_biomass_by_region) %>% full_join(BayStudy_Otter_monthly_values_biomass_by_region)
write.csv(BayStudy_monthly_values_final_by_region,row.names=FALSE,file=file.path("data/monthly_averages/fish_BayStudy_monthly.csv"))
Export monthly station list to data/stations folder
## Use BayStudy_monthly_derived so the stations saved here match those used
## in the annual and annual regional datasets saved above.
BayStudy_monthly_derived %>%
select(Station, Latitude, Longitude) %>%
distinct() %>%
mutate(Survey="San Francisco Bay Study") %>%
write.csv(file=file.path("data/stations/stations_fish_BayStudy_monthly.csv"),
row.names=FALSE)