1

I have a large amount of data records which have a postcode on them that I'm in the process of trying to visualise on an England map.

The first map view I'm doing is naturally regional view. This is fairly trivial because the ONSPD (Ordnance Survey) postcode data has a Government regional field therefore I can lookup where each postcode belongs.

The issue I'm having is doing the same for the non-metropolitan counties that belong to each region. It seems that the ONSPD data does not seem to have a direct mapping to them. It maps to counties but those counties do not cover the whole of England.

The shapefile I have for the counties looks as such :

England Counties

As you can see, this fills the entire England map and as those of you who have experience with the English county system there are shapefiles for counties that do not cover the whole of England etc.

I tried to contact the Office for National Statistics but they were unhelpful thus far. They simply asked me to have a look at their resources. I explained how I had gone through their website and the different type of county map files. I've also looked at the documentation on the ONSPD but unable to find a county level field which every postcode in England is mapped to. The county mapping they have of the postcodes looks like this :

UK Counties

Not including the Greater London boundaries (it's boroughs) it does not map onto the above linked shapefile.

Hopefully my question has made sense and someone else who has tried to visualise data on a county level for England has had the same issue.

6
  • 1
    Postcodes in England will not match counties. You need Code-Point Opendata ordnancesurvey.co.uk/business-and-government/products/…
    – Mapperz
    Commented Jan 12, 2015 at 16:54
  • Isn't Code-Point opendata the same as the ONSPD? Or is this Code-Point data the same but also has the county information? I seem to remember having this data before (merging all the csv files etc.) After reading it's description and size, it looks like it's just a smaller version of the onspd data.
    – Euphoria
    Commented Jan 13, 2015 at 8:25
  • Further digging (re-import) of the data I did some looking at the county figures. Out of 1,684,995 English postcodes 802,100 do not have a county. This seems to be lesser in quality than ONSPD in terms of county. The data it self is not bad, what's bad is the way England government keeps changing the silly boundaries. I think I may just have to stick with district level boundaries, a little too detailed for my liking but it's all we have. ONSPD postcode data (probably originating from the same place) is practically the same as Codepoint but has a few more postcodes for England (2,134,601).
    – Euphoria
    Commented Jan 13, 2015 at 9:26
  • 1
    Not all of England is in a county
    – Ian Turton
    Commented Jan 13, 2015 at 13:32
  • Correct, so we're stuck with either a hybrid of county/district mapping or to keep it simpler just district level. There is no just county mapping.
    – Euphoria
    Commented Jan 13, 2015 at 14:27

1 Answer 1

-1

You could always get the postal code data from Wikileaks. It is dated now but hey.

https://wikileaks.org/wiki/UK_government_database_of_all_1,841,177_post_codes_together_with_precise_geographic_coordinates_and_other_information,_8_Jul_2009

UK government database of all 1,841,177 UK postcodes together with latitude and longitude, grid references, county, district, ward, NHS codes and regions, Ordnance Survey reference, and date of introduction. The database was last updated on July 8, 2009 and is over 100,000 pages in size.

The database is structured as a plain text file, with each entry taking one line and with distinct fields separated by commas. The very first line specifies the order of the 17 fields of information about each postcode.

I do not endorse the use of leaked data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.