Formats and exposes the UK Defra Air Quality data
npm install defra-air-quality-js> A Node.js library for scraping, formatting and returning Defra Air Quality data

This library exposes a full, formatted list of air quality measurement stations around the UK, and helper methods for finding specific stations based on name or location.
$ npm install defra-air-quality-js --save
See the ./examples directory for various use cases.
#### .list() - List all stations
``js`
defraAirQuality
.list()
.then(stations => {
// stations - Array of stations
});
#### .findByName() - Find a specific station by name
`js`
defraAirQuality
.findByName('Auchencorth Moss')
.then(station => {
// station - The requested station
});
#### .findByNearestLocation() - List all stations
`js`
defraAirQuality
.findByNearestLocation(51.501476, -0.140634)
.then(station => {
// station - The nearest station to the supplied latitude and longitude
});
The data source for this library is Defra's UK Air quality https://uk-air.defra.gov.uk/assets/rss/current_site_levels.xml, which is updated hourly.
This library has a full mocha` test suite, which can be triggered by running:
$ npm test