Australian region boundaries in Tableau

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.

LGAs

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:

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.

About Alan Eldridge

Hi. I'm Alan. By day I manage the APAC sales engineering team for Snowflake Computing. By night, I'm a caped crusader. Or sleeping. Most often it's sleeping.
This entry was posted in Maps. Bookmark the permalink.

66 Responses to Australian region boundaries in Tableau

  1. Amy says:

    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.

  2. Damian says:

    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.

  3. Paulglad says:

    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.
    Thank you

    • Hi Paul,

      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.

      Cheers,
      Alan

  4. 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.

    Yay!

  5. 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:
    https://blog.databender.net/2015/01/09/australian-lgas-updated-in-8-3-1/

  6. Sapna Mason says:

    Hi Alan, do you have medicare local boundaries mapped out by any chance?!

  7. Pingback: MGRS Coordinates in Tableau | The Last Data Bender

  8. Chale Dodge says:

    Hi Alan,

    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?

    http://www.health.gov.au/internet/main/publishing.nsf/Content/phn-boundaries#dig

  9. cdodge2014 says:

    Hi Alan,

    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?

    Regards
    Chale

  10. cdodge2014 says:

    HI Alan,

    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?

    Regards
    Chale

  11. cdodge2014 says:

    Hi Alan,

    All good – managed to figure it out!

    We added this into the same data source and it works!

    Regards
    Chale

  12. Jagjit says:

    Thanks Alan. What if I need only the suburbs in NSW as there are certain suburbs like Ashfield in 3 states.

    • Hi Jagjit,

      The first character of the SSC code is the state indicator so simply create a calculation:

      LEFT(STR([SSC Code]),1)

      and filter that for the value 1 which corresponds to NSW.

      Cheers,
      Alan

  13. Andy Carroll says:

    Hi Alan,

    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?

    Many thanks

    Andy

    • Hi Andy,

      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:

      https://www.dropbox.com/s/530mo6d3jh3vf23/SA3%20%40%202.5Km.tde?dl=0

      Hope this helps,
      Alan

      • Andy Carroll says:

        Hi Alan,

        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.

        Many thanks

        Andy

    • Jagjit Singh says:

      Hi Alan,

      Apologies for my ignorance but could you please explain how these SA3, SA4 files differ?

      Regards,
      Jag

      • 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.

  14. Sian says:

    Hi Alan,
    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.
    Sian

    • Hi Sian,

      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:
      https://www.dropbox.com/s/jogk3lbo1nwogd3/Using%20Polygons.mp4?dl=0

      Hope this helps.

      Cheers,
      Alan

      • Sian says:

        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

  15. Geoff says:

    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!

    Thanks,

    Geoff

    • Hi Geoff,

      Glad the post was useful. You can download the files from the ASGS link in the post:
      https://www.dropbox.com/sh/sy7on4byb6546ui/AAA7YJaUpRYqB-sx2MHpksqka?dl=0

      Cheers,
      Alan

      • Jay says:

        Hi Alan,

        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.

        Thanks,

        Jay

      • 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.

        Cheers,
        Alan

      • 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:
        https://www.dropbox.com/s/olauhin20365xc9/SA2%20%40%20200m.tde?dl=0

        Here is an example workbook:
        https://www.dropbox.com/s/gyzxjrpi8fbbife/SA2%20Demo.twbx?dl=0

        This might also help in your case.

        Cheers,
        Alan

      • Jay says:

        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.

        Thanks again,

        Jay

  16. Pingback: Updated ABS boundaries for 2016 | The Last Data Bender

  17. Steven says:

    Hi Alan
    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.
    Regards
    Steve

    • Hi Steve,

      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:
      http://www.abs.gov.au/ausstats/abs@.nsf/0/2C6132C0B332C336CA2578D40012CF76?opendocument

      Hope this helps.

      Cheers,
      Alan

      • Steven Wright says:

        Hi Alan
        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.
        Steve

      • 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:
        https://blog.databender.net/2014/08/05/labels-on-custom-polygons/

        Hope this helps.

        Cheers,
        Alan

      • Steven Wright says:

        Hi Alan
        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
        Steve

  18. AndyRK says:

    Thanks so much Alan! Massive help.

  19. Craig Mackinlay says:

    HI Alan- I need to do the above for NZ-how would I do this?

  20. So goddam glad I came across this

  21. Sean Marshall says:

    Hi Alan,

    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,

    Sean

  22. Lydia Russell says:

    Hi Alan,
    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

  23. Abhilash Nair says:

    Hi Alan,

    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.
    Cheers

  24. Anna says:

    Hi Alan,
    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 🙂
    Thanks,
    Anna

  25. Hilary says:

    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!!

  26. Hilary says:

    Hi Alan,

    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?
    Thank you!!

    • Hilary says:

      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.

      Thank you!!

      • 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.

        Cheers,
        Alan

  27. Raji says:

    Hi Alan,

    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.

      Cheers,
      Alan

  28. Lisa says:

    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.

      • Lisa says:

        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?

  29. 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.

    Cheers,
    Alan

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s