I’ve recently spent some time playing with the idea of associating Citizen Space consultations with a geographic location.

We already do this to some extent. Consultations can be associated with one or more local wards or areas, so that visitors to Citizen Space can enter their postcode and see a list of consultations related to the area they live in. This is great for helping people find out what’s going on near them, but I’ve been itching to take this geographic information further. In particular:

1) It would be nice to show this information visually, for example on a map. This is particularly useful if a policy relates to a specific object (eg a building, road junction or monument), or an area that doesn’t correspond to pre-defined ward boundaries (eg a bus route, catchment area or park)

2) We love Open Data. If we’re storing data about a consultation, it’s always nice to make it available in a standard format so that other websites and applications can make use of it. Currently we’re not sharing any geographic information with the rest of the world.

So how could this work? A sneak peak of Citizen Space pre-release features:

I’ve added some extra fields so that you can enter longitude and latitude coordinates when setting up a consultation. Alternatively, if you want to specify a shape (such as the footprint of a building), a line (such as a bus route), or an outline (such as the boundaries of a catchment area), you can upload a KML file to your consultation. If you have a GIS team or supplier, they should be able to provide this data in the right format.

Screenshot showing fields for adding longitude, latitude and uploading a KML file

When visitors view the consultation record, they’ll see an interactive map marked with the information you specified:

Map showing a single point

Map showing a single point

Map showing an outline

Map showing the outline of an area


While it’s instructive to show a map of the consultation area to Citizen Space visitors, this location data becomes even more interesting if we let third-party users and developers get their hands on it. In my prototype code, I’ve included three ways of sharing the data:

Method 1: KML
If you look at those screenshots you’ll see that there’s a link to a KML feed underneath the map. If you uploaded your own KML file, it will link straight to that file. If you entered coordinates, it will generate a new KML file just containing the point you specified.

KML is a very simple way to share mapping data with other online applications. It can be done using sites such Google Maps and Microsoft Virtual Earth without any programming knowledge. Lets say you’re consulting about a proposed cycle path, and have uploaded a KML file plotting the complete route of the path. A local parents’ group might use the KML data to overlay your route over their existing map of schools, parks and youth centres, to show how child safety could be improved by the construction of the path.

Method 2: GeoRSS
Citizen Space currently provides RSS feeds that let users subscribe to all the latest consultations, or consultations that meet certain search criteria. These feeds are also used by third-party sites to embed up-to-date consultation information, or to aggregate consultations from multiple sources into a single list.

If we have geographic coordinates associated with a consultation, it’s very easy to publish this information as part of the RSS feed, using the emerging GeoRSS standard. Apps that understand and are interested in the location data can use it in much the same way as the KML data above. Apps and users who are not interested in location data won’t see any difference to their feeds.

Method 3: RDFa
It turns out the RDFa specification includes the ability to link your document to a place, using the “based_near” tag. If you’ve entered latitude and longitude information when setting up your consultation, this extra bit of RDFa will be published along with the rest of the consultation record. Sadly I haven’t found many examples of applications that currently use the based_near feature of RDFa, but here are a couple of ideas I’ve been thinking about:

  • A visual version of the Citizen Space aggregator, that can display consultations from many different sources on the same map.
  • A mobile app that alerts you when you’re near an object or place that’s being consulted on.

This new code isn’t in Citizen Space at the time of publishing this post, but will likely be included in a future release.

If anyone else has ideas for making use of location-based consultation data, please drop me a line. The more good ideas we get, the more likely it is that this feature will make it into a future Citizen Space release.

I’d also be keen to hear of formats we could use to share the data other than KML, GeoRSS or RDFa. Has anyone used GeoJSON for example?