R/get_winfapapi.R
get_cd.Rd
The function queries the NRFA API for for information of a given station. Unlike get_amax
and get_pot
, the output of this function is not exactly the same from the output of the read_cd3
function due to differences in the information made available by the NRFA API
get_cd(station, fields = "feh")
the NRFA station(s) number for which the the information is required
the type of information which is required. Can be "feh" (default), which outputs a subset of information typically used when applying the flood estimation handbook methods, or "all", which output all information made available in the NRFA API.
a data.frame of one row with different columns depending on whether fields = "all" or fields = "feh" was selected.
read_cd3
. Information on catchment descriptors river flow gauging in the UK can be found at the National River Flow Archive website https://nrfa.ceh.ac.uk
cdMult <- get_cd(c(40003,42003), fields = "all")
### lots of information on the catchment/station
### including information on rejected annual maxima
cdMult$`40003`$`peak-flow-rejected-amax-years` ## no rejections
#> [1] "NA"
cdMult$`42003`$`peak-flow-rejected-amax-years` ## several rejections
#> [1] "1975, 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994"
cd40003 <- get_cd(40003, fields = "feh")
# less information, mostly the FEH descriptors
dim(cd40003)
#> [1] 1 28
sapply(cdMult, ncol)
#> 40003 42003
#> 104 104