if (FALSE) {
# get sensors data by integer, numeric, or character vector of `sensor_index`
get_sensors_data(
x = as.integer(c(175257, 175413)),
fields = c("name", "last_seen", "pm2.5_cf_1", "pm2.5_atm")
)
get_sensors_data(
x = c(175257, 175413),
fields = c("name", "last_seen", "pm2.5_cf_1", "pm2.5_atm")
)
get_sensors_data(
x = c("175257", "175413"),
fields = c("name"), location_type = "outside"
)
# get sensors by bounding box around Hamilton County, OH
sf::st_bbox(c("xmin" = -84.82030, "ymin" = 39.02153,
"xmax" = -84.25633, "ymax" = 39.31206),
crs = 4326) |>
get_sensors_data(fields = c("name"))
# sensors modified in the last 60 seconds
get_sensors_data(as.POSIXct(Sys.time()) - 60, fields = "name")
}
Run the code above in your browser using DataLab