🌎 🌍 🌏 R package for the OpenAQ API 🌎 🌍 🌏
Clone or download
Latest commit 5d3e836 Mar 3, 2018



CRAN_Status_Badge Build Status Build status codecov.io


This R package is aimed at accessing the openaq API. OpenAQ is a community of scientists, software developers, and lovers of open environmental data who are building an open, real-time database that provides programmatic and historical access to air quality data. See their website at https://openaq.org/ and see the API documentation at https://docs.openaq.org/. The package contains 5 functions that correspond to the 5 different types of query offered by the openaq API: cities, countries, latest, locations and measurements. The package uses the dplyr package: all output tables are data.frame (dplyr "tbl_df") objects, that can be further processed and analysed.

Check out this blog post about OpenAQ.

More details about the package can be found in the vignettes, in particular the introductory vignette.

Via the API since November 2017 the API only provides access to the latest 90 days of OpenAQ data. The whole OpenAQ data can be accessed via Amazon S3. See this announcement. You can interact with Amazon S3 using the aws.s3 package and the maintainer of ropenaq plans to write tutorials about how to access OpenAQ data and will also keep the documentation of ropenaq up-to-date regarding data access changes.


Install the package with:


Or install the development version using devtools with:


If you experience trouble using the package on a Linux machine, please run


If it answers GnuTLS, run

apt-get install libcurl4-openssl-dev

And desinstall then re-install curl.


If it still doesn't work, please open a new issue!


  • Please report any issues or bugs.
  • License: GPL
  • Get citation information for ropenaq in R doing citation(package = 'ropenaq')
  • Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.