Online data feeds can be used to dynamically add content to a website. RSS feeds are often used to provide a listing of the latest news or postings from other websites, but there are many other types of data feed, some of which can be presented graphically.
ElectricityInfo uses live data about UK electricity supply to display Britain’s current fuel mix and carbon intensity – the average amount of CO2 being produced per unit of electricity from the current mix of power stations.
The website reads a data feed from Elexon which provides live data, updated every 5 minutes, for the National Grid and the Electricity Supply Industry.
The site then calculates the current carbon intensity level using the fuel mix and its own data on the carbon intensity of different energy sources.
Our client, Environmental Protection Scotland, wanted to include a live data map of air pollution levels in Scottish regions on their Breathe Scotland website.
The data was available from Air Quality Scotland’s website as a json feed. As well as current pollution levels, the feed includes data (svg paths) which can be used to draw the map.
The data is read from Air Quality Scotland’s website and decoded from json into a php array. Custom php code then extracts the required data and outputs a colour coded vector map of Scotland.
These are just two examples of how data feeds available online can be used to provide real-time graphical data on a website.