View source: R/dbpf_observations_stats.R
dbpf_observations_stats | R Documentation |
Provides mean min max and count for a certain period and one or several locations.
dbpf_observations_stats(
con,
location_name,
unit_of_measurement = "C",
time_b = "2015-09-01 00:00:00+00",
time_e = "2016-08-31 23:59:59+00",
verbose = FALSE
)
con |
Database connection object, as returned by dbpf_con() |
location_name |
Character string or list of several with the location name(s) to be queried for. |
unit_of_measurement |
Unit of measurments, defaults to "C" |
time_b |
Begin time for the interval to be analysed. Use the format "1950-01-01 00:00:00+00" |
time_e |
End time for the interval to be analysed. Use the format "1950-01-01 00:00:00+00" |
verbose |
Provide terminal output of the query string? (defaults to FALSE) |
These simple functions return all data as data frames. When making a query many times, optimise the SQL statement to only request the data you actually need.
Data frame with locations in rows and columns loc_name, height, max, min, avg, cnt
Stephan Gruber <stephan.gruber@carleton.ca>
## Not run:
con <- dbpf_con()
stat <- dbpf_observations_stats(con, "NGO-RC-163")
dbDisconnect(con)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.