In one of previous article we explored on how to create a simple filled map in Tableau which was simple, fun and results quite informative. However, today we would like to extend this topic on maps further, by showing how to work with coordinates data when latitude and longitude details are provided. And why is that? As you may be aware the data field is quickly changing due the influx of data coming in different variety and volume, business demands are also changing and therefore developers and analysts need to up their game by learning different ways of handling these business demands.
Related: How to create a simple filled map.
So, what is our goal in this article? We will be using data on Health facilities in Kibera, to rebuild one of the previous dashboards we published and can be accessed here. (i.e. Plotting the location of different health facilities in Kibera slum Nairobi).
Here is snap shot of the data;
Using the link provided above, download the data, connect it to Tableau app and follow along.
Step 1: Plot location of health facilities.
Note this gives us an outline of Kenyan map with a single dot as show below.
To plot, each single location of health facility we’ll need to dis-aggregate measures in the following way;
Select Analysis menu >> then uncheck ‘Aggregate measures’.
See the resulting view.
Notice in above view, although the different health facilities are well mapped based on the coordinates, it’s hard to related them with different physical land marks like roads we all know. To add this on our view, we’ll need import this capability from Mapbox, by integrating our Tableau map with a basic map designed in Mapbox with all this physical layers like roads added.
(At this point you can Sign in or Sign up with Mapbox and create a basic map based on the location i.e. Nairobi for this case).
Step 2: Copy Mapbox integration URL for Tableau.
Open the basic map you’ve created in Mapbox, (mine is called ‘nairobi’).
Step 3: Use Mapbox integration URL in Tableau.
To apply this;
On the pop-up menu, select Add… >> Mapbox Maps…
On the menu that pops up;
Executing above we’ve.
Notice, this is a more informative view as we can see location of health facility regarding different land marks like, Southern by-pass, Nairobi golf club and various street roads.
Other analytical metrics can be added with the help color and Size by dragging the metric to the respective shelf. For instance, to view who are the operators of these facilities, one can drag the dimensions field ‘Operator’ to the color shelf.
See the resulting view below.
From this view, one can tell that majority of facilities are operated by private owners followed by the government. Using radial selection, users can see the number of facilities within a certain mile radius from a point. To explore more on this capability kindly use the dashboard published here.
I hope this article was helpful to you. Thanks for reading.