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)
Data Source: FWS 2011
Instream spawning and rearing habitat for Fall Run Chinook Salmon in the Cow Creek 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 the 'SouthCow' tab within his 'IFIMWUA.xlsx'.The cells A2:C32 represent the Valley Floor Reach (5.11 miles) and cells A36:C66 represent the Boero Reach (1.68 miles).
Units are in square feet per mile.
# valley <- read_excel('data-raw/mark_gard_data/IFIMWUA.xlsx', # range = "A2:C32", sheet = 'SouthCow') %>% # mutate(mi = 5.11) # # boero <- read_excel('data-raw/mark_gard_data/IFIMWUA.xlsx', # range = "A36:C66", sheet = 'SouthCow') %>% # mutate(mi = 1.68) # # tot_len <- 5.11 + 1.68 # # cow_creek_instream <- bind_rows(valley, boero) %>% # gather(lifestage, sqft_per_mile, -Flows, -mi) %>% # group_by(Flows, lifestage) %>% # summarise(wua = sum(sqft_per_mile * mi/tot_len)/5.28) %>% # spread(lifestage, wua) %>% # ungroup() %>% # rename(flow_cfs = Flows, FR_fry_wua = `fall-run fry`, # FR_juv_wua = `fall-run juvenile`) %>% # mutate(watershed = 'Cow Creek') # # cow_creek_instream # devtools::use_data(cow_creek_instream, overwrite = TRUE)
The fry and juvenile instream rearing habitat weighted usable areas for Fall Run Chinook Salmon in the Cow River are provided by Mark Gard (see '~/cvpiaHabitat/data-raw/mark_gard_data/IFIMWUA.xlsx').
The following plot shows the weighted usable rearing area in square feet per thousand feet of river for Fall Run Chinook Salmon fry and juvenile. These rates are multiplied by the total rearing reach length mapped by the SIT.
{r,echo=FALSE}
cow_creek_instream %>%
gather(Lifestage, wua, -flow_cfs, -watershed) %>%
filter(!is.na(wua), Lifestage != 'FR_spawn_wua') %>%
mutate(Lifestage = ifelse(Lifestage == 'FR_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'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.