Package 'cder'

Title: Interface to the California Data Exchange Center (CDEC)
Description: Connect to the California Data Exchange Center (CDEC) Web Service <http://cdec.water.ca.gov/>. 'CDEC' provides a centralized database to store, process, and exchange real-time hydrologic information gathered by various cooperators throughout California. The 'CDEC' Web Service <http://cdec.water.ca.gov/dynamicapp/wsSensorData> provides a data download service for accessing historical records.
Authors: Michael Koohafkan [aut, cre]
Maintainer: Michael Koohafkan <[email protected]>
License: GPL (>= 3)
Version: 0.3-1
Built: 2025-01-31 04:54:50 UTC
Source: https://github.com/mkoohafkan/cder

Help Index


CDEC Data Flag Information

Description

Open the data flag listing page.

Usage

cdec_data_flags(...)

Arguments

...

Additional arguments to pass to browseURL.


CDEC Station Metadata

Description

Open the Metadata page for a station.

Usage

cdec_meta(station, ...)

Arguments

station

The three-letter station code.

...

Additional arguments to pass to browseURL.


Query CDEC

Description

Query data from the CDEC web services.

Usage

cdec_query(stations, sensors, durations, start.date, end.date, ...)

Arguments

stations

A vector of station codes.

sensors

A vector of sensor numbers.

durations

A vector of durations. Possible duration codes are "E" (event), "H" (hourly), "D" (daily), and "M" (monthly).

start.date

The start date of the query.

end.date

The end date of the query.

...

Not used.

Details

Note that CDEC timestamps are in Pacific Time and Daylight Savings adjustments are reflected. In R, this is equivalent to the timezone "US/Pacific".

Value

A tibble.

Examples

if(interactive()){
  cdec_query("NSL", 100, "E", Sys.Date() - 5, Sys.Date())
}

Query CDEC Group

Description

Query group data from the CDEC web services.

Usage

cdec_query_group(groups, start.date, end.date, ...)

Arguments

groups

A vector of group codes.

start.date

The start date of the query.

end.date

The end date of the query.

...

Not used.

Details

Note that CDEC timestamps are in Pacific Time and Daylight Savings adjustments are reflected. In R, this is equivalent to the timezone "US/Pacific".

Value

A tibble.

Examples

if(interactive()){
  cdec_query_group("SR1", Sys.Date() - 5, Sys.Date())
}

CDEC Sensor Information

Description

Open the Sensor listing page.

Usage

cdec_sensors(...)

Arguments

...

Additional arguments to pass to browseURL.


Interface to the California Data Exchange Center

Description

Access the CDEC Web Service from R.

Package options

cder uses the following options() to configure behavior:

  • cder.timeout: The maximum time to wait for a response from the CDEC Web API.

Author(s)

Maintainer: Michael Koohafkan [email protected]

See Also

Useful links: