Categories
All Scotland

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

Follow up from the Glasgow post by request.

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 Edinburgh City Council from OS Boundary Line.

The results are:

,Pop. Count:,%
Scotland, 5295403, 100
Edinburgh , 476626, 9
25 km, 1276757, 24.1
50 km, 2500093, 47.2
50 miles, 3919910, 74
100 km, 4310869, 81.4
100 miles, 4812421, 90.9

So we see more than people live close to Glasgow, but with 50 miles + they are closer to the capital.

To see how these boundaries look on a map:

Population buffers around Edinburgh

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.

Categories
All Mapvember OSGEO PostGIS QGIS Scotland

Mapvember 2014

Mapvember: A map/tutorial a day for every day in November.

Some days had more than one map, some had tutorials, one just had a photo. Some were very easy, others would have take a couple of days of work.

Excellent experience, good learning experience and an opportunity to post previous projects that were a bit short of being great. A little time consuming at times though. I started making the maps around half way through October, so I had almost the first week ready when November began, but the days ticked by quickly. Happy to have done it. I encourage everyone to join in next year, or any other month.

Visitor Statistics:

Total views: 3047
Uniques: 2289
Pageviews: 4327

Top 10 Countries:
United Kingdom: 1147
United States: 363
Germany: 183
France: 120
Canada: 85
Italy: 67
Spain: 66
Australia: 56
Switzerland: 42
India: 39

Mapvember Countries

Top 10 Cities:

Glasgow: 340
London: 212
Edinburgh: 122
Rostock: 45
Aberdeen: 42
Stirling: 35
San Jose: 31
Vienna: 28
Berlin: 28
Zagreb: 26

Mapvember Cities

Other Months:
August Visitors: 303
September Visitors: 641
October Visitors: 523
November Visitors: 3047

Most popular posts:
X Percent of the Population of Scotland Lives Within Y Miles of Glasgow – 521
Glasgow Subcrawl Map – 400
Polygon Outlines in QGIS – 276
Setting up PostgreSQL and PostGIS on Linux Mint (Not posted in November) – 258
Glasgow 3D Residential Property Density QGIS2threejs – 218
Georeferencing Vector Data Using QGIS and ogr2ogr (Not posted in November) – 173
Great Circle Flight Lines in Postgis – 171
London Bus Route Maps – 154
Centroid Within Selection in QGIS – 114
QGIS Inverse Shapeburst Fills – 109

Referrals:

Reddit.com: 747
OSGeo.org: 381
Twitter: 122
GIS.StackExchange.com: 71
Facebook: 70
Flickr: 15

Top SubReddits:

/r/glasgow: 200
/r/scotland: 120
/r/london: 46
/r/gis: 19
/r/QGIS: 4

Thanks for visiting.

Categories
All Mapvember OSGEO PostGIS Scotland

Population of Scotland Mapped

An updated version can be found at: Every Person in Scotland on the Map

One random point on the map for each person within a postcode in Scotland.

Workflow:
OS Code-Point Open points.
>
Voronoi polygons from the postcodes.
>
Join 2011 Scottish Census postcode population counts to Voronoi polygons.
>
Clip the resulting polygons to the Scottish coastline (using PostGIS for time saving).
>
Intersect the lakes out of the resulting polygons.
>
Random point in polygon into the postcode Voronoi polygons (minus lakes), using the census counts.
>
Output:

Population of Scotland Mapped

An easier approach would have been to use the NRS supplied postcode areas for Scotland mentioned in previous posts. A better display of this data would be through a web mapping environment, which is working on my home environment but lacking hosting.

Categories
All Mapvember OSGEO QGIS Scotland

Scotland Azimuth Orthographic Projection

Thanks to the excellent tutorial by Hamish Campbell at: http://polemic.nz/2014/11/21/nz-azimuth-orthographic/

Quick Scotland centric view of the world.

QGIS Azimuth Orthographic Projections

Categories
All Mapvember Scotland

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

Categories
All Mapvember Scotland

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.

Categories
All Mapvember Scotland

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

Categories
All Mapvember Scotland

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

Categories
All Mapvember Scotland

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.

Categories
All Mapvember OSGEO QGIS Scotland

Glasgow CAG High Density Areas

Example of the new multiple overview feature in QGIS 2.6. Point displacement, but not amazing with the zoom levels and number of points used.

Primarily looking at spacing and composition in QGIS.

Glasgow CAG