Skip to content

Commit

Permalink
Merge pull request #8 from CVPIA-OSC/fix-diversion
Browse files Browse the repository at this point in the history
Fix units in total diverted
  • Loading branch information
ErinCain authored Aug 5, 2021
2 parents 9aee0ae + b3ed9bd commit 05e4a85
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"mean_flow"

#' Total Flow Diverted
#' @description A dataset containing the diverted flow in cfs within watersheds for
#' @description A dataset containing the diverted flow in cms within watersheds for
#' use with the CVPIA SIT Salmon Population Model.
#'
#' @format a 31 by 12 by 21 array [watershed, month, year (1980-2000)]
Expand Down
1 change: 1 addition & 0 deletions data-raw/tranform_inputs_complete.R
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ total_diverted <- temp_diver %>%
select(date:`Cosumnes River`, `Mokelumne River`, `Merced River`:`San Joaquin River`) %>%
filter(year(date) >= 1980, year(date) <= 2000) %>%
gather(watershed, tot_diver, -date) %>%
mutate(tot_diver = DSMflow::cfs_to_cms(tot_diver)) %>%
spread(date, tot_diver) %>%
left_join(DSMflow::watershed_ordering) %>%
mutate_all(~replace_na(., 0)) %>%
Expand Down
Binary file modified data/total_diverted.rda
Binary file not shown.
2 changes: 1 addition & 1 deletion man/total_diverted.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 05e4a85

Please sign in to comment.