Bounding Boxes in Tableau
Aug 23, 2018
Klaus SchulteFor #makeovermonday week 34 I created a viz that is showing fatalities of crisis in Africa and Asia (click the image).
While I was happy to support such an amazing and important project I was also happy to work on my mapping skills because this #makeovermonday was all about mapping. Most of the work I put into this viz went into a tiny little part: an overview map which is highlighting the selected country with a so-called bounding box.
The basic idea of a bounding box is to identify the minimum and maximum longitude and latitude and connect these points with a rectangle.
I first identified the four min-/max-points out of the provided data but then realized that the resulting boxes were partly very small because of only few events in these countries. A quick google search led me to GitHub where I found the data for all countries.
I imported the data to excel and labeled the min/max longitude/latitude:
To draw a bounding box on my map it just needed to calculate the four corners of the rectangle (and a fifth to close the loop):
Well, that was quickly done in excel:
The rest was just bringing my bounding box data to Tableau, linking my bounding box data and the #makeovermonday data on ‘country’ in Tableau and creating the viz:
I set opacity to 20%.
I wanted to use a parameter to filter my countries in my detailed map, that’s why I used this parameter to filter my bounding boxes too.
A nice way to give orientation to the user of your dashboard.
I hope you enjoyed this post and you’ll find own use cases for bounding boxes!
Feedback would be highly appreciated!
COMMENTS