Description Usage Arguments See Also Examples
View source: R/DailyPeaksData.R
The function 'ExtractPeaksData' returned independent peaks for one or more sites and the function 'DailyPeaksData' applies it directly on daily data extracted from HYDAT. The function 'PeaksMeta' serves to link meta-information about the threshold and exceedance rate to the extracted peaks.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | DailyPeaksData(
db,
info,
target = NULL,
size = 25,
distance = NULL,
pad = FALSE,
tol = 346
)
ExtractPeaksData(x, info, pad = FALSE, tol = 346, sorted = FALSE)
PeaksData(x, meta)
PeaksMeta(x) <- value
PeaksMeta(x)
|
db |
Path to the HYDAT database. |
info |
Site information. Must have 3 columns: site, threshold and drainage area. |
target |
Target station of the pooling group. |
size |
Size of the pooling group. |
distance |
Distance between stations. If not provided, the distance between the regularity and timing of the annual flood peaks is used. |
pad |
Logical. Should the time series be padded. See PadPot. |
tol |
Number of days to consider a year as complete. |
x |
Hydrometric Data. Must have 3 columns: site, date and value. |
sorted |
Logical. Is the data sorted. |
meta, value |
Meta information about thresholds. Must be a data frame with 3 columns: site, threshold and exceedance rates (peaks per year). |
... |
Other parameters |
DailyData, linkFloodnetPool.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ## Not run:
## The variable DB_HYDAT contains the path to the HYDAT database.
DB_HYDAT <- '.../Hydat.sqlite3'
## Meta-information about the stations
gaugedSites <- read.csv('.../gauged_sites.csv')
## Data.frame containing thresholds and drainage area
info <- gaugedSites[1:2, c('station','ppy200','area')]
## Reading for one station
x <- DailyPeaksData(DB_HYDAT, info)
head(x)
## Manually extracting the data
DB_HYDAT %>%
DailyData(info$station) %>%
ExtractPeaksData(info) %>%
head()
## Create a dataset of exceedances manually
xd <- SequenceData(3, site = unique(info$station))
PeaksMeta(xd) <- info
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.