Description Usage Arguments Value References Examples
View source: R/pat_downloadParseRawData.R
Downloads timeseries data for a specific PurpleAir sensor from the ThingSpeak API and parses the content into individual dataframes. This function will always return dataframes with the appropriate columns even if no data are returned from ThingSpeak.
The returned list contains the following dataframes:
meta
– pas
records for the specified sensor
A_PRIMARY
– channel A primary dataset
A_SECONDARY
– channel A secondary dataset
B_PRIMARY
– channel B primary dataset
B_SECONDARY
– channel B secondary dataset
These dataframes contain ALL data available from ThingSpeak for the specified sensor and time period.
See the references.
1 2 3 4 5 6 7 8 9 |
id |
PurpleAir sensor 'deviceDeploymentID'. |
label |
PurpleAir sensor 'label'. |
pas |
PurpleAir Synoptic pas object. |
startdate |
Desired start time (ISO 8601). |
enddate |
Desired end time (ISO 8601). |
timezone |
Timezone used to interpret start and end dates. |
baseUrl |
Base URL for Thingspeak API. |
List containing multiple timeseries dataframes.
https://www2.purpleair.com/community/faq#!hc-sd-card-csv-file-header
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(AirSensor)
setArchiveBaseUrl("http://data.mazamascience.com/PurpleAir/v1")
pas <- pas_load()
pat_rawList <-
pat_downloadParseRawData(
id = "78df3c292c8448f7_21257",
pas = pas
)
lapply(pat_rawList, head)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.