| Title: | Interface to the California Data Exchange Center (CDEC) | 
| Version: | 0.3-1 | 
| 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. | 
| License: | GPL (≥ 3) | 
| URL: | https://github.com/mkoohafkan/cder | 
| BugReports: | https://github.com/mkoohafkan/cder/issues | 
| Depends: | R (≥ 3.4) | 
| Imports: | utils, curl (≥ 4.3), glue (≥ 1.3), stringr (≥ 1.4), dplyr (≥ 1.1), readr (≥ 1.3), lubridate (≥ 1.7) | 
| Encoding: | UTF-8 | 
| Suggests: | knitr (≥ 1.26), rmarkdown (≥ 2.0), testthat (≥ 2.3) | 
| VignetteBuilder: | knitr | 
| RoxygenNote: | 7.2.3 | 
| Config/testthat/edition: | 3 | 
| NeedsCompilation: | no | 
| Packaged: | 2023-02-20 04:30:59 UTC; michael | 
| Author: | Michael Koohafkan [aut, cre] | 
| Maintainer: | Michael Koohafkan <michael.koohafkan@gmail.com> | 
| Repository: | CRAN | 
| Date/Publication: | 2023-02-22 09:20:09 UTC | 
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 michael.koohafkan@gmail.com
See Also
Useful links:
Deprecated functions in package cder.
Description
The functions listed below are deprecated. Alternative
functions with similar
functionality are mentioned. Help pages for deprecated functions are
available at help("cder-deprecated").
Usage
cder_query(stations, sensors, durations, start.date, end.date)
cder_query
For cder_query, use cdec_query.
Basic Query
Description
Helper function for CDEC query handling.
Usage
basic_query(url, col.spec)
Arguments
| url | The query URL. | 
Value
A dataframe.
CDEC Search Pages Open the CDEC station/group search page or map interface.
Description
CDEC Search Pages Open the CDEC station/group search page or map interface.
Usage
cdec_search_groups(...)
cdec_search_stations(...)
cdec_map(...)
Arguments
| ... | Additional arguments to pass to  | 
Functions
-  cdec_search_groups(): CDEC Group search page.
-  cdec_search_stations(): CDEC Station search page.
-  cdec_map(): CDEC Map locator page.
CDEC Data Flag Information
Description
Open the data flag listing page.
Usage
cdec_data_flags(...)
Arguments
| ... | Additional arguments to pass to  | 
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  | 
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
 | 
| 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  | 
cder curl handle
Description
Get the handle for curl URL handling in cder.
Usage
cder_handle()
Column specification for group data queries.
Description
Column specification for group data queries.
Usage
group.spec
Format
An object of class col_spec of length 3.
Objects exported from other packages
Description
These objects are imported from other packages. Follow the links below to see their documentation.
- readr
Column specification for station data queries.
Description
Column specification for station data queries.
Usage
station.spec
Format
An object of class col_spec of length 3.