CDECquery | R Documentation |
A (relatively) simple interface to the CDEC website.
CDECquery(id, sensor, interval = "D", start, end)
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' |
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
A data.frame
object with the following fields: datetime
, year
, month
, value
.
D.E. Beaudette
http://cdec.water.ca.gov/queryCSV.html
CDECsnowQuery
CDEC_StationInfo
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.