winfapReader allows a user to obtain data on long-term annual maxima and peaks over threshold for instantaneous river flow measurements in the UK. The user can also access the corollary catchment descriptors files which characterise the catchments upstream the gauging stations.
Two sets of functions are available: the
read_* functions and the
get_* functions. Both these sets of functions interact with annual maxima information (
get_amax), peaks over threshold information (
get_pot) and information on the catchment descriptors (
The read_* functions allow the user to read into their R console the data from the .AMAX, .PT and .CD3 files made available by the NRFA once these have been downloaded into the users’ computer. At time of writing, Version 8 and previous versions of the winfap files can be downloaded from the NRFA website. This means that users who have compiled information for sites not included in the NRFA in the form of WINFAP files will be able to load these into R. The get_* functions allow the user to interact the the NRFA data API (terms and conditions).
The functions in the package rework the information of the WINFAP files and the NRFA API to provide user-friendly R data.frames derived from the original information.
One can install the latest version of
winfapReader from github using the
When reading files saved locally, by default the package assume that the winfap files are saved in the working directory, but this can be overwritten as in
<- read_amax(72014, loc_WinFapFiles = "locationWhereWINFAPfilesAre")max
When accessing the files via the API simply ask for one or more station to obtain the information requested