knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(dplyr) library(tidyr) library(ggplot2) library(SJRDefaultFlows) # Friant Sheet Test unimpaired_inflow <- 1270 # cell D3 allocation_lookup <- get_allocation_lookup(unimpaired_inflow) allocation <- get_allocation(unimpaired_inflow, allocation_lookup) # cell C4 year_type <- get_year_type(allocation) # cell C5 restoration_af <- get_restoration_AF(unimpaired_inflow, allocation) # cell E5 addition_allocation <- get_additional_allocation(allocation, year_type) #cell K3 number_of_days <- get_number_of_days(year_type) # cell I4 friant_exhibitB <- get_friant_flows_exhibitB(year_type) friant_flows <- get_friant_default_schedule(year_type, addition_allocation) gravelly_ford_flows <- get_gravelly_ford_flows(year_type, friant_flows) gravelly_ford_losses <- get_R2_losses(gravelly_ford_flows) mendota_dam_flows <- get_mendota_dam_flows(gravelly_ford_flows, gravelly_ford_losses) confluence_flows <- get_confluence_flows(year_type, mendota_dam_flows) default_flow_schedule <- get_default_flow_schedule(unimpaired_inflow) daily_default_flow_schedule <- get_daily_default_flow_schedule(default_flow_schedule, year = 2000) daily_default_flow_schedule %>% select(starts_with('gravelly'), date) %>% gather(location, flows, -date) %>% ggplot(aes(x = date, y = flows, color = location)) + geom_line(alpha = .7, size = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.