Skip to contents

Gets the set of air quality measurements from the OpenAQ API. You can filter by location, date, and type of station

Usage

get_measurements_for_location(
  country = NULL,
  city = NULL,
  location = NULL,
  date_from = Sys.Date() - 365,
  date_to = Sys.Date(),
  is_mobile = FALSE,
  max_observations = 1000,
  ...
)

Arguments

country

Two-character ISO country code

city

String for the city of interest

location

smaller-geographical identifier (i..e suburb)

date_from

Date observations to start (will be converted to UTC)

date_to

Date observations will end (will be converted to UTC)

is_mobile

Include mobile station types

max_observations

Number of observations to be returned per page. Larger numbers mean less API calls but more single server load.

...

Extra API parameters. Note all must be name-value pairs, and all values must be of type character.