# How to Make Tile Grid Maps in Tableau

13 Nov, 2015

Note: This is a guest post by Tableau enthusiast Brittany Fong.

Recently at work, my colleagues and I were introduced to a new map type that one of our users saw on FiveThirtyEight—tile grid maps! I quickly searched Google images to see what she was talking about. Immediately we knew this was possible in Tableau, and I'm excited to share the steps.

We agreed that this map was useful because:

• You could easily see all of the states (Alaska, Hawaii, and the small northeastern states).
• All the states were the same size, so Texas doesn't seemingly have more emphasis than Rhode Island.

The idea is pretty simple. I broke the map into a grid and created a template in Excel. After creating the template, I connected to the data in Tableau and:

1. Put "rows" onto rows.
2. Put "space" onto columns.
3. Put "state" onto the level of detail.
4. Created a random calc for dummy data and put it on color (optional: change colors and add a border).
5. Optional: To add space between the squares, create a "one" calculation where the calculation contains 1. Drag up to dimensions and add to size. Adjust the size to get the preferred amount of white space.
6. After that, I just had to adjust the cell sizes and format the text.

### Then the Question Was: How Do I Get Actual Data onto the Map?

The first idea that came to mind would be to pre-aggregate each state and just add it to the Excel template. However, in many cases, that is not possible.

To get actual data on the map from a different data source, I blended my map template in Excel with the superstore data (which ships with Tableau). Both data sources must have a matching state field. Depending on your fields, you may need to adjust the relationships. Here are the steps:

1. From the superstore data, put state onto detail and remove the generated latitude and longitude from the rows and columns.
2. From the dummy example, I followed steps 1 and 2 (put "rows" to rows and "space" to columns).
3. Instead of adding the random calculation to color, add the superstore measure that you want to measure to color.
4. Follow the rest of the steps from the dummy example.

And here’s my tile grid map made in Tableau (click to interact):

Want to go one step further? Check out Matt Chambers's guide on creating hex tile maps in Tableau.

For more works by Brittany, visit her Tableau Public page and her blog, bfongdata.com.

## Commentaires

Submitted by Steve S. on

This is such a great idea!

Submitted by Mark Gandy (non vérifié) on

Absolutely brilliant - thanks for sharing!

Submitted by Roberto R. (non vérifié) on

Cool trick. Can you share the Excel template? I can't figure out in my head how it's structured.

Submitted by Gina (non vérifié) on

Submitted by Gina (non vérifié) on

Roberto,
If helpful this is how the Excel template is structured. The grid in Excel has 8 rows. Each "space" is a number for the place or cell in Excel that corresponds to each row. For example, Row 1, space 11 is the equivalent position of the state of Maine, on the actual map. Florida is the last state on the map, for which the row is 8 and the space is 9. Hope that helps.

Submitted by Gina (non vérifié) on

I had to manually move the state and values into the marker box one by one. This was tedious and time-consuming. Is there a quicker way to position all marker labels within their respective boxes all at once?

Submitted by msa s. on

please suggest how to did you related the superstore data to dummy data. What column did you put in common