Learn R Programming

hddtools (version 0.5)

catalogueData60UK: Data source: Data60UK catalogue

Description

This function interfaces the Data60UK database catalogue (available from http://nrfaapps.ceh.ac.uk/datauk60/data.html) containing 61 datasets. Dataset catalogue is available from http://nrfaapps.ceh.ac.uk/datauk60/data.html.

Usage

catalogueData60UK(areaBox = NULL, columnName = NULL, columnValue = NULL,
  useCachedData = TRUE)

Arguments

areaBox
bounding box, a list made of 4 elements: minimum longitude (lonMin), minimum latitude (latMin), maximum longitude (lonMax), maximum latitude (latMax)
columnName
name of the column to filter
columnValue
value to look for in the column named columnName
useCachedData
logical, set to TRUE to use cached data, set to FALSE to retrieve data from online source. This is TRUE by default.

Value

This function returns a data frame made of 61 rows (gauging stations) and 6 columns: "id" (hydrometric reference number), "River", "Location", "gridReference", "Latitude", "Longitude".

Examples

Run this code
## Not run: ------------------------------------
#   # Retrieve the whole catalogue
#   Data60UK_catalogue_all <- catalogueData60UK()
# 
#   # Filter the catalogue based on a bounding box
#   areaBox <- raster::extent(-4, -2, +52, +53)
#   Data60UK_catalogue_bbox <- catalogueData60UK(areaBox)
# 
#   # Filter the catalogue based on an ID
#   Data60UK_catalogue_ID <- catalogueData60UK(columnName = "stationID",
#                                              columnValue = "62001")
## ---------------------------------------------

Run the code above in your browser using DataLab