View source: R/PurpleAir_API.R
PurpleAir_getMemberHistory | R Documentation |
Sends a request to the PurpleAirAPI API endpoint described at: https://api.purpleair.com/#api-groups-get-member-history
PurpleAir_getMemberHistory(
api_key = NULL,
group_id = NULL,
member_id = NULL,
start_timestamp = NULL,
end_timestamp = NULL,
average = 10,
fields = PurpleAir_PAT_QC_FIELDS,
baseUrl = "https://api.purpleair.com/v1/groups"
)
api_key |
PurpleAir API READ key. |
group_id |
The |
member_id |
Unique |
start_timestamp |
Desired start datetime (ISO 8601). |
end_timestamp |
Desired end datetime (ISO 8601). |
average |
Temporal averaging in minutes performed by PurpleAir. One of: 0 (raw), 10, 30, 60 (hour), 360, 1440 (day). |
fields |
Character string specifying which 'sensor data fields' to include in the response. |
baseUrl |
URL endpoint for the "Get Groups list" API. |
Tibble with historical data for a single sensor.
# Fail gracefully if any resources are not available
try({
library(AirSensor2)
PurpleAir_getMemberData(
api_key = PurpleAir_API_READ_KEY,
group_id = MY_GROUP_ID,
member_id = MY_MEMBER_ID
)
}, silent = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.