How To: Small Multiple Tile Map in Tableau

5/10/2016 Matt Chambers 10 Comments



I recently saw an article posted by Alberto Cairo where someone had built a map of Scotland using tile maps built of Sankey diagrams.  I thought it was pretty cool, so I wanted to be able to do something similar in Tableau.

Since I have built hex maps before, and Brittany Fong had built tile maps, I already had an idea of how to do this.  Let's take a look at how this is done.

Step 1: The first thing we need to do is build an area chart where we have some data segmented by state and time.  In this case, we are using percentages of votes for Democrats and Republicans in presidential elections.


Step 2: We need another data source to blend with so that we can get the layout for the tiles.  I downloaded Brittany Fong's template file.  Connect to the data source and make sure that your data set can blend on State or Abbreviation.



Step 3: Drag to the Column to Columns, Row to Rows, and move the State to detail.


Step 4: Now we need to label the tiles.  To do this, we need to create a secondary axis. Create a calculated field called "Offset" and give it a value of .025


Step 5: Drag offset onto the rows, enable dual axis, and synchronize the axes.  Set the mark as a line and reduce the color transparency to 0%.


Step 6: Now that we have a line to add our label to, we need to create the calculation to display the abbreviated state name on the tile.  We need to pull in the abbreviation from the secondary data source.  Create the following calculated field:


Step 7: Change the date on the columns to discrete (blue pill).  This allows the columns to have the proper width and looks nicer overall.  Drag the Abbreviation calculation to the label of the offset line and make sure it is calculating using your date.


Step 8: Hide the headers and remove all borders.  Drag the worksheet into your dashboard and size appropriately.  I added a blank space above the map that is 135 pixels to get the dimensions I liked.


That's it!  Hopefully this will help others build this type of viz.  Feel free to download the workbook or comment with any questions.

10 comments:

  1. This is awesome. Super innovative visualization type, and a great tutorial to go along with it. Thanks for showing us something new and effective, Matt!

    ReplyDelete
    Replies
    1. Thanks Ben! I love giving back whenever I can.

      Delete
  2. Cool small multiple tile map. Thanks Matt for the how-to tutorial

    ReplyDelete
    Replies
    1. Thanks Ramon! I'm excited to see how others apply it.

      Delete
  3. Love this and the tutorial and cited it in my most recent newsletter. I've been seeing WAY too many tile maps (and most of them do a horrible job conveying electoral data) but this one is terrific.

    ReplyDelete
    Replies
    1. Thanks Steve! I'd be interested to see if there were any practical applications for survey data as well.

      Delete
  4. There are in fact some possible survey data applications, but most of the examples I've come across haven't been looking at things by state.

    ReplyDelete
  5. This is a followup post to Matt's excellent blog. It adds spices to small multiples.
    http://vizdiff.blogspot.com/2016/05/adding-visual-tooltips-to-small.html

    ReplyDelete
    Replies
    1. In that Alberto Cairo article, he wished the main map to be bigger. The main map is always limited by the size of the canvas or the publication. Enlarging the tiles one at a time is another way to viewing more details.

      Delete
  6. Our clients are small businesses trying to make their way in this crazy messed up world. We’re trying to give them a leg up in the online space and would love to find out if there are any opportunities for us to begin building a working relationship.


    http://www.pavetile.com.au

    ReplyDelete