This library serves as the official R client to the Array of Things API.
This isn't listed with CRAN yet (because it's awful -- I'm not an R developer). You can install it from GitHub though:
devtools::install_github("UbranCCD-UChicago/aot-client-r")
There are two general types of functions presented: ls and stat. You should use the ls functions to work with the list endpoints, and stat is for details:
ls.projects
to get a list of projectsls.nodes
to get a list of nodesls.sensors
to get a list of sensorsls.observations
to get the observation datastat.project
to get details for a single projectstat.node
to get details for a single nodestat.sensor
to get details for a single sensor
The stat functions require a unique id for the type of metadata you're looking for -- slug
for
projects, vsn
for nodes, and path
for sensors.
All of the functions allow you to add arbitrary filters/parameters as well:
# sensors onboard node 004
df <- ls.sensors(filters=list(node="004"))
df <- ls.observations(filters=list(
sensor="metsense.bmp180.temperature",
timestamp="ge:2018-08-01T00:00:00", # note that the api only contains the past week's data
timestamp="lt:2018-09-01T00:00:00" # so your filters will be for obviously later dates here.
))