knitr::opts_chunk$set(echo = TRUE)
knitr::opts_knit$set(root.dir = rprojroot::find_rstudio_root_file())
library(tidyverse)
library(readxl)
library(cvpiaHabitat)
library(scales)

Future Data Improvements

[Future data improvement bullets]

Instream Spawning and Rearing Habiat

Data Source: [Spawning Aceituno 1993 (FWS) PHABSIM model and the rearing from the FWS River2D model.] TODO [Need to add links to souce documents TODO https://flowwest.github.io/cvpiaHabitat/reference/stanislaus_river_instream.html]

Description of modeling TODO

Instream spawning and rearing habitat for Fall Run Chinook Salmon and Steelhead in the Stanislaus River is based on data from [data source description]. The [DWR FERC instream spawning and rearing habitat data] was provided by Mark Gard from the U.S. Fish and Wildlife Service in a spreadsheet (see '~/cvpiaHabitat/data-raw/mark_gard_data/IFIMWUA.xlsx'). Mark Gard instructed us to use I4:N60 of the 'Stanislaus' tab within his 'IFIMWUA.xlsx' These cells represent the sums of the rearing habitat in the canyon segment, knights ferry to orange blossom, orange blossom to jacomb myers, and jacob myers to san joaquin and then converted from sqft to sqft/1000ft. Spawning is modeled as one 50 mi segment.

# stanislaus_raw <- read_excel('data-raw/mark_gard_data/IFIMWUA.xlsx', range = "I4:N60", sheet = 'Stanislaus',
#                              col_names = c('flow_cfs', 'FR_fry_wua', 'ST_fry_wua', 'FR_juv_wua', 'ST_juv_wua', 'FR_spawn_wua'))
# stanislaus_raw
# stanislaus_river_instream <- stanislaus_raw %>% 
#   mutate(watershed = 'Stanislaus River') %>% 
#   select(flow_cfs, FR_spawn_wua, FR_fry_wua, FR_juv_wua, ST_fry_wua, ST_juv_wua, watershed)
# 
# # devtools::use_data(stanislaus_river_instream, overwrite = TRUE)
# 

Spawning WUA

[description]

Spawning WUA Plot

The following plot shows the weighted usable spawning area in square feet per thousand feet of river for Fall Run Chinook Salmon. These area per length rates are multiplied by the total spawning reach length mapped by the SIT.

stanislaus_river_instream %>%
  filter(!is.na(FR_spawn_wua)) %>%
  ggplot(aes(flow_cfs, FR_spawn_wua)) +
  geom_line(color = '#7570b3' ) +
  labs(x = 'Flow (cfs)', y = 'WUA (sqft/1000ft)') +
  scale_y_continuous(labels = comma) + 
  theme_minimal() 

Rearing WUA

The fry and juvenile instream rearing habitat weighted usable areas for Fall Run Chinook Salmon in the Stanislaus River provided by Mark Gard (see '~/cvpiaHabitat/data-raw/mark_gard_data/IFIMWUA.xlsx') are used directly in the DSM.

Rearing WUA Plot

The following plot shows the weighted usable rearing area in square feet per thousand feet of river for Fall Run Chinook Salmon and Steelhead fry and juvenile. These rates are multiplied by the total rearing reach length mapped by the SIT.

# code that was here before
# stanislaus_river_instream %>%
#   filter(is.na(FR_spawn_wua)) %>%
#   select(-FR_spawn_wua) %>%
#   gather(species, wua, -flow_cfs) %>%
#   ggplot(aes(flow_cfs, wua, color = species)) +
#   geom_line() +
#   labs(x = 'flow (cfs)', y = 'rearing WUA (sqft/1000ft)') +
#   scale_y_continuous(labels = comma)

``` {r,echo=FALSE}

code isabelle added

stanislaus_river_instream %>% rename(Fall Run (Fry) = FR_fry_wua, Fall Run (Juvenile) = FR_juv_wua, Steelhead (Fry) = ST_fry_wua, Steelhead (Juvenile) = ST_juv_wua) %>% gather(Species, wua, -flow_cfs, -watershed) %>% filter(!is.na(wua), Species != 'FR_spawn_wua') %>% ggplot(aes(x = flow_cfs , y = wua, color = Species)) + geom_line() + labs(x = 'Flow (cfs)', y = 'WUA (sqft/1000ft)') + theme_minimal() + scale_color_manual(values = c('#d95f02','#7570b3','#56B4E9','#009E73')) ```



FlowWest/cvpiaHabitat documentation built on Oct. 27, 2020, 2:09 p.m.