Skip to content

Open Source application that gathers real-time data about traffic and Nitrogen Dioxide pollution around Dublin, Ireland. Results are merged and stored into a MySQL database.

License

Notifications You must be signed in to change notification settings

msolefonte/dublin-pollution-piper

Repository files navigation

NodeJS CI Actions Status Codecov Maintainability License contributions welcome

Dublin NO2 Pollution Piper

Open Source application that gathers real-time data about traffic and Nitrogen Dioxide pollution around Dublin, Ireland. Results are merged and stored into a MySQL database.

Configuration

In order to use the application, some previous configuration has to be done. It includes both creation and configuration of prerequisites and tuning of the main configuration file.

Prerequisites

This application uses a MySQL database to store the data collected, and it has to be configured for that use. At the same time, data is collected from OpenSensorWeb.de and TomTom, so you also have to register in TomTom to get an API key.

MySQL Database

Read more about database configuration in the dedicated document.

TomTom API

In order to gather real-time traffic from data, an API Key from TomTom has to be used. More information about it can be found in the official website.

Once you already have a valid API_KEY, you have to modify the file src/config/tomtom.json (before building) or dist/config/tomtom.json (if the code has already been built).

Areas

Areas can be configured manually in the src/config/areas.json file. This document includes the list of areas covered by the application, including both the coordinates used for the traffic service and the sensor identification.

As long as sensors are available (which should be at least in Europe thanks to the European Environmental Agency), this code can be exported to anywhere in the world. You can also experiment with other kind of sensors that gather other pollutants in air like O3, CO, SO3, as they use very similar APIs. Feel free to do so!

Scripts

Installation

npm install

Testing

npm run test:coverage

Build

npm run build

Execution

npm run start

Contributing

Feel free to add issues or to create pull requests. Help is always welcome.

Versioning

SemVer is used for versioning. For the changelog, see CHANGELOG.md.

Authors

License

This project is licensed under the Apache License, Version 3.0 - see the LICENSE file for details.

About

Open Source application that gathers real-time data about traffic and Nitrogen Dioxide pollution around Dublin, Ireland. Results are merged and stored into a MySQL database.

Topics

Resources

License

Stars

Watchers

Forks