Search

Air Quality in Bristol

Bristol City Council maintain their own network of air quality monitoring stations, mainly monitorin Nirtrogen Dioxide concentrations in roadside locations around the City. Data from the stations is published on their own web site which provides current data (eg. Bath Road)  and archived data.  In addition BCC is one of few Councils to publish local air quality data on data.gov.uk.  In fact it is the only Council to appear when searching for 'air quality', the rest of the hits all being from DEFRA.

To explore this open data set, I wrote an application to show a map of the current readings.  To produce the map, an XQuery  script

  • fetches the CSV feed of NOx readings
  • converts this CSV to XML
  • selects the latest reading for each station
  • generates an HTML page containing the map and the station data

Once in the browser, the map is initialised, icons drawn and actions added to the page.  Every 5 minutes, an AJAX regest refreshes the body of the page and the icons.