plot_tr_distribution_comparison: function to plot the changes in the distribution of return...

View source: R/Plotting_functions.R

plot_tr_distribution_comparisonR Documentation

function to plot the changes in the distribution of return period period (Tr) for the domain of events in the reference period.

Description

function to plot the changes in the distribution of return period period (Tr) for the domain of events in the reference period.

Usage

plot_tr_distribution_comparison(
  tr_dist_comparison,
  data_reference,
  data_study,
  na.rm = T,
  station_metadata,
  year_bounds = c(1900, 2019),
  year_break = 1960
)

Arguments

tr_dist_comparison

The output of function 'get_distribution_comparison()'. Contains reference event feature values and the two distributions of TR.

data_reference

data frame with seven columns containing years, severity and duration, its transformations and the entropy-based marginals for the REFERENCE period of interest. Preferably the output of 'get_marginal_distribution()'.

data_study

data frame with seven columns containing years, severity and duration, its transformations and the entropy-based marginals for the STUDY period of interest. Preferably the output of 'get_marginal_distribution()'.

na.rm

logical. Default is True. NA values are filled with ‘tidyr::fill(direction = ’down')'

station_metadata

data frame with metadata, preferably the output from 'get_data_station()'.

year_bounds

vector with two integer values, the years of beginning and end of analysis

year_break

integer, the year used to separate the data into reference and study datasets.

Value

The function returns a ggplot element.


pedroalencar1/DroughtSDF documentation built on May 8, 2023, 6:58 p.m.