metainfo: Query WAQI Stations Metainformation

Description Usage Arguments Details Value See Also Examples

View source: R/metainfo.R

Description

Access the WAQI API to query metainformation for a given set of monitoring stations.

Usage

1
metainfo(x, token, uid = "uid", stock = NULL, sort = TRUE, ...)

Arguments

x

WAQI stations as sf or Spatial object, usually derived from inventory.

token

API token ID for Air Quality Open Data Platform as character.

uid

Column in 'x' with unique monitoring station ID as character; defaults to "uid" which is the API standard.

stock

A data.frame of already available metainformation created during a previous function run, see 'Details'.

sort

A logical determining whether the rows are to be re-arranged by unique IDs.

...

Additional arguments passed to makePSOCKcluster.

Details

Providing already available metainformation is a convenient way to process either newly added monitoring stations or stations that have temporarily been out of service during a previous function run only, and hence reduce computation time significantly.

Value

Retrieved metainformation as data.frame.

See Also

inventory

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
tkn = keyring::key_get("waqi_api")

deu = raster::getData(country = "DEU", level = 0, path = raster::tmpDir())
stn = inventory(deu, token = tkn)

nfo = metainfo(stn, token = tkn)
head(nfo, 10)

## End(Not run)

fdetsch/claiR documentation built on July 27, 2021, 6:26 p.m.