Description Usage Arguments Value Note See Also Examples
A pre-generated PurpleAir Timeseries pat object will be
loaded for the given time interval if available. Data are
loaded from the archive set with either setArchiveBaseUrl()
or
setArchiveBaseDir()
for locally archived files.
Dates can be anything that is understood by
MazamaCoreUtils::parseDatetime()
including any of the following
recommended formats:
"YYYYmmdd"
"YYYY-mm-dd"
"YYYY-mm-dd HH:MM:SS"
When no dates are specified, pat_loadLatest()
is used, loading data
for the last 7 days.
1 2 3 4 5 6 7 8 |
id |
PurpleAir sensor 'deviceDeploymentID'. |
label |
PurpleAir sensor 'label'. |
pas |
PurpleAir Synoptic pas object. |
startdate |
Desired start time (ISO 8601) or |
enddate |
Desired end time (ISO 8601) or |
timezone |
Timezone used to interpret start and end dates. |
A PurpleAir Timeseries pat object.
Archive file names are generated with a unique "device-deployment" identifier by combining a unique location ID with a unique device ID. These "device-deployment" identifiers guarantee that movement of a sensor will result in the creation of a new time series.
Users may request a pat object in one of two ways:
1) Pass in id
with a valid a deviceDeploymentID
2) Pass in both label
and pas
so that the
deviceDeploymentID
can be looked up.
pat_loadLatest
pat_loadMonth
pat_createNew
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(AirSensor)
setArchiveBaseUrl("http://data.mazamascience.com/PurpleAir/v1")
# Reference an older 'pas' before this sensor was dropped
pas <- pas_load(20190901, archival = TRUE)
pat <- pat_load(
label = "SCNP_20",
pas = pas,
startdate = 20190411,
enddate = 20190521
)
pat_multiPlot(pat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.