2 Replies Latest reply on Nov 8, 2019 3:08 PM by Don Wise

    How to Geo-Coding UK postal codes to map?

    Sumati Gaur

      Hi Everyone, I am unable to convert post codes for UK to map data points. I tried selecting the outer code by doing left 3 code selection. Not working for me.

      I referred to existing threads for this problem but am still struck on this. Another observation my data is mixed in nature, Outer code digit/char count is varying from 2 to 4(data file attached for better understanding).  Can anyone please guide me how to map the codes?

        • 1. Re: How to Geo-Coding UK postal codes to map?
          Matt Lutton

          Can you post up your sample .TWBX file along with any visual mockups of what you'd like to change/edit from what is already there?  This will make it much easier for volunteers to help assist you.

           

          Happy analyzing!

          • 2. Re: How to Geo-Coding UK postal codes to map?
            Don Wise

            Hi Sumati,

            You can use the following calculation to get most of what you need (not all):

             

            Right-click Postcode and then select Create Calculation.  Do the following and then set the OutCode to be a geographic role of Postcode (click on the ABC icon to change it):

            Screen Shot 2019-11-08 at 3.00.28 PM.png

            Thereafter, create another calculation (might not be needed but I did it to help things along) which is for Country:  simply type  'United Kingdom'  in quotes and you'll have a whole column that's just that.

             

            Then drag both to Marks Card and you'll get the following:

            Screen Shot 2019-11-08 at 3.04.05 PM.png

            Notice in the lower right-hand corner that there are 273 Unknown?  Click on that icon and a dialog box will open.  Those are the codes that Tableau couldn't resolve against its internal DB.  You'd probably need to do some data cleanup to fixe those if at all possible.

            Screen Shot 2019-11-08 at 3.00.10 PM.png

             

            Hope it helps!  10.2 workbook attached.

             

            If this answers your question please mark it as correct so that others may find it in their search for a solution in the future.  Best, Don  How to Mark an answer as Correct

             

            We would love to hear your feedback on your Tableau Community Forums experience.

            Please take this 5 minute survey.

             

                Tableau Community Forums | Customer Experience Survey