Last week I saw this visualisation tweeted by the World Economic Forum whilst scrolling through my Twitter feed:
There were a few things about this viz that bothered me:
- A tree map is usually used to show parts to whole but in this case it’s unclear what the whole is. Only selected cities are included in the viz and this certainly doesn’t cover all of the prime property floor space in the cities featured.
- I instinctively looked to the top left of the chart to view the most expensive cities given the title. However, in this chart the most expensive cities are actually shown in the top right-hand corner. Furthermore, the rectangles aren’t ordered in a logical manner (Dubai appears below Istanbul yet $1 million purchases more square-metres in Dubai than it does in Istanbul). This is confusing for me and as a result it took me longer to find the information I was looking for.
- The viz explores how much $1 million US dollars could buy around the world, yet the sizes are quoted in metres squared. Given the US don’t use the metric system and measure size in feet I find this slightly odd.
What exactly are treemaps?
According to Andy Kirk;
A treemap is an enclosure diagram providing a hierarchical display to show how the quantities of different constituent parts make up a whole. It uses a contained rectangular layout (often termed ‘squarified’) representing the 100% total divided into proportionally sized rectangular tiles for each categorical part. Colour can be used represent an additional quantitative measure, such as an indication of amount of change over a time period. The absolute positioning and dimension of each rectangle is organised by an underlying tiling algorithm to optimise the overall space usage and to cluster related categories into larger rectangle-grouped containers. Treemaps are most commonly used, and of most value, when there are many parts to the whole but they are only valid if the constituent units are legitimately part of the same ‘whole’. ~ Andy Kirk – The Chartmaker Directory
While the placement of the rectangles isn’t explicitly referenced in this definition it certainly confirms a treemap wasn’t the optimal chart choice for this dataset.
Personally I’m not a huge fan of treemaps, They have their use cases but more often than not I believe data could be visualised more effectively using a bar chart. In a bar chart the length of the bars can quickly be compared to draw insights. In a treemap it is far more difficult to compare different sized rectangles which aren’t necessarily placed side-by-side and draw conclusions on which are bigger/smaller, etc.
Makeover #1 – Recreating the original
While I realise this dataset isn’t a good use case for a treemap I wanted to see if I could recreate the original viz in Tableau but re-order the elements so the most expensive cities appeared in the top left-hand corner.
As I expected, Tableau defaulted to placing the cities where $1 million purchases the greatest floor space in the top-left hand corner with the cities where $1 million purchases less stacked below / to the right ordered in a descending manner:
However, to my surprise I was unable to re-order the rectangles so the cities where $1 million purchases the least floor space would display in the top-left. While this makes perfect sense (by default a treemap shows the elements with the largest proportion of the whole first, starting in the top-left hand order) I thought there might be a way to reorder the rectangles in Tableau as desired. I think the above chart is still an improvement upon the original as the rectangles are stacked in a more logical manner flowing from the ones with the highest values in the top-left to the lowest in the bottom-right (as opposed to top-right in the original).
I posted this chart to Twitter, regardless of it’s limitations, and asked the community if they knew of another way to re-order the rectangles.
Zach Bowders suggested I inverted the values to get the rectangles to display in the desired order:
I tried Zach’s approach and indeed this placed the cities in my desired order. However, I felt this view was misleading as the larger rectangles in the top-left actually represented cities where $1 million purchases fewer metres-squared, despite rendering a larger rectangle than those where $1 million purchases more floor space:
Meanwhile Mike Cisneros confirmed what I suspected; you can’t recorder the rectangles within a treemap in Tableau:
As an alternative to a treemap I tried an alternative chart (I’m not sure what you would call this) where I defined the column/row placement in a 4 by 5 grid and plotted the cities as individual squares. While this does what I wanted all along I don’t think it has the same visual appeal as a treemap and it isn’t the greatest chart for drawing comparisons:
So there you have it! You can’t reorder treemap rectangles in Tableau.
For my actual #MakeoverMonday viz I wanted to put the square-footage sizes into context. I don’t know about you but I certainly can’t visualise how big or small a property that is 16m² would be in my head. A quick Google search told me that the average city centre one bedroom apartment in London & New York is 46m². I appreciate the standard sizes of properties in some of the other cities may differ from this average I thought this would be a good comparison point regardless.
Using this within a simple calculation in Tableau told me that $1 million would stretch as far as 3.8 one-bedroom apartments in Sao Paulo but would only purchase 0.3 apartments in Monaco. Since this viz purely explores comparisons between cities I felt that a bar chart was the most logical chart to use; anything else would unnecessarily complicate a simple data set. I chose to make reference to and call-out the cities where $1 million wouldn’t be enough to cover the cost of a single apartment by colouring these differently and adding an annotation.
Here’s my completed viz (click on the image to interact with the viz in Tableau Public):
Thanks for reading.