CDECquery: Easy Access to the CDEC API

View source: R/CDECquery.R

CDECqueryR Documentation

Easy Access to the CDEC API

Description

A (relatively) simple interface to the CDEC website.

Usage

CDECquery(id, sensor, interval = "D", start, end)

Arguments

id

station ID (e.g. 'spw'), single value or vector of station IDs, see details

sensor

the sensor ID, single value or vector of sensor numbers, see details

interval

character, 'D' for daily, 'H' for hourly, 'M' for monthly, 'E' for event: see Details.

start

starting date, in the format 'YYYY-MM-DD'

end

ending date, in the format 'YYYY-MM-DD'

Details

Sensors that report data on an interval other than monthly ('M'), daily ('D'), or hourly ('H') can be queried with an event interval ('E'). Soil moisture and temperature sensors are an example of this type of reporting. See examples below.

1.

Station IDs can be found here: http://cdec.water.ca.gov/staInfo.html

2a.

Sensor IDs can be found using this URL: http://cdec.water.ca.gov/dynamicapp/staMeta?station_id=, followed by the station ID.

2b.

Sensor details can be accessed using CDEC_StationInfo with the station ID.

3.

Reservoir capacities can be found here: http://cdec.water.ca.gov/misc/resinfo.html

4.

A new interactive map of CDEC stations can be found here: http://cdec.water.ca.gov

Value

A data.frame object with the following fields: datetime, year, month, value.

Author(s)

D.E. Beaudette

References

http://cdec.water.ca.gov/queryCSV.html

See Also

CDECsnowQuery CDEC_StationInfo


sharpshootR documentation built on Oct. 23, 2024, 1:06 a.m.