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

Future Data Improvements

[future data improvements bullets]

Instream Spawning and Rearing Habiat

Data Source: FishBio and Payne 2009

Instream spawning and rearing habitat for Steelhead in the Calveras River is based on data from [California Department of Water Resources and Thomas R. Payne & Associates instream flow evaluations for the relicensing of Oroville facilities.] [more details] The [source] 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 cells A2:D12 for steelhead rearing in the 'Calaveras' tab within his 'IFIMWUA.xlsx'. Units are square feet per 1000 ft.

# calaveras <- read_excel('data-raw/mark_gard_data/IFIMWUA.xlsx', 
#                         range = "A2:D12", sheet = 'Calaveras') 
# 
# 
# calaveras_river_instream <- calaveras %>% 
#   mutate(watershed = 'Calaveras River') %>% 
#   rename(flow_cfs = Flow, ST_spawn_wua = 'Spawning', ST_fry_wua = `Fry Rearing`,
#          ST_juv_wua = `Juv Rearing`)
# 
# calaveras_river_instream
# devtools::use_data(calaveras_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 Steelhead. These area per length rates are multiplied by the total spawning reach length mapped by the SIT.

``` {r,echo=FALSE} calaveras_river_instream %>% filter(!is.na(ST_spawn_wua)) %>% ggplot(aes(x = flow_cfs , y = ST_spawn_wua)) + geom_line(color = '#7570b3') + labs(x = 'Flow (cfs)', y = 'WUA (sqft/1000ft)') + theme_minimal()

### Rearing WUA
The fry and juvenile instream rearing habitat weighted usable areas for Steelhead in the Calaveras River provided by Mark Gard (see '~/cvpiaHabitat/data-raw/mark_gard_data/IFIMWUA.xlsx').  

#### Rearing WUA Plot

The following plot shows the weighted usable rearing area in square feet per thousand feet of river for Steelhead fry and juvenile. These rates are multiplied by the total rearing reach length mapped by the SIT. 
``` {r,echo=FALSE}
calaveras_river_instream %>% 
  gather(Lifestage, wua, -flow_cfs, -watershed)  %>% 
  filter(!is.na(wua), Lifestage != 'ST_spawn_wua') %>%
  mutate(Lifestage = ifelse(Lifestage == 'ST_fry_wua', 'Fry', 'Juvenile')) %>% 
  ggplot(aes(x = flow_cfs , y = wua, color = Lifestage)) +
  geom_line() +
  labs(x = 'Flow (cfs)', y = 'WUA (sqft/1000ft)') +
  theme_minimal() + 
  scale_color_manual(values = c('#d95f02','#7570b3'))


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