Retrieve and parse timeseries data from the Thingspeak API for specific PurpleAir sensors.
Dates can be anything that is understood by
MazamaCoreUtils::parseDatetime()
including any of the following
recommended formats:
"YYYYmmdd"
"YYYY-mm-dd"
"YYYY-mm-dd HH:MM:SS"
pat_createNew( id = NULL, label = NULL, pas = NULL, startdate = NULL, enddate = NULL, timezone = NULL, baseUrl = "https://api.thingspeak.com/channels/", verbose = FALSE )
id | PurpleAir sensor 'deviceDeploymentID'. |
---|---|
label | PurpleAir sensor 'label'. |
pas | PurpleAir Synoptic pas object. |
startdate | Desired UTC start time (ISO 8601) or |
enddate | Desired UTC end time (ISO 8601) or |
timezone | Timezone used to interpret start and end dates. |
baseUrl | Base URL for Thingspeak API. |
verbose | Logical controlling the generation of warning and error messages. |
A PurpleAir Timeseries pat object.
When timezone = NULL
, the default, dates are interpreted to be
in the local timezone for the sensor of interest.
Starting with AirSensor version 0.6, archive file names are generated with a unique "device-deployment" identifier by combining a unique location ID with a unique device ID. These "device-deployment" identifiers guarantee that movement of a sensor will result in the creation of a new time series.
Users may request a pat object in one of two ways:
1) Pass in id
with a valid a deviceDeploymentID
2) Pass in both label
and pas
so that the
deviceDeploymentID
can be looked up.
# \donttest{ library(AirSensor) pat <- pat_createNew( label = "Seattle", pas = example_pas, startdate = 20180701, enddate = 20180901 ) pat_multiPlot(pat)#> Warning: Removed 2464 rows containing missing values (geom_point).#> Warning: Removed 2464 rows containing missing values (geom_point).#> Warning: Removed 2464 rows containing missing values (geom_point).#> Warning: Removed 2464 rows containing missing values (geom_point).#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <ce>#> Warning: conversion failure on 'μg / m³' in 'mbcsToSbcs': dot substituted for <bc># }