rnrfa: An R package to Retrieve, Filter and Visualize Data from the UK National River Flow Archive

The UK National River Flow Archive (NRFA) stores several types of hydrological data and metadata: daily river flow and catchment rainfall time series, gauging station and catchment informa tion. Data are served through the NRFA web services via experimental RESTful APIs. Obtaining NRFA data can be unwieldy due to complexities in handling HTTP GET requests and parsing responses in JSON and XML formats. The rnrfa package provides a set of functions to programmatically access, filter, and visualize NRFA data using simple R syntax. This paper describes the structure of the rnrfa package, including examples using the main functions gdf() and cmr() for flow and rainfall data, respectively. Visualization examples are also provided with a shiny web application and functions provided in the package. Although this package is regional specific, the general framework and structure could be applied to similar databases.

Claudia Vitolo , Matthew Fry , Wouter Buytaert
2017-01-03

CRAN packages used

rnrfa, rnoaa, waterData, RNCEP, shiny, leaflet, rmarkdown, DT, dplyr, cowplot, plyr, httr, xml2, stringr, xts, rjson, ggmap, ggplot2, rgdal, sp, ggrepel, devtools, microbenchmark, cranlogs, evd, outliers, spacetime, sos4R

CRAN Task Views implied by cited packages

WebTechnologies, Spatial, SpatioTemporal, ReproducibleResearch, Distributions, Econometrics, Environmetrics, ExtremeValue, Finance, Graphics, Phylogenetics, TimeSeries

Reuse

Text and figures are licensed under Creative Commons Attribution CC BY 4.0. The figures that have been reused from other sources don't fall under this license and can be recognized by a note in their caption: "Figure from ...".

Citation

For attribution, please cite this work as

Vitolo, et al., "The R Journal: rnrfa: An R package to Retrieve, Filter and Visualize Data from the UK National River Flow Archive", The R Journal, 2017

BibTeX citation

@article{RJ-2016-036,
  author = {Vitolo, Claudia and Fry, Matthew and Buytaert, Wouter},
  title = {The R Journal: rnrfa: An R package to Retrieve, Filter and Visualize Data from the UK National River Flow Archive},
  journal = {The R Journal},
  year = {2017},
  note = {https://doi.org/10.32614/RJ-2016-036},
  doi = {10.32614/RJ-2016-036},
  volume = {8},
  issue = {2},
  issn = {2073-4859},
  pages = {102-116}
}