A (relatively) simple interface to the CDEC website.
CDECquery(id, sensor, interval = "D", start, end)
A data.frame
object with the following fields: datetime
, year
, month
, value
.
station ID (e.g. 'spw'), single value or vector of station IDs, see details
the sensor ID, single value or vector of sensor numbers, see details
character, 'D' for daily, 'H' for hourly, 'M' for monthly, 'E' for event: see Details.
starting date, in the format 'YYYY-MM-DD'
ending date, in the format 'YYYY-MM-DD'
D.E. Beaudette
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.
Station IDs can be found here: http://cdec.water.ca.gov/staInfo.html
Sensor IDs can be found using this URL: http://cdec.water.ca.gov/dynamicapp/staMeta?station_id=, followed by the station ID.
Sensor details can be accessed using CDEC_StationInfo with the station ID.
Reservoir capacities can be found here: http://cdec.water.ca.gov/misc/resinfo.html
A new interactive map of CDEC stations can be found here: http://cdec.water.ca.gov
CDECsnowQuery
CDEC_StationInfo