After my last post on the ONS data structure this post is the first of a few on using that structure and some other public data, mostly UK government data, and mapping it using R. This first post is about getting shapefiles from various locations, loading them into R and plotting them.
Tag: ONS
ONS Data Structure
I have been looking through the ONS geographic data on their Geo Portal and there are acronyms and variables everywhere so I thought it best to understand what they all mean. Whenever I refer to the output areas and super output areas I’m referring to the ones as at the 2011 census in England and Wales.
Creating a postcode file in R from different public data sources
Following on from my previous post on creating a postcode file with the 2015 general election results I wanted to create a larger file with more variables. Some from the ONS lookups, others from different public datasets. The one I have added so far is the Office of Communications Broadband Coverage dataset from 2013.
The final dataset will contain for each postcode in the UK:
- The 2015 general election result
- The Westminster Election Constituency
- The Easting and Northing coordinates
- Census lookup areas
- Rural Indicator
- Broadband coverage data
- Which (if any) national park the postcode is in