inventory: Query WAQI Stations Within Spatial Extent

Description Usage Arguments Value Note Examples

View source: R/inventory.R

Description

Access the WAQI API to query all available monitoring stations within a given spatial extent.

Usage

1
inventory(x, token, ...)

Arguments

x

A sf or Spatial object from which to extract spatial extent.

token

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

...

Currently not used.

Value

Monitoring stations within spatial extent as sf object.

Note

The rgeos package is required for finding out which hole belongs to which exterior ring in st_as_sfc for SpatialPolygons.

Examples

1
2
3
4
5
6
7
8
## Not run: 
deu = raster::getData(country = "DEU", level = 0, path = raster::tmpDir())
stn = inventory(deu, token = keyring::key_get("waqi_api"))

library(mapview)
mapview(deu, alpha.regions = .25) + stn

## End(Not run)

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