Bounding Boxes in Tableau

Aug 23, 2018

Klaus Schulte

For #makeovermonday week 34 I created a viz that is showing fatalities of crisis in Africa and Asia (click the image).

Bringing Clarity to Crisis

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.

gif_blog

The basic idea of a bounding box is to identify the minimum and maximum longitude and latitude and connect these points with a rectangle.

idea.jpg

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:

data 2018-08-23 17-03-03

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):

idea2.jpg

Well, that was quickly done in excel:

data 2018-08-23 17-18-00.jpg

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:

1. Creating the bounding boxes

viz

2. Building a dual axis with polygons

viz2

I set opacity to 20%.

3. Fixing the map

viz3.jpg

4. Setting up a conditional filter

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.

viz4

5. Et voilà:

viz5

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!