Once the data is loaded, Tableau will determine geographic fields using the field names, such as city, state, and zip code, and will generate latitude/longitude data for those fields. Tableau will denote the geographic fields by placing a globe symbol next to the field name. If Tableau misses the detection of any field, usually due to variations in field names, we can manually set these fields as geographic fields.
Let's use the sample file Sample – Superstore Sales (Excel)
. Open a new worksheet and select Sample – Superstore Sales (Excel) as the data source.
Once the data is loaded in Tableau, perform the following steps to set a few fields as geographic fields:
When the field names are different from conventional names, Tableau will not know that these fields are geographic fields. We can manually assign various fields as geographic fields, which generate latitude and longitude to be used in the maps. Sometimes Tableau cannot match a field to its internal data; for example, if there's a state called UH in our data, but Tableau does not have that value in the list of states of the US. In such cases, Tableau will prompt for mapping of the values from the data.
In Tableau's documentation on geographic roles, you can find out which fields Tableau can geocode automatically; browse to http://onlinehelp.tableausoftware.com/v8.0/pro/online/en-us/maps_geographicroles.html. Geocoding of fields with information on area code, CBSA/MSA, congressional district, and county are limited to the US only.