Learn R Programming

DUToolkit (version 1.0.2)

plot_raincloud: Generate raincloud plot

Description

The probability densities of the highest (or lowest if the threshold is a minimum) projected outcome across simulation runs are plotted for each policy alternative alongside corresponding box plots, which indicate the mean and 50th percentile range. These plots are presented collectively on a single graph to facilitate visual comparison of the policy alternatives. The decision threshold is shown directly on the plot as a vertical line to provide a clear reference point for interpreting the outputs.

Usage

plot_raincloud(max_min_values_list, D)

Value

A raincloud plot for peak (or minimum) values

Arguments

max_min_values_list

A list generated by get_max_min_values() that must contain at least two elements.

D

A single threshold value.

Examples

Run this code
tmin <- "2021-01-01"
tmax <- "2021-04-10"
D <- 750

peak_values_list <- get_max_min_values(
  psa_data,
  tmin = tmin,
  tmax = tmax,
  Dt_max = TRUE
)

plot_raincloud(
  peak_values_list,
  D = D
)

Run the code above in your browser using DataLab