plot_sensitivity: Plot bias, precision, and accuracy of metrics

Description Usage Arguments

View source: R/plot_sensitivity.R

Description

Creates a facet plot with lakes faceted horizontally and error estimates faceted vertically.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
plot_sensitivity(
  df,
  metric_name,
  variable_title = "",
  variable_breaks = "sort",
  variable_labels,
  variable_colors = NULL,
  text_size = 12,
  vline = 38,
  hlines = NULL,
  metric_title = ""
)

Arguments

df

data frame with the following columns:

  • lakename of lake, e.g., Pleasant, Long, Plainfield, Devils

  • metricname of hydrologic metrics, e.g. median_level, cv_rise_rate

  • variablename of variation on metrics, e.g. 10 for 10% exceedance level

  • nyearnumber of years used to calculate metric

  • fittype of fit measurement, PBIAS, CV, or RMSE

  • valuevalue of fit measurement

metric_name

name of metric to display on this plot

variable_title

string to use for color legend, defaults to "" for no title

variable_breaks

vector with values to use for variable breaks in color legend. Defaults to "sort" to convert unique options in "variable" column to numeric values and sort in ascending order.

variable_labels

vector with strings to use for variable labels in color legend. Defaults to "breaks" to indicate use same values as breaks. Can also be "percent" to add a percent symbol to values in variable_breaks.

variable_colors

vector with hex codes of colors corresponding to variable_breaks and variable_lables.

text_size

size of text on plots. Defaults to 12.

vline

optional value at which to draw a dashed vertical line. Defaults to 38 (i.e., nyears from 1981-2018), but can be set to NULL for no line.

hlines

optional data frame with values to draw horizontal lines for PBIS, CV, and RMSE. Defaults to NULL for no line.

metric_title

string to use for plot title, defaults to "" for no title


WDNR-Water-Use/CSLSlevels documentation built on Nov. 21, 2020, 9:13 a.m.