Description Usage Arguments Value Examples
Extract annualized Statistics from HYDAT database using fasstr package Queries the HYDAT database to extract the daily data and then computes the annualized statistics
1 2 3 4 5 6 7 8 9 | stfl_get_annual_stat(
STATION_NUMBER,
Parameter = c("Flow", "Level")[1],
Statistic,
water_year_start = 1,
months_in_year = 12,
ignore_missing = FALSE,
debug = FALSE
)
|
STATION_NUMBER |
The 7 digit station code(s) used in the HYDAT databases. You can specify a vector to extract daily data from many stations in one call. |
Parameter |
If "Flow" or "Level" is to be returned from the HYDAT database. |
Statistic |
A vector of statistics to be computed from the daily data.
The list of available statistics is given gy |
water_year_start |
Start month for the water year. |
months_in_year |
How many months, starting from the water_year_start should be
included in the water year. These two parameters allows you, for example, to select
June - Sept with |
ignore_missing |
Should missing values be ignored when computing statistics. The default value of |
debug |
If true, then this code will break when called. Not useful unless you have access to the source code. Can be useful when debugging the SHINY app. |
Data frame in long format with the the following values
STATION_NUMBERThe station number from the daily.data
ParameterThe parameter from the daily data
StatisticThe annualized statistics requested
YearThe year the annualized statistic is computed
ValueThe value of the annualized statistic
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
# needs the HYDAT package installed
station.id <- c("08NM116")
stfl_get_annual_stat(station.id, Statistic=c("MEAN","P10"),
water_year_start=1, months_in_year=12)
station.id <- c("08NM053","08NM116")
res <- stfl_get_annual_stat(station.id, Statistic=c("MEAN","P10"),
water_year_start=1, months_in_year=12)
head(res)
#'
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.