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.
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.