Can you use the standard zip/postcode mapping which is in the latest Tableau versions? If you use this then you can use the other default geocode options in Tableau.
1 of 1 people found this helpful
Yes they don't, so you have to go to your tableau repository and remove that file you had copied over in the instructions from the link.
You'll need to revert back to the original Tableau geo options, there you'll find the zip/post code option. I would suggest using that because that option gives you a filled map option for the area part of the postcode.
The issue is, if I remove it, the dashboards I've created already wont work.
That's why I was thinking, could I just create my own country/longitude and latitude dataset and drop alongside Information Labs UK data. im not sure how to go about oding that though
Yes that's right, you either have one or the other. To turn off the Info Lab version, just go to your Tableau repository where you'll find a folder called 'Local Data'. Change the name of this folder (I use the OFF affix)
btw when you remove the affix Tableau will pick up the Craig's version again.
Now when you re-open Tableau you'll be back to the "out the box" options. In the later versions of Tableau (from memory around 10.5+) the Post Code field can now be plotted on a filled map. However the Post Code for the UK is only mapped to the Inner Part (MK43 2BT).
Certainly worth trying the default geocoding and seeing if all the countries you need have geocoding to this level. Custom GeoCoding PostCode level for the world (either using custom geocoding or bringing in shapefiles) would be unworkable (just too much data).
thanks for this.
But because I need to do both in the same workbook (UK map with post codes filled out) and then a separate Global map with the countries filled in, im not sure that this will work.
I need to have both working in the same workbook, which sounds like I need to create another dataset to drop into Local Data. I can get the long/lat values, but the multipoloygon data for countries, any idea ?
1 of 1 people found this helpful
So it is (just about) possible to do this using the built in GeoCoding. If you look at the attached I created a parmaeter to select which country you want at postcode level (btw this won't work for all selections as not all countries have built in post/zip level)
I then created 2 fields for country
[Country - Country]
if [Country / Region] <> [Show PostCode Level] then [Country / Region] end
[Country - PostCode]
if [Country / Region] = [Show PostCode Level] then [Country / Region] end
I then make both of these the country level.
Then on the map on one axis I bring in the PostCode and the [Country - PostCode] field. As Tableau will use this field to workout the country for the postcode (it's using both fields) it can only plot for the selected country...all other countries are null
on the other axis I bring on the [Country - Country] field. Again it doesn't contain the country we're plotting the postcodes for so the country is omitted.
With regards creating the geographies yourself...you can get postcode boundary maps from the ONS (for the UK) and a quick google search should give some country boundary files. You'd then (probably...there are a few ways), essentially, union them together (in something like QGIS, or GeoPanda's in Python)...could get quite involved so if the attached method works, I'd go with that.
Hope that helps.
Edit: Just read your response more carefully and sounds like you need them in the same workbook, not the same worksheet! So if you can live with PostCode filled to Inner PostCode Level, then you can just use the built in one. If you do need it to Full Post Code then I'd opt for using Craig's custom version for that, and then bring in a shapefile for countries (not tried this, but this is one that came up in a google search https://www.naturalearthdata.com/downloads/50m-cultural-vectors/50m-admin-0-countries-2/ ).