Open Air

Report on air quality sensors in Africa using APIs of open data projects.

Project website

Sample screenshot

Background

This project exists because I went to a workshop in South Africa where air quality sensors were put together. These sensors contribute air quality measurement data to the luftdaten.info project. This data and those of other countries is made available through their APIs. This projects makes it easy to see the measurements of the South African (ZA) sensors.

This was later expanded to include the Open Africa site's data too for several African countries.

Local development

Libraries

  • Jekyll - To build the static site. No Jekyll templating or themes are used though.
  • Bootstrap - To add styling to the tables (from tutorial), the navbar (from tutorial) and to the page overall.
  • JQuery - To handle fetching JSON data.
  • Mustache JS - To create tables easily using a template and dynamic data. These templates have to be escaped using the Jekyll raw tag.

Setup

  1. Clone the project from the original or a fork. For example:
    $ git clone [email protected]:MichaelCurrin/open-air.git
    
  2. Install Jekyll globally.

Run

  1. Start the server.
    $ cd <PATH_TO_REPO>
    $ jekyll serve
    
  2. Open this URL in the browser.

Setup on Github Pages

  1. Use this repo or a fork on Github Pages.
  2. Go to Settings.
  3. Go to Github Pages section.
  4. Enable website using master branch. The page will reload.
  5. Navigate to the section again and use the URL you see.

Future development

  • This project could be expanded to allow a user choice of country using a droplist for Luftdaten page.
  • Add count of rows at the top of a sensor page.
  • Add sort to tables.
  • Add filter to tables. Such as by pin type or location or value range.
  • Freeze top row of table.
  • Fix navbar to the top of the screen.

License

MIT License

Feel free to fork this project and submit a PR with improvements. Or use this as a template for your own data project, with a link back this this repo.

jekyll logo

Want a Jekyll website built?

Hire a Jekyll developer