Apr
24
2016

Isolating US MAP into Individual Geographic States

This article explains how to Isolate US MAP into individual Geographic states Elements in Tableau.

Theory/Information:

Tableau is designed to make the most of geographical data, so you can get to the “where” as well as the “why.” With built-in Tableau integration, using maps couldn't be easier! Occasionally, however, we want to get creative and display more information within the map. Now, this is obviously just for visual flavor, as the end user would see in multiple other areas the selected metric, but the technique is a nifty trick with many different applications.

Step 1:

Create four calculated Field and Perimeter (as per below image) which will allow user to select desired no of Rows and columns.

ROW VALUE

if (INDEX()/[Column Selection])= Int(INDEX()/[Column Selection])

THEN (INDEX()/[Column Selection])

ELSEIF  (INDEX()/[Column Selection])<0 THEN Int(INDEX()/[Column Selection])

ELSE Int(INDEX()/[Column Selection]+1) END

COLUMN VALUE

IIF(INDEX()% [Column Selection]=0,[Column Selection],INDEX()% [Column Selection])

COL DIV 5

Min(5)

COL DIV 2

MIN(-1)

1

Step 2:

Put “Column value” and “Row Value” on the Column and Row Marks shelf respectively. Once this is done, put “States” on Filter Shelf and Select “All”.

2

Step 3:

Right Click on “Column Selection” parameter and select “Show Parameter Control”.

3

Step 4:

Put “COL DIV 5” and “COL DIV2” in the column shelf as well. Now Uncheck “Show Header” option of every dimension and Measures.

4

Step 5:

Now put “States” into the detail marks of “COL DIV 5” section and another time put “States” into the Label marks of “COL DIV 2”.Once this is done,

5

Step 6:

Then Change the default marks of “COL DIV 5” from “Automatic” to “Filled Map” and in case of “COL DIV 2”, Change the default marks from “Automatic” toTEXT

6

Step 7:

Now Right click on “Column value” and do [Compute using “States”]. Do the same step from “Row Value”. Tableau is smart enough to retain the shape of the geographic data.

7

Step 8:

Change the Worksheet background color to black and worksheet font to either white or yellow.

8

Step 9:

Drag Sales into the color marks of "Filled map" section and then Increase the Size of the Filled map.

9

Step 10:

Right click on the sheet, select format and do the following steps as mentioned below.

  • Go the Format Lines and Change the Zero Lines from Dot to None.

           10

  • (Optional step )Go to the Format border and Change the Row Divider and Column Divider value to None. 

            11  

  • Go to the "Columns section" of the Format Border and make the LEVEL Adjustment .Do the same for "Rows Section" as well.

            12

  • Just increase the Cell Size of the view as per your convenience.You can also change the “Column Selection“ Parameter value which will give you exact of columns.

         13

 The final output will be:

14

Bonus Tips and Tricks:

Step 1:

Create two calculated Field named as X and Y.

15

Step 2:

Put “X” in Row and “Y” in Column.

Step 3:

Put States in the Detail shelf of the mark card and do the Compute Using by States for the “X” and “Y”.

16

The Final output will be:

17

You can put another map inside the circle or any kind of chart like Line /Bar etc. Use Dashboard Action and see the magic.

*Double clck to see the Gif effect

Map

 

 

Related Posts

About the Author: Rajeev Pandey

I’m Rajeev, Tableau Ambassador, Tableau featured Author,Pro Tableau Tech Reviewer, Data Evangelist from Hyderabad, India. I am a multidisciplinary designer working in data visualization, interaction design and innovation. Expertised in developing Tableau , Web focus based visualization and reporting applications.I am quick learner who can absorb new ideas and can communicate clearly and effectively.I love creativity and enjoy experimenting with various technologies.

2 Comments+ Add Comment

  • Isolating US MAP into Individual Geographic States.i can't understand  Bonus Tips and Tricks: how to get final output

  • This is just another way of representing the US map. I just wrapped US states into circular fashion

Leave a comment

You must be logged into post a comment.