Edited 8 Aug 2016 – see this update about new files covering the 2016 ASGS update.
I regularly get asked if Tableau can show filled areas on maps – e.g. post code boundaries, local government areas, statistical or census areas, etc.
As you can see the answer is yes but you need to do a little pre-processing of the data to get it into a readable format. Fortunately I have already done this for the regions defined by the Australian Bureau of Statistics and can share the resulting extract files with you:
- Boundaries from the ASGS (the spatial standard used by the ABS since 2011).
- Boundaries from the ASGC (the spatial standard used from 1984-2011).
I’ve included both vertex and centroid points in the TDE files – you can use this to display polygons, points, both or even to put labels on the shapes. The techniques to do this are shown in this video I recorded that demonstrates how to use the data.
Note that these data sets can be very large (over a million data points) if you are plotting the entire continent so you will see best performance if you are using a 64-bit version of Tableau Desktop.
Thanks Alan, this has just allowed me to make more progress in 10 minutes than I’ve made in 6 months. Really valuable. Many thanks.
I agree, this post and the related video have been really helpful!
I am having some issues with the SA4 mapping though. It is drawing the map with the points that make up the polygon and doesn’t seem to be connecting the dots. Can you help with that or is it just as a result of my lack of experience with using polygons? I have tried applying the clean up tips from the video but to no avail.
Thanks Alan. The “using polygon” video is very helpful. Would the full length version be available please? It cuts off just at the critical part where im trying to centre the labels.
Dropbox will only stream the first 15 mins of the video – to watch the entire clip please download the file locally. The resulting MP4 file is a little over 20 mins long.
Just an update on this post… this technique is no longer required for postal area (POA) or local government area (LGA) boundaries. These were added as native filled maps in 8.2.1 and 8.2.2 respectively so custom polygons are no longer necessary.
A further update on this – the LGA data has been updated to the 2014 specification as of 8.3.1. See here for more details:
Hi Alan, do you have medicare local boundaries mapped out by any chance?!
Yes – you can download it here: https://www.dropbox.com/s/du42o2kjmey7b35/Medicare%20Locals.tde?dl=0
Ah, you’re amazing Alan, thank you!!
Do you know where I can get the co-ordinates to plot the indigenous areas and regions of Australia?
Sorry for the slow reply – I was on vacation.
The coordinates you need are in the ASGS dropbox link in this article. ILOC is Indigenous Locations and IARE is Indigenous Areas.
Hope this helps,
Pingback: MGRS Coordinates in Tableau | The Last Data Bender
Thanks for all of the above – including the Medicare Local Tableau Data Extract.
Don’t suppose you have looked at the Primary Health Network Shape Files yet, and been able to convert that to a Tableau Data Extract?
You can download the PHN boundary TDE from here:
Nice work – following your video and using the TDE, I was able to create a beautiful boundary for our Medicare Local – thanks!
Just curious, is it possible to get one please for the New South Wales Local Health Districts?
thanks Alan for both of those! you are a very smart man 🙂
do I owe you anything?
I am trying to blend the data with our own data.
I have created a new field in SQL that is called ML Name – as an example, and it includes the value of our ML – Eastern Sydney. The SQL is ‘Eastern Sydney’ :: TEXT AS ML Name.
I have tried matching the relationship to ML Name, as a reference, and same as the video, yet when I go to map them, using the Post Code, it won’t allow me to put more than one Longtitude onto the map.
Is there any guidance available about this?
All good – managed to figure it out!
We added this into the same data source and it works!
Thanks Alan. What if I need only the suburbs in NSW as there are certain suburbs like Ashfield in 3 states.
The first character of the SSC code is the state indicator so simply create a calculation:
and filter that for the value 1 which corresponds to NSW.
I’m trying to use the SA3 districts for a project, so stumbled across your data which is a huge help! I’m using the SA3_2011.tde file, and the only issue I have is that due to the number of data points in that file once I overlay my data it ends up causing out of memory errors in Tableau.
Am I using the correct file? And is there a way to cut down the number of data points if all I want is the boundaries & names of the SA3 districts?
Yep – some of these files are quite large. E.g. the SA3 data is ~750K data points. Blending across these sets can result in lots of memory use.
If your analysis allows I’d suggest using a filter to reduce the number of points we need to draw at any particular time – e.g. can you show one state at a time?
Alternately, I’ve created a lower resolution extract file. Normally I create them with a generalisation of 100m but by changing that to 250m it has reduced the number of data points to ~90K. This might work better for you. You can get it here:
Hope this helps,
That made a huge difference thank you so much!! Is it also possible to do the same at SA4 level? I’m thinking SA4 might be discrete enough for my purposes, as the SA3 tends to split out the highly populated areas into quite a granular level for my needs.
Here are the SA3 and SA4 files @ 250m resolution (changed the link above…):
Apologies for my ignorance but could you please explain how these SA3, SA4 files differ?
These have a lower resolution that the original files I posted. The original files were done at 100m resolution while these are at 250m resolution. This means there are less data points so they are smaller and faster but the side effect is that the polygons are less accurate.
I am trying to figure out how to apply demographic data to each Federal Electorate in QLD. I have sourced a polygon map already so the borderlines are ready to go, however, I want to apply the data to each individual area. How do I make that relationship? Thank you so much.
If you mean the built-in demographic data in the map layers dialog, then this information isn’t available for Australia in the current release. Maybe one day… If you mean that you have some demographic data in another data source, then you would use blending to bring the demographic data and the spatial data together. See the video I have linked at the bottom of this blog post:
Hope this helps.
Hi Alan – yes I meant blending, sorry I wasn’t overly clear. I had already watched that video link, but I think the problem may be in how I’m setting up the data in the first place. It’s ABS data which is quite extensive for each electorate as you would know. However, Noor has been really helpful and put me in touch with David and we are having a Skype call tomorrow to figure out where I’m going wrong but he seemed to agree it was how my data was set up. Thank you so much for your quick response! Sian
Hi Alan, great post. I downloaded and watched the video and wondered if i could receive a copy of the SSC and SA2 overlay files? Thanks in advance for whatever you can provide!
Glad the post was useful. You can download the files from the ASGS link in the post:
Thanks for all your maps you have provided to the community.
I’m using the SA2 Map with the the SA2 Census population data. If I create a simple view with no calcs over all of Australia Is it unusal that it takes 5+ mins for a view to load? When I upload it into Tableau server its still taking over 30 secs to make any changes with the quick filters.
Hi Jay – this is a very large dataset (almost 1.1M data points) so if you are trying to show all of Australia at once then you can expect it to be somewhat slow to render. Especially if you are blending this with another dataset for your analytic data. Running a performance recording will give you some pointers to where the slowdown is.
Also, blending with a dataset of this size can be very RAM intensive so I suggest you make sure you aren’t running into memory constraints.
Overall, I’d recommend that you try to limit the volume of data you are rendering – have some filters at the state/SA3/SA4 level to reduce the number of polygons being rendered.
Hope this helps.
Additionally, if you are prepared to trade some fidelity in the polygon boundary for performance, we can work with a lower resolution dataset. Here is an example with SA2 at a 200m resolution – it has only 186K data points instead of 1.1M. It should run faster.
Here is the TDE data source:
Here is an example workbook:
This might also help in your case.
Thats great Alan!
The loading time for the new extract at 200m improved the time from 5 mins to 30 sec in desktop and from 30sec to 7sec in server.
Pingback: Updated ABS boundaries for 2016 | The Last Data Bender
I recently attended a Tableau course and as a result found your website. I would like to display localities (suburbs). If I use postcode it doesn’t assist me as several localities share the same postcode. Can you advise me which of the files incorporates localities. The work I am doing is mainly Western Australia so I wont be displaying all of Australia as such.
The role you want is “state suburbs” and the files are prefixed with SSC in the dropbox folder. I have made 10m, 100m and 200m resolution files available.
You can read about the details of SSC here to determine if it meets your criteria:
Hope this helps.
Thanks, thats exactly what I was after. All I need to do now is work out how to display the name of the suburb on the map. On another question related to suburbs if I wanted to assign a number of suburbs to a district (we have a number of suburbs each assigned to one of 4 metropolitan district names) is this possible some how as I think our district boundaries are internal ones and nothing to do with Landgate etc.
Hi Steve, glad to hear you have got things working. As far as displaying the name of the suburb on the map, this can add a lot of clutter so often it’s better to keep information like that in the tooltip where it can be shown on demand. If you *must* have the label on the map, check out this post from my blog:
Hope this helps.
I worked out the districts, i added in one of our reference tables which has suburb relationship to district then joined it to the SSC data source and all looks good
Thanks so much Alan! Massive help.
HI Alan- I need to do the above for NZ-how would I do this?
I have some of the NZ statistical boundaries available here:
It’s been a while since I looked at them so they may not be the most current data available, but you are welcome to use them. One obvious omission from this list is postal areas. Unfortunately this is commercially licensed information in NZ (https://www.nzpost.co.nz/business/direct-marketing/direct-marketing-products-services/quality-addressing/postcode-network-file) but if you do purchase a license for it I’m happy to help you convert it.
Finally, I also point out that the polygon techniques I’ve documented in this (and other) blog posts will soon be obsolete as we are planning to release native shapefile support early in 2017. This is still valid today, but soon everyone who uses custom regions in Tableau will find their analysis much, much easier.
So goddam glad I came across this
Just wanted to let you know this was a huge help and I really appreciate all the work you put into this. The video was extremely helpful and clear and the files provided worked perfectly.
Thank you very much,
How do I create a map in Tableau of Western Australia. I need to plot a majority of suburbs so we can see where our clients are coming from. Any help would be appreciated. Thanks Lydia
If you are trying to plot using the suburb name as the location identifier then you’ll need the suburb boundary data. This is available from the ABS at the following link:
This is the shapefile for the State Suburb Code – you can unzip this and use the .shp file in Tableau to plot the outlines or the centroids of the states. Filter this to the state code for WA and you have what you need. You can then join this data source to your analytic data source and colour code the suburbs by count of customer, or put a sized mark in the center of the suburb to show the same.
Hope this helps.
The content you have provide access to is wonderful. However, I had a quick question regarding the data blending bit that you have mentioned in your video.
– Is there a method for me to use the shape files and be able to count distinct measures from my analytic data source?. As far as i understand the concept data blending does not allow for count distinct, median and so on.
– Also, when blending i notice that the primary and secondary source is key as the link generated is basically a left join link. would that render my dimensions in secondary data useless?
Appreciate your help.
If you are using Tableau 10.2 or later this technique is no longer applicable as we support shape files natively. See here:
Taking advantage of this you no longer need to blend – you can do a cross-database join to the spatial file. This takes care of all the level of detail problems with the old technique and allows you to do distinct counts and all that other good stuff!
Hope this clarifies.
Thanks for all the great TDEs for geography, they make mapping government data so much easier! I was wondering if you could repost the link for the Medicare Locals mapping that you shared in response to Sapna’s comment above? It appears the link no longer works. I am mapping National Health Survey data and trying to align it to other population datasets – it would be a great help to have the ML map file as I could then overlay ML and postcode data on the same map 🙂
Here is the link to the Medicare Locals TDE I had created previously:
Note that using this TDE data structure is no longer recommended as Tableau now has native support for shapefiles, but I can’t find a shapefile for Medicare Locals anywhere (my Google-fu is weak!) These seem to have been replaced by Public Health Networks (PHNs) – and boundary shapefiles for these can be found here:
Hope this helps,
Hi Alan, I am trying to map disease rates by SA3 areas. Your box files appear to have been removed. Is there an easy way to convert these area so that Tableau recognizes them? Thanks!!
If you are using Tableau 10.2 or later this technique is no longer applicable as Tableau supports shape files natively. See here:
I strongly advise you to upgrade and use the shape file support as this is much simpler to use and renders workbooks much more quickly. You can also download the SA3 boundary files directly from the ABS’ ASGS website:
Thank you Alan!
I do have Tableau 10.2. I downloaded Australia’s data and attempted to import the .shp file into Tableau, but I am receiving an error that it can’t open the file “Check that the file exists and that you have sufficient access privileges for it.” Have you seen this issue with this data before?
I also can’t seem to open the .shp file itself. Is there a particular app that I must download to view this data?
I actually was able to import the shape file into Tableau successfully! My only issue is that there are certain statistical areas that I would like to map, not all of them in the file. and would like to represent incidence rates in those specific SA3s. Do you know how I would integrate excel and shape files?
Hi Alan, Apologies! I have figured it out. My remaining question is regarding how I can tie an incidence rate to a specific SA3 (which is now tied to the geometry). Tableau doesn’t appear to be reading each of the SA3s as independent entities and when I add the rate to the map, it applies it to the entire country.
Do you have the SA3 ID or name on the level of detail of the viz? That will ensure that the granularity of the data is at the appropriate level.
Do you have the data for Australian regions with Post_codes or states that i can link in excel copy so that i can join to my table and later use in tableau?..
I did check the tableau link for Indigenous region but thats not helpful as my data set is different to join..
Appreciate your help..
Hi Raji – I’m not clear what you are asking for. You don’t need a lookup file for states or postcodes in Australia – Tableau will recognise the column as a geographic role and can automatically map them. This article you are commenting on is very, very old (2014) and is no longer current as the 2016 edit points out.
Hi Alan, have you used the custom geocoding for SA2 shape files?
I am new to Tableau and so please excuse me if doing something silly but I want to use the ABS spatial files a lot and so I thought I should use the custom geocoding feature rather than manually joining the spatial files each time. This does not appear to work. I can provide more details but just wanting to check if you expect this to work and get additional option when you are assigning a Geographical role?
Hi Lisa – this blog post is now out of date. Tableau has native support for shapefiles where the shapes are drawn as a single mark, making the workbooks much simpler and much more performant. In the most recent releases they have also introduced spatial joins (e.g. are these points inside this polygon) which I’m sure would be useful for you. So please disregard this legacy information in this post and use the spatial files directly. It’s a better way to work.
Alan, thank you so much for your quick reply. So, it is best to simply use the spatial files directly and manually with each .twb. The Map>Geocoding>Import Custom Geocoding… doesn’t automate this process for multiple .twbs?
Hi Lisa – no it doesn’t. There are ways to create reusable data sources in Tableau but they require either Tableau Server or Tableau Desktop. The “import custom geocoding” isn’t used for this particular function. So yes, as you said you should just use the shapefiles directly in each workbook.