diff --git a/R/data.R b/R/data.R index 3c1bbc8..4cb5677 100644 --- a/R/data.R +++ b/R/data.R @@ -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)] diff --git a/data-raw/tranform_inputs_complete.R b/data-raw/tranform_inputs_complete.R index 3b1b7ad..0bf7a61 100644 --- a/data-raw/tranform_inputs_complete.R +++ b/data-raw/tranform_inputs_complete.R @@ -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)) %>% diff --git a/data/total_diverted.rda b/data/total_diverted.rda index 65ae8ff..c7cbcd0 100644 Binary files a/data/total_diverted.rda and b/data/total_diverted.rda differ diff --git a/man/total_diverted.Rd b/man/total_diverted.Rd index 29dc7eb..a3d1335 100644 --- a/man/total_diverted.Rd +++ b/man/total_diverted.Rd @@ -18,7 +18,7 @@ a 31 by 12 by 21 array [watershed, month, year (1980-2000)] total_diverted } \description{ -A dataset containing the diverted flow in cfs within watersheds for +A dataset containing the diverted flow in cms within watersheds for use with the CVPIA SIT Salmon Population Model. } \details{