Scotland Gender Split

Based on 2011 Census data. We can see a clear majority of the population is Female.

The raw numbers are:
Population total:
5295403
Male total:
2567444
Female total:
2727959
Male total %:
48.48
Female total %:
51.52
Top 5 Male by %:
Shetland Islands – 50.77
Aberdeenshire – 49.52
Orkney Islands – 49.49
Aberdeen City – 49.42
Na h-Eileanan an Iar (Western Isles) – 49.37
Top 5 Female by %
West Dunbartonshire – 52.40
North Ayrshire – 52.37
South Ayrshire – 52.36
East Renfrewshire – 52.34
Inverclyde – 52.14

And the split by local authority:

Scotland Gender Split

X Percent of the Population of Scotland Lives Within Y Miles of Glasgow

I have often heard that X percent of the population Scotland live within Y miles of Glasgow. With the X and the Y varying between claimant.

This is a pretty easy question to answer, using the 2011 Scottish Census population results and the Census Output Area Population Weighted Centroids. Then we get the extents of Glasgow City Council from OS Boundary Line.

The results are:

,Pop. Count:,%
Scotland, 5295403, 100
Glasgow, 593245, 11.2
25 km, 2002431, 37.8
50 km, 2839583, 53.6
50 miles, 3776701, 71.3
100 km, 4201860, 79.3
100 miles, 4483330, 84.7

Pretty interesting results, especially the within 50 miles query.

To see how these boundaries look on a map:

Population buffers around Glasgow

A few caveats:
We are using the population weighted centroids, which will produce some minor inaccuracies, but is a very good generalisation.
Also we are using euclidean buffers on the British National Grid plain, so these are not geodesic buffers. The difference will likely be small at these distances.

UK Postcode Polygon Accuracy Comparison Part 2

So we have seen from the previous comparing the raw polygon accuracy between Voronoi generated polygons and NRS generated postcode polygons: Results.

The physical results are interesting, and a visual examination can provide a useful overall comparison, but how does this actually impact me?

I have a CAG from GCC and I just want to attach a postcode to it. How different will my results be between a true postcode boundary dataset from the NRS, and a generated Voronoi dataset from the OS?

I’m glad you are still with me, it might be useful to explain how postcodes actually work in this context:

Lets take a postcode of G31 2XT how does it break down?
Area: G
District: G31
Sector: G31 2
Unit: G31 2XT

So then we can compare how an actual address dataset, like the Glasgow CAG, spatially joined to two postcode datasets compare:

Assuming the NRS dataset is correct (a good assumption) how accurate is a postcode based on an OS Code-Point Open generated Voronoi polygon based on Glasgow City Council residentially classified properties as of 16/11/2014:

Total number of properties:
245096     100%
Correct Area:
245096     100%
Correct District
243650     99.4%
Correct Sector
240956     98.3%
Correct Unit
174344     71.1%

We can see that up to a sector level a Voronoi polygon can produce an extremely accurate results. A visual comparison of how this plays out in Glasgow can be seen here, with the legend best read from the bottom:

UK Postcode Comparison

UK Postcode Polygon Accuracy Comparison

One of the main ways of generating postcode polygons is to use OS Code-Point Open and from them generate Voronoi polygons.

This visualization compares the Code-Point Voronoi polygons to postcodes from NRS postcode extract, Which is widely considered the best postcode dataset for Scotland. Scotland is used because we have a CAG (NLPG in the south) extract for Glasgow available for a property comparison of accuracy.

The black areas are where the two datasets agree and the coloured areas are where they do not. For this comparison we can consider NRS to be correct.

Postcode Comparison

Open UK Postcode Polygons

The Ordnance Survey releases Code-Point Open, which contains the centroid coordinates for each postcode in the UK. One way to generate open postcode polygons is to generate a Voronoi diagram from those points.

The results initially look good, but how accurate are these generated polygons compared with actual postcode polygons.

Luckily the National Records of Scotland (NRS) also maintain a postcode dataset, which is released on their website for free. So we can do an easy comparison of the two postcode datasets, which should be an indication of how accurate Voronoi postcode areas would be across the UK.

I have decided to use Glasgow for the comparison because we also have the Corporate Address Gazetteer, which will allow us to compare not just the actual polygons, but actual properties. It does not really matter if the postcode polygon is incorrect, if all of the properties within that postcode would still be correct.

Fist we have a simple side by side look at the two datasets we will compare:

Glasgow Postcodes

And a closeup overlay:

Zoomed in

The Voronoi one has been created from Code-Point Open points that fell within the Glasgow City Council Unitary Authority and the output Voronoi was clipped to the extent of the Unitary Authority.

The NRS created postcodes were simply selected from the ones where their “Point on Surface” fell within the Unitary Authority. The process will detailed in a later post.