The Open Data Group of Warwickshire in England is currently running a hack competition. I entered the following mashup as my hack. You can click the screenshot to see it in action:
The mashup is based on four datasets released by the council:
- The list of parks in Warwickshire as XML
- The list of libraries in Warwickshire as XML
- The list of museums in Warwickshire as XML
- The list of schools in Warwickshire as XML
To make it easy on myself, I put them into YQL and used them as a single XML file retrieved in one HTTP request:
select * from xml where url in ( "http://ws.warwickshire.gov.uk/parks.xml", "http://ws.warwickshire.gov.uk/libraries.xml", "http://ws.warwickshire.gov.uk/museums.xml", "http://opendata.s3.amazonaws.com/schools/schools-warwickshire.xml" )
The rest was just a matter of assembling the data in PHP, rendering out the HTML, and progressively enhancing it to do my bidding.
I cover the whole process — creating the mashup and using YUI3, progressive enhancement, and event delegation to make your life easier — in the following screencast. (I've also written it out as a step-by step-tutorial elsewhere.)
You can download the mashup source on GitHub and play with it.