pa_getMembersData | R Documentation |
Sends a request to the PurpleAir API endpoint described at: https://api.purpleair.com/#api-groups-get-members-data
Retrieves data for all sensors in the specified group.
pa_getMembersData(
api_key = NULL,
group_id = NULL,
fields = SENSOR_DATA_PM25_FIELDS,
location_type = NULL,
max_age = 604800,
baseUrl = "https://api.purpleair.com/v1/groups"
)
api_key |
PurpleAir API READ key. |
group_id |
The |
fields |
Comma-separated list of 'sensor data fields' to include in the response. |
location_type |
The |
max_age |
Filter results to only include sensors modified or updated
within the last |
baseUrl |
URL endpoint for the "Get Members Data" API. |
List containing current data for all sensors in the specified group.
# Fail gracefully if any resources are not available
try({
library(AirSensor)
pa_getMembersData(
api_key = PURPLE_AIR_API_READ_KEY,
group_id = MY_GROUP_ID
)
}, silent = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.