OS OpenData interactive postcode viewer

We recently wrote about the work of our on our summer interns in our Labs team, Joseph Braybrook, creating a Minecraft map of Great Britain. During his time with us Joseph also created an interactive postcode viewer for exploring all 1.7 million postcodes in Great Britain.

The idea came from a demo program included with Processing – a programming language and development environment with a focus on creating audio/visual applications. The demo visualises 41,557 US zipcodes as individual points as shown in the screenshot below.

We decided it would be interesting to try the same approach using British postcodes, which are readily available as open data in our Code-Point Open product. This is a much larger dataset with almost 1.7 million individual records.

To further showcase what can be achieved with OS OpenData we also incorporated some of our mapping in the form of OS VectorMap District.

How we built it

Joe used the Processing language and development environment. Processing started life as a tool to teach software literacy in the visual arts field, and it has subsequently evolved into a powerful tool for building cross-platform audio/visual applications.

The code reads all Code-Point Open records into a data structure and displays them as a scatter plot. To provide a bit of context at the highest zoom level (GB overview) we added Postal Boundaries Open 2012, an open data product created by Geolytix. The screenshot below shows this initial view with all postcodes visible.

As the user starts to type, matching postcodes are highlighted in green and the display zooms in to accommodate all these points. The screenshot below shows the display after typing the letter ‘S’ (this happens to have the largest number of matching postcodes).

At the lowest zoom level, backdrop mapping is displayed to provide some context. We created this using OS VectorMap District colour raster, which is converted on-the-fly to grayscale and inverted to produce this distinctive style:

In keeping with the visual arts heritage of Processing, we added the capability to run the program automatically. In this mode the software randomly selects a postcode and simulates user keystrokes, zooming in then zooming out in a continuous loop.

Next steps

This project provided an opportunity to evaluate unfamiliar technology and try out some open data provided by other suppliers. The result is a compelling visualisation that demonstrates what can be achieved using free to access address and mapping data.

Let us know what you think on the blog – and if it inspires you to create new applications using OS OpenData let us know too.


You may also like

Introducing our OS Data Hub
OS OpenData products now available in GeoPackage format
Help us shape future OS OpenData formats – take part in our trial
How Geovey built on their Geovation Challenge success

4 Responses

    1. Gemma

      Hi Robert,

      Thanks for your comment, it’s currently internal code that runs on a desktop but we are working on a web-based version so we can make it accessible to the public so look out for an announcement.

      Many thanks

      1. Robert Barr

        Great , I look forward to seeing a web based version. Nice to see this Ordnance Survey commitment to getting Open Data used more widely.

  1. Jon May

    This looks great. I would love to see a version which would take a list of postcodes and colour all of them in on the map so that I could see a geographical distribution of (for example) respondents to a survey.

Leave a Reply

Your email address will not be published. Required fields are marked *

Name* :

Email* :