Tableau comes with a built-in algorithm to detect geographical location data from your data source.
When Tableau detects a column that represents location data, you will see a globe icon 🌐 beside the dimension in the Data pane.
Tableau allows you to generate two types of map view from location data: A symbol map and a colored map.
Let’s see an example of generating a map using Tableau. Suppose you have a CSV file with the following data:
Country,Sales(USD) France,32000 Germany,22000 Spain,28000
When you load the file into Tableau as Text File, Tableau will detect the
Country variable as location data:
To create a map view of the data, you need to do the following steps:
- Drag the
Countryvariable into either the
- Click on the Show Me pane to see available views from your data
- Select the symbol maps view
There are two map views in the Show Me pane as shown in the picture below:
The symbol maps view will generate a map with dots marking the location data as shown below:
While the maps view will generate a colored map like this:
You can add marks to the view to make it more informative.
For example, you can add the
Country variable as
Label marks to distinguish the locations.
Next, add the
Sales(USD) variable as a
Label mark to add detail to the view.
The map in your Sheet should look as follows:
Depending on what you want to create, Tableau can show maps view from known location data.
Supported source include worldwide airport codes, cities, countries, regions, territories, states, provinces, zipcodes, and more.
You can also insert latitude and longitude data in decimal degrees into Tableau.
Sometimes, Tableau may not be able to detect the locations referred from your dataset.
When this happens, you will see a warning labeled as X unknown at the bottom right corner of your map view.
You simply need to click on the label and Tableau will show the available actions to fix the issue:
By selecting Edit Locations from the menu above, you will be able to set the location manually.
And that’s how you create a map view from your Tableau data source.
You can view and download the Workbook for this tutorial here:
Great work on learning how to generate map views in Tableau. 😉