sensor_join | R Documentation |
AirSensor objects are "joined end-to-end" so that time ranges
are extended for all sensors that appear in either sensor1
and
sensor2
.
Only two airsensor
objects at a time may be joined.
sensor_join(sensor1 = NULL, sensor2 = NULL)
sensor1 |
An AirSensor object. |
sensor2 |
An AirSensor object. |
An airsensor object containing all data from both incoming objects.
# Fail gracefully if any resources are not available
try({
library(AirSensor)
setArchiveBaseUrl("https://airsensor.aqmd.gov/PurpleAir/v1")
jan <- sensor_loadMonth("scaqmd", 202001)
feb <- sensor_loadMonth("scaqmd", 202002)
mar <- sensor_loadMonth("scaqmd", 202003)
apr <- sensor_loadMonth("scaqmd", 202004)
feb_mar <- sensor_join(feb, mar)
PWFSLSmoke::monitor_timeseriesPlot(feb_mar, style = 'gnats')
# Gaps in the time axis are filled with NA
feb_apr <- sensor_join(feb, apr)
PWFSLSmoke::monitor_timeseriesPlot(feb_apr, style = 'gnats')
}, silent = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.