osem_measurements_archive | R Documentation |
This function is significantly faster than osem_measurements
for large
time-frames, as daily CSV dumps for each sensor from
archive.opensensemap.org are used.
Note that the latest data available is from the previous day.
osem_measurements_archive(x, ...)
## S3 method for class 'sensebox'
osem_measurements_archive(
x,
fromDate,
toDate = fromDate,
sensorFilter = ~TRUE,
...,
progress = TRUE
)
x |
A 'sensebox data.frame' of a single box, as retrieved via |
... |
see parameters below |
fromDate |
Start date for measurement download, must be convertable via 'as.Date'. |
toDate |
End date for measurement download (inclusive). |
sensorFilter |
A NSE formula matching to |
progress |
Whether to print download progress information, defaults to |
By default, data for all sensors of a box is fetched, but you can select a
subset with a dplyr
-style NSE filter expression.
The function will warn when no data is available in the selected period, but continue the remaining download.
A tbl_df
containing observations of all selected sensors for each time stamp.
osem_measurements_archive(sensebox)
: Get daywise measurements for one or more sensors of a single box.
osem_measurements
osem_box
# fetch measurements for a single day
box = osem_box('593bcd656ccf3b0011791f5a')
m = osem_measurements_archive(box, as.POSIXlt('2018-09-13'))
# fetch measurements for a date range and selected sensors
sensors = ~ phenomenon %in% c('Temperatur', 'Beleuchtungsstärke')
m = osem_measurements_archive(
box,
as.POSIXlt('2018-09-01'), as.POSIXlt('2018-09-30'),
sensorFilter = sensors
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.