plot.knnst: Plot resulting statistics for knn space-time disaggregation

View source: R/plot.knnst.R

plot.knnstR Documentation

Plot resulting statistics for knn space-time disaggregation

Description

plot.knnst() implements the plot() method for knnst objects, and relies on ggplot2. It plots the key statistics the knn space-time disaggregation method should be preserving.

Usage

## S3 method for class 'knnst'
plot(
  x,
  site,
  bin_size = NULL,
  base_units = NULL,
  which = c(13, 14, 15),
  show = FALSE,
  ...
)

Arguments

x

An object inheriting from class knnst

site

The site to plot. Site name as a character.

bin_size

Number of years for each bin when there is only one simulation.

base_units

The (input) units of the flow that was disaggregated. These units will be shown as the y-axis label of the plot.

which

The subset of plots to create; specify a subset of the number 1:15. See 'Details' for the different plots.

show

Boolean that determines if diagnostic plots are shown or only returned. If TRUE and in interactive mode, will be able to enter through each of the 1-15 plots.

...

Arguments to be passed to subsequent methods.

Details

If there are more than one simulations, the stats are computed for each simulation across all years. If there is only one simulation, then the user must specify the bin_size that is used to compute the stats across moving windows of this specified size.

which controls the plots that are created. There are both monthly and annual plots and two main plot types: a pdf of the flows across all of the different disaggregations, and a panel showing the mean, max, min, variance, lag-1 correlation, and skew across all of the different disaggregations. The numbers correspond to:

  • 1:12: the different monthly pdfs.

  • 13: annual pdf

  • 14: monthly statistics panel

  • 15: annual statistics panel

... is passed to geom_point() and geom_line() to overwrite defaults for size, shape, and color.

For the monthly statistics panel, months are ordered based on the start_month provided in the original disaggregation, i.e., specified by the user in knn_space_time_disagg().

Value

A knnstplot object


rabutler-usbr/knnstdisagg documentation built on Sept. 14, 2023, 2:47 p.m.