Tableau Tutorial: Creating Choropleth Map
In this article, we are going to create a different type of Choropleth map which has become very popular nowadays. Various organizations especially the one into data journalism such as FiveThirtyEight, Bloomberg, The Guardian, The Washington Post and The New York Times has used it heavily off late. One such example from FiveThirtyEight is shown below.
In this blog, we are going to create a square Choropleth map as shown above.
As per Wikipedia definition of Choropleth map; “A choropleth map is a thematic map in which areas are shaded or patterned in proportion to the measurement of the statistical variable being displayed on the map, such as population density or per-capita income. The choropleth map provides an easy way to visualize how a measurement varies across a geographic area or it shows the level of variability within a region.”
This article from NPR visuals team provides a very good explanation of different type of Choropleth maps such as geographic, square and hexagon maps along with their pros and cons and is a very informative article to understand the thought process behind the emergence of this new type of Choropleth map.
Below is an image from the same article mentioned above which depicts the three different types of Choropleth map visualizing the same underlying data. In Square or Hexagon tile grid map every state (of USA in this case) gets the equal share of real estate irrespective of their geographical boundaries or shape as opposed to geographic choropleth map.
This exercise requires data preparation as this type of chart is not readily available in Tableau. To come up with square choropleth map with equal weightage given to each state of USA we need to establish their co-ordinates to be plotted on the visualization. For this we need to assign the row number and column number to each state of USA with Alaska getting row and column number as 1 and Hawaii getting row number as 8 and column number as 1, so on and so forth.
Let us have a look at the dimensions and measures that needs to be prepared in order to create this visualization.
|State Name||Default Size|
Row and Column determines where a particular state is to be positioned on the visualization. Profit is a random metric that we will visualize on the map. Default size will be used to create equally sized square shape for each of the state of USA.
This article has been referenced in order to create square grid tile map in this blog post.
Data Exploration & Visualization
Step 1 – Connect to the data.
This is the preview of the data source that we have connected to. As can be seen all the dimensions and measures that we described in the above section are available in the data source.
Step 2 – Go to Sheet 1 and analyse/review the loaded data.
Step 3 – Place Row on Row shelf
Step 4 – Place Column on column shelf
Step 5 – Put State Name or State Abbreviation on Detail Shelf
Step 6 – Put Default Size on Size shelf
Step 7 – Change the Marks type to Square
Step 8 – Reverse the scale of axis representing Row
Step 9 – Increase the Size of the Square marks appropriately
Step 10 – Choose to hide the header for both the axes
Step 11 – Put State abbreviation on Labels shelf with vertical centre alignment
Step 12 – Choose to hide grid lines
Step 13 – Put Profit on Colour shelf
Step 14 – Give final touches
And our Square Choropleth map is ready as shown above. If you want to go further down this lane then here is the article to create hex tile grid map in Tableau for your reference.
That is it for this time; stay tuned for more learning with Tableau.
One can visit the official Tableau website to find more details about Tableau and its product offering and features.