Assign Geographic Roles

This article describes how to assign a geographic role to a field in Tableau so that you can use it to create a map view.

A geographic role associates each value in a field with a latitude and a longitude value. When you assign a geographic role to a field, Tableau assigns latitude and longitude values to each location in your data based on data that is already built into the Tableau map server.

Assign a geographic role to a field

Assigning a geographic role based on the type of location (such as state versus postcode) helps ensure that your data is plotted correctly on your map view. For example, you can assign the City geographic role to a field that contains a list of city names.

When a field is assigned a geographic role, Tableau creates a map view when you add the field to Detail on the Marks card. In other words, Tableau geocodes the information in that field.

To assign a geographic role to a field:

  • In the Data pane, click the data type icon next to the field, select Geographic Role, and then select the geographic role you want to assign to the field.

When you assign a geographic role to a field, Tableau adds two fields to the measures area of the Data pane: Latitude (generated) and Longitude (generated).

These fields contain latitude and longitude values and are assigned the Latitude and Longitude geographic roles. If you double-click each of these fields, Tableau adds them to the Columns and Rows shelves and creates a map view using the Tableau background map.

Types of geographic roles in Tableau

The following table describes the geographic roles available in Tableau. Many of the roles are international, but some are limited to the US only.

You can assign geographic roles to your fields based on the type of geographic data they contain. For example, you can assign the Airport geographic role to a field that contains International Air Transport Association (IATA) codes.

If your location data does not fit into one of these roles, you may have to import custom geocoding to plot the data on a map. For more information, see Geocode Locations Tableau Does Not Recognise and Plot Them on a Map(Link opens in a new window).

Geographic Role Assign this role to a field if it contains:
AirportInternational Air Transport Association (IATA) or International Civil Aviation Organisation (ICAO) airport codes.
Area Code (US)US telephone area codes; numbers only.
CBSA/MSA (US)US Core-Based Statistical Areas (CBSA), which includes Metropolitan Statistical Areas (MSA), as defined by the US Office of Management and Budget. CBSA/MSA Codes and Names are recognised.
CityWorldwide cities with population of 15,000 or more. Names are in English (UK or US), French, German, Spanish, Brazilian-Portuguese, Japanese, Korean and Chinese (Simplified and Traditional).
Congressional District (US)US congressional districts.
Country/RegionWorldwide countries, regions, and territories. Names are in English (UK or US), French (Canada or France), German, Spanish, Brazilian-Portuguese, Japanese, Korean, Chinese (Simplified and Traditional), Swedish and Thai. Tableau also recognises, FIPS 10, ISO 3166-1 alpha 2, and ISO 3166-1 alpha 3. Names are included in various forms, including long, short, and various abbreviations.
CountySecond-level administrative divisions for select countries. For example, US counties, French départements, German kriese, etc.

Note: Second-level administrative division definitions vary by country. In Tableau, all second-level administrative divisions are geocoded with the County geographic role. For more information, see the Location Data that Tableau Supports for Building Map Views section.
NUTS EuropeNUTS (Nomenclature of Territorial Units for Statistics) levels 1–3 codes. Codes and names, including synonyms, are supported.
LatitudeLatitude in decimal degrees. Only available for numeric fields.
LongitudeLongitude in decimal degrees. Only available for numeric fields.
State/ProvinceWorldwide state, province, and other first-level administrative divisions. Names are in English (UK or US), French, German, Spanish, Brazilian-Portuguese, Japanese, Korean and Chinese (Simplified and Traditional). Note: Some names are available only in their local form.
ZIP Code/PostcodeZIP codes and postcodes for select countries. For example, US five-digit zip codes, Australian four-digit postcodes, German five-digit postcodes, etc. For more information, see the Location Data that Tableau Supports for Building Map Views(Link opens in a new window) section.

See also:

Location Data that Tableau Supports for Building Map Views(Link opens in a new window)

Geocode Locations Tableau Does Not Recognise and Plot Them on a Map(Link opens in a new window)

Blend Geographic Data(Link opens in a new window)

Create Tableau Maps from Spatial Files(Link opens in a new window)

Edit Unknown or Ambiguous Locations(Link opens in a new window)

Thanks for your feedback!Your feedback has been successfully submitted. Thank you!