5 Replies Latest reply on Oct 31, 2017 5:43 AM by Simon Runc

    Filled UK Postcode area map

    Stephen Lavery

      I have a series of UK Postcodes and have stripped out the postcode areas. i.e the first 2 characters of the postcode:



      I think it should be possible, with tableau v10, to map these to create a filled map that would look something like this:



      I know this is possible using this plugin UK Filled Map Geocoding Pack for Tableau - The Information Lab  which is great and I've used before but I'm looking to do it in tableau with no extra add ons if possible.


      I read this article by Kent Marten: Maps in Tableau 9.3: More Data, Easier Interaction, and a Few Surprises, Too | Tableau Software which suggests it should be possible. I've attached the package workbook I'm working on. Any thoughts would be much appreciated!




        • 1. Re: Filled UK Postcode area map
          Simon Runc

          hi Stephen,


          So yes I've used the information lab add-on...really cool!


          So to do this we need to use 2 new Tableau features...postcodes now plotted as Areas, and then the custom-territories to "Group" postcodes into Postcode areas.


          First I create the Post Code - 1 st part (this is what Tableau understands as UK PostCode)


          [Post Code - 1st Part]

          SPLIT([Post Code], ' ',1)


          I then plot these on a map and change to filled map


          Next, I tell Tableau to create custom territories (on Post Code Area), based off this [Post Code - 1st part] field.


          I then switch my level of detail to the Post Code Area...and voila



          Now one thing is that we have some gaps...this is where you don't have that postcode in your data....I would suggest adding to this thread/feedback from Kent Do you want to know what's built-in to the Tableau Geocoding database? as this geo-coding database would form the start on any project of this nature, so all postcodes are in the data and so can be grouped.


          Good question though...I hadn't thought of doing it this way before!

          2 of 2 people found this helpful
          • 2. Re: Filled UK Postcode area map
            Stephen Lavery

            Wow Simon, thank you for such a detailed response! This is exactly what I was looking to do but didn't expect it would take such creativity. Will definitely be adding to Kent's post.


            Have a nice weekend!

            • 3. Re: Filled UK Postcode area map
              Simon Runc

              Yes loving the new features (both area postcodes and custom-territories)...it also dawned on me that we may never need custom-polygon areas again!! - as we can build up higher levels from postcode (1st part) level, and most, if not all, other UK boundaries (Wards, LOA...etc.) can be built up from these...we just need Kent to get the "Tableau geo-code database" released so we can use this as the starting table.


              Kent has also mentioned in one of the next Beta releases there will be the ability to load shapefiles directly!!...so I can (hopefully) retire my Tab Wiki article on doing it the hard way!


              Step By Step Instructions – ShapeFile to Custom Polygons using Open Source GIS (QGIS)

              2 of 2 people found this helpful
              • 4. Re: Filled UK Postcode area map
                Joe Morris

                Sorry to revive an old thread


                Is there a way to use postcodes like this to get filled maps for other countries? If there is I can't figure out what format tableau expects the postcode to be in for any of them..

                • 5. Re: Filled UK Postcode area map
                  Simon Runc

                  hi Joe,


                  So yes you can, if you can find a shape file for those countries at their postcode level (although we can now just directly connect to a shapefile, so no need for the polygon method!)


                  Tableau does have many geographies built in (so we can, for example, just have the post code for the UK and map them as polygon or point...without any need for any shapefiles), but which geographies and at what level will depend on the country (they are expanding the levels and countries every release)...this should be the standard postcode/zip-code format for the country


                  If any of the countries you want to map aren't supported, and you want multiple countries....you'll need to find a shapefile (as post/zip code level) for each of the countries you want, and then combine them into a single shape file....currently we can't union shape-files in Tableau (although I believe this is coming at some point), so you'll need to use something like QGIS [note that you'll need to convert them all to WGS 84 [EPSG:4326], as they may all be in different projections...my post Step By Step Instructions – ShapeFile to Custom Polygons using Open Source GIS (QGIS) shows how to do this)


                  hope that helps, but if you have some specific countries in mind, let me know (probably in a new question thread and ping me) and I can take a look.

                  1 of 1 people found this helpful