View source: R/queryEnvCovAPI.R
queryEnvCovAPI | R Documentation |
Query the Environmental Covariate API for data between two dates.
queryEnvCovAPI(min.date, max.date, oursitevar, type = "D")
min.date |
The start date for data to include. This is a text string in
the format |
max.date |
The end date for data to include. Same format as
|
oursitevar |
An integer indicating the site identifier. These identifiers must be the custom ones designed specifically for the Environmental Covariate Database. |
type |
A text string indicating if either Daily |
For a given time interval (e.g., day or hour), a site may have more than one statistic recorded. Statistics are mean, median, max, or min over the time point. The statistic returned by this routine for time intervals with multiple statistics is determined by the following rules, applied in order of precedence:
median is selected before the mean
mean is selected before the max or min
if max AND min are available (but neither median or mean), an average of min and max is returned
if only one of max or min is available, it is returned.
A data frame of the query results, with a fields for both flow and temperature values, what statistics are returned, and date or time interval. The returned data frame has the following fields:
date
= date of the measurement in POSIXct format.
flow_statistic
= an integer specifying the type of statistic
returned for flow (1 = maximum; 2 = minimum; 3 = mean; 8 = median).
flow_statistic_name
= the name of the flow statistic.
"Maximum", "Minimum", "Mean", "Median" as specified by flow_statistic
.
flow_statistic_name
and flow_statistic
are redundant, the former
is included for convenience.
flow_cfs
= the value of flow statistic in cubic feet per second.
temp_statistic
= an integer specifying the type of statistic
returned for flow (1 = maximum; 2 = minimum; 3 = mean; 8 = median).
temp_statistic_name
= the name of the flow statistic.
"Maximum", "Minimum", "Mean", "Median" as specified by temp_statistic
.
temp_statistic_name
and temp_statistic
are redundant, the former
is included for convenience.
temp_cfs
= the value of flow statistic in cubic feet per second.
Trent McDonald and Jason Mitchell
plot2Panel
## Not run: # ---- Query for daily results. tmp <- queryEnvCovAPI(min.date = "2000-01-01", max.date = "2010-12-31", oursitevar = 11, type = "D") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.