Using custom geocoding in Tableau

Organizations often have their definitions of geographic data. Although country names stay relatively static, their classification can change as the organization emerges from one level of maturity to another. Sometimes, for example, an organization can start with a very simple division:

North America and EMEA. However, as the organization grows, it might split off into North America, Europe, Asia Pacific, and Rest of the World, for example. 

This can mean that geography has a business context and meaning as well as describes a physical location. Since some geography is fairly standard, Tableau offers a default interpretation of certain geographic data to help you automatically create maps from your data. The default interpretation includes countries, states, and area codes, for example. However, Tableau's default interpretation can be tailored to align with the business interpretation of geographic data. In this recipe, we will add in some customized geographic data by importing a custom file and then using the customization to create a data visualization.

 The data is taken from the Human Development Index research, which is part of the United Nations Development Programme, which in turn is an organization that has the goal of "advocating for change and connecting countries to knowledge, experience, and resources to help people build a better life."


 The Human Development Index (HDI) is a new way of measuring development by using metrics such as life expectancy, educational success, and income and combining them into one measure. You can find more information about the HDI metric at http://hdr.undp.org/ en/statistics/HDI/. In this recipe, we will look at importing custom geocoding. One interesting feature of this exercise is how we go about using color to indicate rank. Tableau online training


Getting ready

 Let's continue to use Chapter 5 workbook. We have an amended DimSalesTerritory to reimport, which contains the HDI rank of each country in the AdventureWorks database. To do this, replace the existing DimSalesTerritory.csv file with the DimSalesTerritory.csv file of the Chapter 5 workbook. If you open the new file, you will see that it contains an additional column: HDIRank. 

To refresh the data, simply go to the Data menu option and select Refresh All Extracts. You should see a new column called HDIRank in the DImSalesTerritory dimension. To create data for customizing geocoding in Tableau, you need data that follows several rules: 

  • The filename must be called the same as the key of the data 
  •  The file must be in CSV format


For this example, there is a small file that you can download at http://bit. ly/TableauBookCh5HDIRank. The data file contains three columns: a nominal latitude and longitude of the countries contained in the AdventureWorks database along with their HDI ranks according to the HDI 2013 report.

Get in-depth knowledge to learn tableau training



#database #tableau

3.35 GEEK