API Reference

The OpenAQ API Wrapper

Classes

openaq.OpenAQ([version]) Create an instance of the OpenAQ API

Methods

openaq.OpenAQ.cities(**kwargs) Returns a listing of cities within the platform.
openaq.OpenAQ.countries(**kwargs) Returns a listing of all countries within the platform
openaq.OpenAQ.latest(**kwargs) Provides the latest value of each parameter for each location
openaq.OpenAQ.locations(**kwargs) Provides metadata about distinct measurement locations
openaq.OpenAQ.measurements(**kwargs) Provides data about individual measurements
openaq.OpenAQ.fetches(**kwargs) Provides data about individual fetch operations that are used to populate data in the platform.
openaq.OpenAQ.parameters(**kwargs) Provides a simple listing of parameters within the platform.
openaq.OpenAQ.sources(**kwargs) Provides a list of data sources.

Utility Functions

Helpers

openaq.utils.mass_to_mix(value, param[, unit]) Convert units from ug/m3 to ppb or ppm.

Visualization

openaq.viz.tsplot(data[, time_col, ax, …]) Plot a timeseries.