Description Usage Arguments Value Examples
The pas
is checked for the latest pa_synoptic format
and presence of core metadata columns:
ID – Purple Air ID
label – location label
DEVICE_LOCATIONTYPE – location descriptor
THINGSPEAK_PRIMARY_ID – Thingspeak API access ID
THINGSPEAK_PRIMARY_ID_READ_KEY – Thingspeak API access key
THINGSPEAK_SECONDARY_ID – Thingspeak API access ID
THINGSPEAK_SECONDARY_ID_READ_KEY – Thingspeak API access key
longitude – decimal degrees E
latitude – decimal degrees N
pm25 – latest PM25
lasteSeenDate – last update datetime
sensorType – PurpleAir sensor type
flag_hidden – hidden flag
isOwner – owner logical
humidity – %
temperature – deg F
pressure – mb
age – sensor age
parentID – device parent ID
timezone – Olson timezone
flag_highValue – out of spec flag
flag_attenutation_hardware – hardware failure flag
Ozone1 – latest ozone data
pm25_current – current PM2.5 data
pm25_10min – 10-minute average PM2.5 data
pm25_30min – 30-minute average PM2.5 data
pm25_1hr – 1-hour average PM2.5 data
pm25_6hr – 6-hour average PM2.5 data
pm25_1day – 1-day PM2.5 average data
pm25_1week – 1-week PM2.5 average data
statsLastModifiedDate – last modified date
statsLastModifiedInterval – interval between modified date
deviceID – unique device identifier
locationID – generated location ID
deviveDeploymentID – generated unique ID
countryCode – ISO 3166-1 alpha-2
stateCode – ISO 3166-2 alpha-2
timezone – location timezone
airDistrict – Air district, if any
pwfsl_closestDistance – nearest regulatory monitor distance, meters
pwfsl_closestMonitorID – nearest regularoty monitor ID
sensorManufacturer – hardware manufacturer
targetPollutant – target pollutant data
technologyType – type of sensor technology
communityRegion – defined regional community.
1 | pas_upgrade(pas = NULL, verbose = TRUE)
|
pas |
A pa_synoptic object. |
verbose |
(logical) Display upgrade messages. |
TRUE
if pas
has the correct structure, FALSE
otherwise.
1 2 3 4 5 6 7 8 9 10 11 12 | library(AirSensor)
# Initialize the required spatial utilities
initializeMazamaSpatialUtils()
# Use outdated pa_synoptic database
setArchiveBaseUrl('http://data.mazamascience.com/PurpleAir/v1')
pas <-
pas_load() %>%
pas_upgrade()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.