Learn R Programming

hddtools (version 0.5)

catalogueGRDC: Data source: Global Runoff Data Centre catalogue

Description

This function interfaces the Global Runoff Data Centre database which provides river discharge data for about 9000 sites over 157 countries.

Usage

catalogueGRDC(areaBox = NULL, columnName = NULL, columnValue = NULL,
  mdDescription = FALSE, 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
mdDescription
boolean value. Default is FALSE (no description is printed)
useCachedData
logical, set to TRUE to use cached data, set to FALSE to retrive data from online source. This is TRUE by default.

Value

This function returns a data frame made of 8966 rows (gauging stations, as per October 2016) and 44 columns containing metadata.

Examples

Run this code
## Not run: ------------------------------------
#   # Retrieve the whole catalogue
#   GRDC_catalogue_all <- catalogueGRDC()
# 
#   # Define a bounding box
#   areaBox <- raster::extent(-3.82, -3.63, 52.41, 52.52)
#   # Filter the catalogue based on bounding box
#   GRDC_catalogue_bbox <- catalogueGRDC(areaBox = areaBox)
# 
#   # Get only catchments with area above 5000 Km2
#   GRDC_catalogue_area <- catalogueGRDC(columnName = "area",
#                                        columnValue = ">= 5000")
# 
#   # Get only catchments within river Thames
#   GRDC_catalogue_river <- catalogueGRDC(columnName = "river",
#                                         columnValue = "Thames")
## ---------------------------------------------

Run the code above in your browser using DataLab