Guillaume Cinkus, Naomi Mazzilli and Hervé Jourde
KarstID is an R Package devoted to the analysis of karst systems hydrological functioning. The package consists in an interactive application that can be loaded through a web browser or the RStudio viewer. The application is developed in the R Shiny framework.
The goal of KarstID is to facilitate the completion of common analyses of karst spring hydrographs such as:
The equations behind the analyses and the calculation of the indicators are detailed in Cinkus et al. (2021) (https://doi.org/10.1016/j.jhydrol.2021.127006). The application also provides the classification of karst systems hydrological functioning based on the proposal of Cinkus et al. (2021) and offers to compare the results with a database of 78 karst systems located worldwide (Olarinoye et al., 2020, https://doi.org/10.1038/s41597-019-0346-5).
The KarstID package is open source, actively developed and available on Github (https://github.com/busemorose/KarstID). We will try to address user requests (new features or bug report). We also consider future developments such as different recession models, or adding other hydrodynamic analyses.
KarstID requires an installation of R. It is recommended to
use at least R 4.0.0
. Note that it is possible to
install the package with an R version prior to 4.0.0
but
some conflicts may exist. The instruction for the installation and the
download of R can be found on the CRAN website.
Once R is installed, KarstID can be installed from GitHub.
if (!require("devtools")) install.packages("devtools") # install devtools package if needed
devtools::install_github("busemorose/KarstID") # install KarstID package
Once the package is installed, the application can be loaded with the
KarstID()
function.
library(KarstID)
KarstID()
The data import tab allows to load a spring discharge time series:
The import options allows the user to define:
Name
: will be used for export file names and plot
displaysTime step
: time step of the imported time seriesSkip row
: number of rows to skip at the beginning of
the fileSheet
: sheet number if Excel fileDecimal mark
: decimal mark of the discharge valuesDelimiter
: delimiter of the columnsHeader
: presence of header or not (if no header, column
names will be defaulted to date
and
discharge
)Compute and use daily mean
: only for hourly time step.
If checked, compute and use daily mean from (infra) hourly dataDate format
: format of the date
(e.g. %Y-%m-%d %H:%M:%S
for a date-time format)After defining the import options, the user can click on
Load dataset
to import his data. The application will:
It is also possible to use a “test dataset” as demonstrated below.
It is possible to interpolate missing values when importing discharge data:
Max interpolation gap size
: define the maximum gap (in
days) which will be interpolated with a spline functionKeep NA values
: define the behaviour when there are
still missing values after the interpolation (even if no interpolation).
If checked, the whole time series with missing values will be loaded. If
unchecked, only the longest part of the time series without missing
values will be loadedThe recession curves analysis tab allows to select recession curves and apply recession model. The recession selection is done with a slider and four buttons:
Select a time interval
: define the time interval of the
plotZoom
: zoom on the plot according to the dimensions of
the mouse brushReset
: reset the default (full) time intervalAdd
: add the selected recession curve (dimensions of
the mouse brush) to the KarstID workspace. A recap of the information is
displayed in the table belowDelete
: delete the selected recession curve in the
table from the KarstID workspaceIt is possible to save the time series of the selected recession
curves with the Download selected recession
button and save
the recap table with the Download table
button. It is
possible to save and import the entire KarstID workspace with the
Save KarstID recession workspace
and
Upload KarstID recession workspace
, respectively.
Once the recession curves are saved, they all appear in the table below and can be selected. When selected, the recession model interface is displayed on the right. The workflow is:
Remove spikes in the recession curve
checkboxBreakpoint value
numeric input to define the inflexion
point of the Mangin model (Mangin, 1975)Save indicators
button. The indicators appear in the recap
table. It is possible to cancel the results with
Clear selection
The simple correlational and spectral analyses tab allows to visualize the results of these signal analyses proposed by Mangin (1984). The results are calculated automatically once a dataset is imported. It is possible to change the cutting point (in days) with the slider input below the graphs.
The analysis of classified discharges tab allows to visualize the results of the classic approach and the Mangin (1971) approach. The results are calculated automatically once a dataset is imported.
The classification tab can be appreciated in four parts:
This work is licensed under a Creative Commons Attribution 4.0 International License