Skip to contents

Get a list of locations from the locations resource.

Usage

list_locations(
  bbox = NULL,
  coordinates = NULL,
  radius = NULL,
  providers_id = NULL,
  parameters_id = NULL,
  owner_contacts_id = NULL,
  manufacturers_id = NULL,
  licenses_id = NULL,
  monitor = NULL,
  mobile = NULL,
  instruments_id = NULL,
  iso = NULL,
  countries_id = NULL,
  order_by = NULL,
  sort_order = NULL,
  limit = NULL,
  page = NULL,
  as_data_frame = TRUE,
  dry_run = FALSE,
  rate_limit = FALSE,
  api_key = NULL
)

Arguments

bbox

A list of 4 numerics, representing a geographic bounding box for filtering results that are within, in the form [minimum X, minimum Y, maximum X, maximum Y].

coordinates

A list of 2 numerics, representing a central WGS84 geographic coordinate, in the form [y,x] or [lat,lng], for use with the radius parameter.

radius

An integer for the number of meters to search around the coordinates parameter for filtering locations within.

providers_id

An integer or list of integers representing the providers_id to filter results on.

parameters_id

An integer or list of integers representing the parameters_id to filter results on.

owner_contacts_id

An integer or list of integers representing the owner_contacts_id to filter results on.

manufacturers_id

An integer or list of integers representing the manufacturers_id to filter results on.

licenses_id

An integer or list of integers representing the licenses_id to filter results on.

monitor

A logical to filter results to regulatory monitors (TRUE) or air sensors (FALSE), both are included if NULL.

mobile

A logical to filter results to mobile (TRUE) or stationary (FALSE) location, both are included if NULL.

instruments_id

An integer or list of integers.

iso

An ISO 3166-1 alpha-2 string of the country to filter the results.

countries_id

An integer or list of integers of the countries_id(s) to filter the results.

order_by

A string.

sort_order

A string.

limit

An integer to limit the number of results.

page

An integer for the page number for paginating through results.

as_data_frame

A logical for toggling whether to return results as data frame or list defaults to TRUE.

dry_run

A logical for toggling a dry run of the request, defaults to FALSE.

rate_limit

A logical for toggling automatic rate limiting based on rate limit headers, defaults to FALSE.

api_key

A valid OpenAQ API key string, defaults to NULL.

Value

A data frame or list of results.

Examples

if (FALSE) { # \dontrun{
locations <- list_locations()
} # }