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)
An AirSensor object.
An AirSensor object.
An airsensor object containing all data from both incoming objects.
# \donttest{
# 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)
#> ERROR [2023-04-03 16:31:31] data file could not be loaded from: https://airsensor.aqmd.gov/PurpleAir/v1/airsensor/2020/airsensor_scaqmd_202001.rda
#> Error : Data file could not be loaded from: https://airsensor.aqmd.gov/PurpleAir/v1
# }