# Libraries library(devtools) library(CSLSiso) library(lubridate) library(knitr) library(extrafont) # Parameters text_size <- 12 lakes <- c("Pleasant", "Long", "Plainfield") start_date <- as_datetime(mdy("09-01-2018")) end_date <- as_datetime(mdy("10-31-2019"))
With this, we can get the overall water budget for each lake on both a monthly (when ice-free) and an annual basis. Groundwater is clearly a critical part of lake water, representing over 80% of annual inflows to each lake. The volume of flow varies quite a bit by month, with the greatest volumes of flow through occuring during the summer (June, July, and August).
start_date <- as_datetime(mdy("10-01-2018")) end_date <- as_datetime(mdy("09-30-2019")) df <- NULL for (lake in lakes) { budget <- runall_csls_budget(lake, annual = TRUE, start_date = start_date, end_date = end_date) budget$lake <- lake df <- rbind(df, budget) } df$lake <- factor(df$lake, levels = lakes) plot_budget(df, annual = TRUE, text_size = text_size, title = "2018-2019 Lake Water Budgets") plot_budget(df, annual = TRUE, as_pcnt = TRUE, text_size = text_size) start_date <- as_datetime(mdy("09-01-2018")) end_date <- as_datetime(mdy("10-31-2019"))
df <- runall_csls_budget("Pleasant", start_date = start_date, end_date = end_date) # test <- NISTunits::NISTcubMeterTOgallon(df[,2:6])/day(df$date) # test <- cbind(df$date, test, df[,14:18]) plot_budget(df, title = "Pleasant Lake", text_size = text_size)
plot_budget(df, title = "Pleasant Lake", text_size = text_size, gw_only = TRUE)
plot_budget(df, title = "Pleasant Lake", text_size = text_size, gw_only = TRUE, as_pcnt = TRUE)
df <- runall_csls_budget("Long", start_date = start_date, end_date = end_date) # test <- NISTunits::NISTcubMeterTOgallon(df[,2:6])/day(df$date) # test <- cbind(df$date, test, df[,14:18]) plot_budget(df, title = "Long Lake", text_size = text_size)
plot_budget(df, title = "Long Lake", text_size = text_size, gw_only = TRUE)
plot_budget(df, title = "Long Lake", text_size = text_size, gw_only = TRUE, as_pcnt = TRUE)
df <- runall_csls_budget("Plainfield", start_date = start_date, end_date = end_date) # test <- NISTunits::NISTcubMeterTOgallon(df[,2:6])/day(df$date) # test <- cbind(df$date, test, df[,14:18]) plot_budget(df, title = "Plainfield Lake", text_size = text_size)
plot_budget(df, title = "Plainfield Lake", text_size = text_size, gw_only = TRUE)
plot_budget(df, title = "Plainfield Lake", text_size = text_size, gw_only = TRUE, as_pcnt = TRUE)
The version of R and the versions of packages in use when this R Markdown file was created are listed here:
devtools::session_info()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.