aq_locations: Providing data about distinct measurement locations.

Description Usage Arguments Details Value Examples

View source: R/locations.R

Description

Providing data about distinct measurement locations.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
aq_locations(
  country = NULL,
  city = NULL,
  location = NULL,
  parameter = NULL,
  has_geo = NULL,
  limit = 10000,
  latitude = NULL,
  longitude = NULL,
  radius = NULL,
  page = NULL
)

Arguments

country

Limit results by a certain country – a two-letters code see countries() for finding code based on name.

city

Limit results by a certain city.

location

Limit results by a certain location.

parameter

Limit to only a certain parameter (valid values are 'pm25', 'pm10', 'so2', 'no2', 'o3', 'co' and 'bc'). If no parameter is given, all parameters are retrieved.

has_geo

Filter out items that have or do not have geographic information.

limit

Change the number of results returned, max is 10000 by page. If no page value, then all results or limit * 100 (maximal number of pages) is returned.

latitude

Latitude of the center point (lat, lon) used to get measurements within a certain area.

longitude

Longitude of the center point (lat, lon) used to get measurements within a certain area.

radius

Radius (in meters) used to get measurements within a certain area, must be used with latitude and longitude

page

The page of the results to query (max 100).

Details

For queries involving a city or location argument, the URL-encoded name of the city/location (as in cityURL/locationURL), not its name, should be used. You can query any nested combination of country/location/city (level 1, 2 and 3), with only one value for each argument. If you write inconsistent combination such as city="Paris" and country="IN", an error message will be returned. If you write city="Delhi", you do not need to write the code of the country, unless one day there is a city with the same name in another country.

Value

A results data.frame (dplyr "tbl_df") with 12 columns:

and two attributes, a meta data.frame (dplyr "tbl_df") with 1 line and 5 columns:

and a timestamp data.frame (dplyr "tbl_df") with the query time and the last time at which the data was modified on the platform.

Examples

1
2
3
4
## Not run: 
aq_locations(city='Delhi', parameter='co')

## End(Not run)

ropenaq documentation built on Jan. 13, 2021, 6:21 a.m.