Plot time series for selected site from ARCHI model object
ts_plots.RdInteractive time series plot generation from S3 class ARCHI model object
output from impute_grid function. Plots observed, modeled, and imputed time
series for selected target site and can add additional panels to show
reference sites used for imputation.
Usage
ts_plots(
impute_output,
site_no,
ar = "reversed",
ms = 2.5,
error_method = "NSE",
yax = NA,
yax_lab = "Value",
rnd = 2,
show_topn = c(1)
)Arguments
- impute_output
S3 class
ARCHImodel object output fromimpute_gridfunction.- site_no
single element character vector indexing site to plot. Do not include leading "X." prefix.
- ar
if
"reversed", will reverse y-axis scale. If logical flag set toTRUE, will revert to default y-axis scaling. Default is"reversed".- ms
marker size. Numeric passed to
plotlycontrolling marker size for observed values. Markers are needed when observed values are bounded byNAs and don't generate lines on the plot. Default is2.5.- error_method
character string specifying error method to print to plot label. Can be set to
"RMSE", "MAE","NRMSE","NSE", or"var_ratio". Default is"NSE".- yax
if
"log"plot y-axis on log scale. Default isNA(y-axis plotted on linear scale).- yax_lab
input character string for y-axis label. Default is
Value.- rnd
number of decimals to round model-error statistics to. Default is
2.- show_topn
numeric vector of the top n correlated reference sites to include in panels below target site times series. For example,
c(1:5)shows the top five most correlated reference sites. Default isc(1), which shows the top most correlated reference site.
Author
Maintainer: Zeno F. Levy zlevy@usgs.gov
Examples
if (FALSE) { # \dontrun{
# load example Long Island dataset
data(LI_data)
# grid data at monthly timestep using median observed values
grid <- timestep_grid(data = LI_data,
timestep = "monthly",
agg_method = "median")
# trim grid to remove sites that are less than 35 percent complete
grid <- trim_grid(grid, data_thresh = 0.35)
# impute grid using default settings
out <- impute_grid(input_grid = grid)
# generate time series plots for target site "405000073293301"
# with top three most correlated reference sites
ts_plots(impute_output = out,
site_no = "405000073293301",
yax_lab = "Groundwater level, in feet below land surface",
show_topn = c(1:3))
} # }