R/Clarity_API.R
Clarity_getAllOpenIndvidual.RdSends a request to the Clarity API endpoint for Open Data.
Measurement data from -- All open datasources
Measurements returned -- Individual values for last complete hour (hour-aligned) plus fraction of current hour
PM2.5 Mass Concentration -- Individual sample
Clarity_getAllOpenIndvidual(
api_key = NULL,
format = "USFS",
baseUrl =
"https://clarity-data-api.clarity.io/v1/open/all-recent-measurement/pm25/individual"
)Clarity API READ Key. If api_key = NULL, it
will be obtained using getAPIKey("Clarity-read").
Customized output format (currently only "USFS").
URL endpoint.
List containing five data frames: meta, pm2.5_QCFlag,
pm2.5, nowcast_QCFlag and nowcast.
# \donttest{
# Fail gracefully if any resources are not available
try({
library(AirSensor2)
Clarity_getAllIndividualOpen(
api_key = Clarity_API_READ_KEY,
format = "USFS"
)
}, silent = FALSE)
#> Error in Clarity_getAllIndividualOpen(api_key = Clarity_API_READ_KEY, :
#> could not find function "Clarity_getAllIndividualOpen"
# }