You are here

Cookie-cutting shapefiles for better data visualisations

We've made a set of administrative and census land area-only boundary shapefiles
land area administrative and census area boundaries

We've created a set of files for administrative and census land-area only boundaries in Northern Ireland. Get them here and here.

There are sets of administrative and census boundary shapefiles on OpenDataNI which are really useful if you work with spatial-based (geographical) data, such like health and deprivation measures.

Administrative (OSNI/LPS)

  • Local Government Districts 2012 (i.e. Councils)
  • Assembly/Westminster Parliamentary Constituencies
  • Wards 2012
  • District Electoral Areas 2012

Census (NISRA)

  • Super Output Areas (2011 Census)
  • Small Areas (2011 Census)
  • Output Areas (2001 Census)

… and some others.

The shapefiles resemble the picture below. That might look a bit funny to you if you’re like me— the general outline of Northern Ireland is there, but where’s the big donut hole in the middle?

The effects of the water bodies on the outlines are seen most clearly in the areas around Lough Neagh, in Wards like Aldergrove, Derrytrasna and Ardboe. Official boundaries of the areas around the edge of the Lough meet in the middle of the water, rather than ending at it’s shoreline, as you’d might expect.

The same is true for areas around the Erne waterways and Stangford Lough (even though it’s a sea lough rather than an inland lake like Neagh). Even the two Wards in the Belfast Harbour area (Duncairn and Sydenham) have unusual flat-topped shapes that run over Belfast Lough — that’s just the way the offical boundaries are drawn.

You would of course ask what’s the problem with that? In truth, there is no problem. But I think that with visual displays of data, it’s best to use something that better reflects what we need to show and what we expect to see.

Boundaries that pass over water bodies exaggerate the size of those areas. Official it may be, but not a reflection of their land area. Most data for these sorts of areas relate to people, and with only Spongebob living underwater, these boundaries distort the picture by making the areas larger than we expect.

Also, it just doesn’t look right. It’s not as instantly recognisable, and I think that’s important too.

I want to have a set of ‘cookie cut’ boundaries that I can use again (and that others can use thanks to open licensing), so I’m going to make changes to a number of shapefiles - though that I listed earlier.

What is the cut out layer then, that with the loughs and other waterways? There’s a nice NI Outline shapefile on OpenDataNI, so that will work nicely. I’m quite sure it’s part of the Ordnance Survey NI master so it’s from the same provenance as the Wards boundary shapefile itself, so it should all gel. Let’s see.

In short, to achieve the cookie cut effect, we’ll remove the bits of the Wards shapefile that are not in the NI Outline.

We’ve created a series of shapefiles and geojson format files that can be used for better data visualisations in future.

Get them here:


Bob Harper

P.S. The dataset used to illustrate the maps above is the number of GP registrations per Ward, in case you’re interested.

For a more detailed read of how the full process works, read this.