plot_extremes: Plot floods and droughts episodes using standardized...

Description Usage Arguments Details Value Author(s) Examples

Description

plot_extremes Plot floods and droughts episodes using the function find_flood_drought. This function employs the definition proposed by Mckee et al. (1993) using a time series of standardized precipitation values. A drought (flood) is defined as a period of time in which the SPI is continuously negative (positive) reaching at least one value lower (higher) or equal to -1 (1).

Usage

1
plot_extremes(data, threshold = 1)

Arguments

data

A mbsi object returned by spi or mbsi, which contains the standardized precipitation values.

threshold

An numeric value used to detect the extreme events, 1 (-1) is used by default as proposed by Mckee et al. (1993).

Details

Although the definition of Mckee et al. (1993) uses a threshold of 1 (-1). Other values can be used for this threshold.

Value

A ggplot object. The graph is shown when this object is printed.

Author(s)

Erick A. Chacon-Montalvan

Examples

1
2
3
4
5
6
7
data(simrain)
spi_rain <- mbsi(simrain$rain, simrain$time)

# Visualize extreme events
plot_extremes(spi_rain, threshold = 2)
plot_extremes(spi_rain, threshold = 1.5)
plot_extremes(spi_rain, threshold = 1)

ErickChacon/mbsi documentation built on Aug. 1, 2019, 4:47 p.m.