Learn R Programming

RtsEva

[]

This package is an adaptation of the Matalb tsEVA toolbox developed by Lorenzo Mentaschi availaible here: https://github.com/menta78/tsEva

It contains an implementation of the Transformed-Stationary (TS) methodology for non-stationary EVA as described in Mentaschi et al. (2016). In synthesis this approach consists in (i) transforming a non-stationary time series into a stationary one to which the stationary EVA theory can be applied; and (ii) reverse-transforming the result into a non-stationary extreme value distribution.

References

Mentaschi, L., Vousdoukas, M., Voukouvalas, E., Sartini, L., Feyen, L., Besio, G., and Alfieri, L.: The transformed-stationary approach: a generic and simplified methodology for non-stationary extreme value analysis, Hydrol. Earth Syst. Sci., 20,3527-3547, doi:10.5194/hess-20-3527-2016, 2016

Installation

You can install the released version of RtsEva from

CRAN with:

install.packages("RtsEva")

Alternatively, you can install the development version of RtsEva from GitHub with:

# install.packages("devtools")
devtools::install_github("Alowis/RtsEva")

Example

This is a basic example which shows you how to solve a common problem:

library(RtsEva)
# Load a time series
timeAndSeries <- ArdecheStMartin
# go from six-hourly values to daily max
timeAndSeries <- max_daily_value(timeAndSeries)

# set a temporal window for the computation of running statistics
timeWindow <- 30*365 # 30 years

# Run the non-stationnary EVA
result <- TsEvaNs(timeAndSeries, timeWindow,
transfType = 'trendPeaks',tail = 'high')

After fitting the non-stationnay EVA, the package offers functions to visualize the plots.

Other resources are available for users to get a grasp of RtsEva and what can be done with it:

Quarto document

A quarto document showing a step-by-step real world application of TSEVA for flood and drought analysis is available here: https://alowis.github.io/RTSEVA_guide/RtsEVA_demo.html

Shiny demo app

A shiny app allowing the user to select different input timeseries and parameters: https://alowis.shinyapps.io/RtsEva_demo/

Contact

For any questions or inquiries, please contact the package maintainer at alois.tilloy@ec.europa.eu

Copy Link

Version

Install

install.packages('RtsEva')

Monthly Downloads

143

Version

1.1.0

License

GPL (>= 3)

Issues

Pull Requests

Stars

Forks

Maintainer

Alois Tilloy

Last Published

June 10th, 2025

Functions in RtsEva (1.1.0)

tsEVstatistics

tsEVstatistics
tsEasyParseNamedArgs

Parse named arguments and assign values to a predefined argument structure.
ArdecheStMartin

Simulated river discharge of the Ardeche river at Saint Martin d'Ardeche
computeAnnualMaxima

computeAnnualMaxima
tsEvaPlotReturnLevelsGPDFromAnalysisObj

tsEvaPlotReturnLevelsGPDFromAnalysisObj
tsEvaPlotReturnLevelsGPD

tsEvaPlotReturnLevelsGPD
tsEvaComputeReturnPeriodsGEV

tsEvaComputeReturnPeriodsGEV
tsEvaComputeReturnLevelsGPDFromAnalysisObj

tsEvaComputeReturnLevelsGPDFromAnalysisObj
tsEvaNanRunningVariance

Calculate the running variance of a time series with NaN handling
tsEvaNanRunningStatistics

tsEvaNanRunningStatistics
declustpeaks

declustpeaks
empdis

empdis: Empirical Distribution Function
empdisl

Empirical Distribution Function
findMax

findMax
computeMonthlyMaxima

computeMonthlyMaxima
tsEvaNanRunnigBlowTh

Calculate the return period of low flow based on a threshold and window size
tsEvaFindTrendThreshold

Find Trend Threshold
tsEstimateAverageSeasonality

Estimate Average Seasonality
tsEvaChangepts

Change point detection in time series
tsEvaPlotAllRLevelsGEV

tsEvaPlotAllRLevelsGEV
tsEvaPlotAllRLevelsGPD

tsEvaPlotAllRLevelsGPD
tsEvaDetrendTimeSeries

Detrend a Time Series
tsEvaFillSeries

Fill missing values in a time series using a moving average approach.
tsEvaComputeReturnLevelsGEVFromAnalysisObj

tsEvaComputeReturnLevelsGEVFromAnalysisObj
tsEvaPlotTransfToStatFromAnalysisObj

tsEvaPlotTransfToStatFromAnalysisObj
tsEvaComputeReturnLevelsGPD

tsEvaComputeReturnLevelsGPD
tsEvaRunningMeanTrend

Calculate the running mean trend of a time series
tsEvaNanRunningMean

Calculate the running mean of a time series with NaN handling
tsEvaPlotGEVImageSc

tsEvaPlotGEVImageSc
DanubeVienna

Simulated river discharge of the Danube river at Vienna
tsEvaPlotGEVImageScFromAnalysisObj

tsEvaPlotGEVImageScFromAnalysisObj
tsEvaPlotSeriesTrendStdDevFromAnalyisObj

tsEvaPlotSeriesTrendStdDevFromAnalyisObj
tsEvaSampleData

tsEvaSampleData Function
tsEvaTransformSeriesToStationaryTrendOnly

tsEvaTransformSeriesToStationaryTrendOnly
tsEvaTransformSeriesToStationaryTrendAndChangepts_ciPercentile

Transform Time Series to Stationary Trend and Change Points with Confidence Intervals
tsEvaPlotTransfToStat

tsEvaPlotTransfToStat
initPercentiles

Initialize Percentiles
max_daily_value

Max Daily Value Function
tsEvaComputeReturnPeriodsGPD

tsEvaComputeReturnPeriodsGPD
tsEvaComputeTimeRP

tsEvaComputeTimeRP
tsEvaTransformSeriesToStatSeasonal_ciPercentile

tsEvaTransformSeriesToStatSeasonal_ciPercentile
tsEvaTransformSeriesToStationaryTrendOnly_ciPercentile

tsEvaTransformSeriesToStationaryTrendOnly_ciPercentile
tsEvaTransformSeriesToStationaryPeakTrend

tsEvaTransformSeriesToStationaryPeakTrend
tsEvaTransformSeriesToStationaryTrendAndChangepts

Transform Time Series to Stationary Trend and Change Points
tsEvaPlotGPDImageScFromAnalysisObj

tsEvaPlotGPDImageScFromAnalysisObj
tsEvaPlotGPDImageSc

tsEvaPlotGPDImageSc
tsGetNumberPerYear

tsGetNumberPerYear
tsEvaNanRunningPercentiles

tsEvaNanRunningPercentiles
tsEvaPlotReturnLevelsGEV

tsEvaPlotReturnLevelsGEV
tsEvaTransformSeriesToStationaryMultiplicativeSeasonality

tsEvaTransformSeriesToStationaryMultiplicativeSeasonality
tsEvaTransformSeriesToStationaryMMXTrend

tsEvaTransformSeriesToStationaryMMXTrend
tsEvaPlotReturnLevelsGEVFromAnalysisObj

tsEvaPlotReturnLevelsGEVFromAnalysisObj
tsGetPOT

tsGetPOT Function
TsEvaNs

TsEvaNs Function
check_timeseries

Check if all years in a time series are present
EbroZaragoza

Simulated river discharge of the Ebro river at Zaragoza
RhoneLyon

Simulated river discharge of the Rhone river at Lyon
tsEvaComputeRLsGEVGPD

tsEvaComputeRLsGEVGPD
tsEvaComputeReturnLevelsGEV

tsEvaComputeReturnLevelsGEV