Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Maps - Relationships with 2 files for UK postal code

Hi All I have been fighting with maps for some time trying to get what I thought was a simple heat map to work based on UK postcodes.   After a bit of reading, I found a user who used the Office f...
  • davegwynedd's avatar
    6 years ago

    I've been using the various post code files from National Statistics and there are usually a number of different post code columns in the files. I'm assuming you've transformed the data in some way?

     

    I can see 3 post codes in the NSPL_AUG_2019_UK file - headers: pcd, pcd2 and pcds. We had an issue with using the first two on our datasets but matched pretty well on pcds. Should be the same on the Nov release.

     

    This assumes your post code data is clean - and that it's all in the same format - in this case pcds. If you've got a mixture, then you can always trim and clean the dataset in order to create a pcd version of the post code and link on that:

     

    See some definitions below:

    Three variations of formatting for each postcode are presented:

    • pcd: 7-character version of the postcode (e.g. 'BT1 1AA', 'BT486PL')
    • pcd2: 8-character version of the postcode (e.g. 'BT1  1AA', 'BT48 6PL')
    • pcds: one space between the district and sector-unit part of the postcode (e.g. 'BT1 1AA', 'BT48 6PL') - possibly the most common formatting of postcodes.

    Source: http://data.nicva.org/dataset/ons-postcode-products

     

    Hopefully that's some help, but let me know if you have any problems.