GetDataEA_QH {UKFE}R Documentation

Get flow or level data from the Environment Agency's Hydrology Data Explorer

Description

Function to extract flow or level data from the Environment Agency's Hydrology Data Explorer.

Usage

GetDataEA_QH(
  Lat = 54,
  Lon = -2.25,
  Range = 20,
  RiverName = NULL,
  WISKI_ID = NULL,
  From = "2015-10-01",
  To = "2016-09-30",
  Type = "flow",
  Period = "DailyMean"
)

Arguments

Lat

Latitude (as a decimal) for the centre of the search for gauges. You can convert BNG to Lat and Lon using the GridRefConvert function.

Lon

Longitude (as a decimal) for the centre of the search for gauges. You can convert BNG to Lat and Lon using the GridRefConvert function.

Range

Radius of search when using latitude and longitude inputs (km).

RiverName

Name of the river along which you want to search for gauges. Character string.

WISKI_ID

The WISKI ID for the gauge from which you want to obtain data (character string)

From

Date for start of data extraction in the format of "2015-12-02"

To

Date for the end of data extraction in the format of "2015-12-02"

Type

The variable to extract, either "flow" or "level"

Period

The sampling rate of the data you want. Either "DailyMax", "DailyMean", "Hourly", "15Mins".

Details

To find gauges you can input either a river name or a latitude and longitude. You can convert BNG to Lat and Lon using the ConvertGridRef function. The lat and lon option will provide all flow and level gauges within a specified range (default of 10km). This provides gauged details including the WISKI ID. You can get data from specific gauges using the WISKI_ID. Note that many flow gauges also have level data available. Do ensure you get the start date you can put in a year that is many years prior to the start of the gauge. Lastly, I have noticed that WISKI IDs can be returned without a preceding 0 which might be necessary for the data extraction (oddly, most do have the necessary 0). If it does not work try adding a 0 to the beginning of the WISKI ID.

Value

If searching for gauge details with lat and lon or river name, then a list is returned. The first element is a dataframe with flow gauge details and the second is a dataframe of level gauge details. When extracting flow or level data with a WISKI ID then a dataframe with two columns is returned. The first being a Date or POSIXct column/vector and the second is the timeseries of interest.

Author(s)

Anthony Hammond

Examples

#Find gauges on the river Tame
## Not run: GetDataEA_QH(RiverName = "Tame")
#Find gauges within 10km of a latlon grid reference somewhere near the centre of Dartmoor
## Not run: GetDataEA_QH(lat = 50.6, lon = -3.9, Range = 10)
#Get daily maximum flow data from the Bellever gauge on the
#East Dart River for the default From - To date range
## Not run: BelleverMax <- GetDataEA_QH(WISKI_ID = "SX67F051")

[Package UKFE version 0.3.8 Index]