Skip to content

rnrfa

UK National River Flow Archive Data from R

v2.1.0.7 · Aug 25, 2025 · GPL-3

Description

Utility functions to retrieve data from the UK National River Flow Archive (<https://nrfa.ceh.ac.uk/>, terms and conditions: <https://nrfa.ceh.ac.uk/help/costs-terms-and-conditions>). The package contains R wrappers to the UK NRFA data temporary-API. There are functions to retrieve stations falling in a bounding box, to generate a map and extracting time series and general information. The package is fully described in Vitolo et al (2016) "rnrfa: An R package to Retrieve, Filter and Visualize Data from the UK National River Flow Archive" <https://journal.r-project.org/archive/2016/RJ-2016-036/RJ-2016-036.pdf>.

Downloads

CRAN

494

Last 30 days

7633rd

1.2K

Last 90 days

6.7K

Last year

Trend: +54.4% (30d vs prior 30d)

r2u CRAN

10

Last 30 days

24

Last 90 days

98

Last year

Trend: -28.6% (30d vs prior 30d)

autoCRAN

4

Last 7 days

19

Last 30 days

0

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

1 ERROR
12 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 ERROR
r-release-windows-x86_64 OK
Check details (1 non-OK)
ERROR r-release-macos-x86_64

tests

Running ‘testthat.R’ [16s/135s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library("testthat")
  > library("rnrfa")
  > # library("lintr")
  > 
  > api_unavailable <- function(){
  +   resp1 <- httr::GET(url = "https://nrfaapps.ceh.ac.uk/nrfa/ws/time-series", 
  +                      query = list(format = "json-object", station = 39001,`data-type` = "gdf"), 
  +                      httr::user_agent("https://github.com/ilapros/rnrfa"))
  +   resp2 <- httr::GET(url = "https://nrfaapps.ceh.ac.uk/nrfa/ws/time-series", 
  +                      query = list(format = "json-object", station = 39001,`data-type` = "cmr"), 
  +                      httr::user_agent("https://github.com/ilapros/rnrfa"))
  +   # if any of the two streams is not working skip tests 
  +   (httr::http_error(resp1) | httr::http_error(resp2))
  + }
  > 
  > # skip_if_no_api() <- function() {
  > #   if (api_unavailable()) {
  > #     skip("API not available")
  > #   }
  > # }
  > 
  > if (!c
...[truncated]...
═════════════════════════════════════════════════════════
  ── Error ('test-catalogue.R:17:3'): Output of catalogue function is expected to be at least 1539x20 ──
  <curl_error_operation_timedout/curl_error/error/condition>
  Error in `curl::curl_fetch_memory(url, handle = handle)`: Timeout was reached [nrfaapps.ceh.ac.uk]:
  Connection timed out after 10001 milliseconds
  Backtrace:
      ▆
   1. ├─testthat::skip_if(api_unavailable(), "API not available") at test-catalogue.R:17:3
   2. │ └─base::isTRUE(condition)
   3. ├─rnrfa (local) api_unavailable()
   4. │ └─httr::GET(...) at test-catalogue.R:4:3
   5. │   └─httr:::request_perform(req, hu$handle$handle)
   6. │     ├─httr:::request_fetch(req$output, req$url, handle)
   7. │     └─httr:::request_fetch.write_memory(req$output, req$url, handle)
   8. │       └─curl::curl_fetch_memory(url, handle = handle)
   9. └─curl:::raise_libcurl_error(...)
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 66 ]
  Error:
  ! Test failures.
  Execution halted

Check History

ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE May 2, 2026
ERROR r-release-macos-x86_64

tests

Running ‘testthat.R’ [16s/135s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library("testthat")
  > library("rnrfa")
  > # library("lintr")
  > 
  > api_unavailable <- function(){
  +   resp1 <- httr::GET(url = "https://nrfaa
...[truncated]...
::request_fetch.write_memory(req$output, req$url, handle)
   8. │       └─curl::curl_fetch_memory(url, handle = handle)
   9. └─curl:::raise_libcurl_error(...)
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 66 ]
  Error:
  ! Test failures.
  Execution halted
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Reverse Dependencies (1)

suggests

Dependency Network

Dependencies Reverse dependencies curl ggmap ggplot2 httr jsonlite lubridate sf tibble zoo winfapReader rnrfa

Version History

24 tracked
new 2.1.0.7 Mar 10, 2026
updated 2.1.0.7 ← 2.1.0.6 diff Aug 24, 2025
updated 2.1.0.6 ← 2.1.0.5 diff Jun 18, 2024
updated 2.1.0.5 ← 2.1.0 diff Feb 14, 2024
updated 2.1.0 ← 2.0.6 diff Sep 7, 2022
updated 2.0.6 ← 2.0.4 diff Aug 8, 2022
updated 2.0.4 ← 2.0.3 diff Feb 14, 2021
updated 2.0.3 ← 2.0.2 diff May 24, 2020
updated 2.0.2 ← 2.0.1 diff Jan 31, 2020
updated 2.0.1 ← 2.0 diff Nov 9, 2019
updated 2.0 ← 1.5.0 diff Apr 14, 2019
updated 1.5.0 ← 1.4.0 diff Nov 19, 2018
updated 1.4.0 ← 1.3.0 diff Apr 12, 2018
updated 1.3.0 ← 1.2 diff Dec 23, 2016
updated 1.2 ← 0.5.4 diff Sep 2, 2016