4.0.4 • Published 3 years ago
aire-madrid v4.0.4
aire-madrid
Node package to get information about Madrid's air quality.
Installation
yarn add aire-madrid
or
npm install aire-madrid
Usage examples
Get readings from 'Monóxido de Nitrógeno' (6) & 'Partículas < 2.5 µm' (9) at stations 8 (Escuelas Aguirre) and 11 (Avda. Ramón y Cajal).
const air = require('aire-madrid')
air.getReadings({ stations: [8, 11], pollutants: [7, 9]}).then((data) => {
console.log(data)
})
- The first value in the
values
array corresponds to the 1 AM of the current day. - Pollutant IDs can be found here.
- For these pollutants a scoring is offered.
Get the list of stations
air.getStations().then((data) => {
console.log(data)
})
Get the list of pollutants
air.getPollutants().then((data) => {
console.log(data)
})
More information
TODO
- Show information about possible problems in the stations
DONE
- Improve this README.
- Add a global quality score for a station
- Add pollutants scoring
- Find a better name than 'magnitude'
- Return data in the form of an array
- Add tests
- Add more methods to get readings
- Improve documentation with examples
- Add stations metadata (lng, lat, address, etc.)