01 / 20

Custom Geocoding
in Tableau

Learn how to map any location using custom geocoding, resolve unknown locations, and extend Tableau's built-in geographic data with your own latitude and longitude values.

Tableau

What is Geocoding?

Geocoding is the process of converting place names or addresses into geographic coordinates: latitude and longitude. Tableau has a built-in geocoding database that automatically recognizes countries, states, cities, and zip codes.

"New York, NY" Place Name Geocode 40.7128, -74.0060 Lat, Lng Coordinates Plotted on Map

Why Custom Geocoding Matters

★ Proprietary Locations
Map internal site codes, branch IDs, or custom regions that Tableau doesn't recognize.
★ Higher Precision
Place markers at exact building addresses instead of city centers for pinpoint accuracy.
★ Unknown Locations
Resolve "unknown" indicators on your map when Tableau can't match your data automatically.

Whenever your data contains locations that fall outside Tableau's built-in geocoding database, custom geocoding lets you manually supply the coordinates so every row gets plotted on the map.

The Unknown Location Problem

! 14 unknown locations Edit Locations... ? ? ? Recognized Unknown

Built-in vs. Custom Geocoding

Built-in Geocoding Custom Geocoding
Data Source Tableau's internal database Your own CSV / data file
Location Types Countries, states, cities, zips Any location you define
Setup Required None: automatic matching Import lat/lng coordinates
Precision City-level centroids Exact coordinates you provide
Flexibility Limited to known names Unlimited: any point on Earth

The Core Rule of Custom Geocoding

Every location must have a Latitude and a Longitude value Location Name "Warehouse A" Latitude 40.7128 Longitude -74.0060

Three Methods to Resolve Locations

1 Edit Locations Dialog
Use Map → Edit Locations to manually match or correct unrecognized place names.
2 Import Custom Geocoding
Load a CSV file with names, latitudes, and longitudes via Map → Geocoding → Import.
3 Lat/Lng in Your Data
Include latitude and longitude columns directly in your data source and assign geographic roles.

Step-by-Step: Custom Geocoding

1
Prepare your CSV file. Create columns for Location Name, Latitude, and Longitude. Each row is one location.
2
Import into Tableau. Go to Map → Geocoding → Import Custom Geocoding and select your CSV file.
3
Assign geographic roles. Right-click your location field → Geographic Role → select the matching custom role.
4
Drag to the view. Place the field on Columns/Rows or the Detail shelf. Tableau plots each point on the map.
5
Verify placement. Check that all markers appear in the correct positions. Use "Edit Locations" for any remaining unknowns.

The CSV File Format

Location Latitude Longitude Warehouse Alpha 40.7128 -74.0060 Distribution Hub B 34.0522 -118.2437 Store Front 7 41.8781 -87.6298 Office Campus C 37.7749 -122.4194 custom_locations.csv

Example 1: Edit Locations Dialog

You have a dataset with a "City" field. Tableau recognizes most cities, but "Springfield" matches multiple states. The indicator shows 3 unknown locations.

Edit Locations ? Springfield Unrecognized ✓ Springfield → IL, USA Matched to State Match →

Example 2: Import Custom Geocoding

Your company has 15 regional distribution centers identified by internal codes (DC-001 through DC-015). Tableau has no idea what these codes mean.

1
Create a CSV with columns: DC Code, Latitude, Longitude. Look up each center's coordinates using Google Maps or a geocoding API.
2
Navigate to Map → Geocoding → Import Custom Geocoding. Select your CSV file. Tableau creates a new geographic role.
3
Assign the role. Right-click DC Code → Geographic Role → your imported role. Drag it onto the view. All 15 centers appear on the map.

Example 3: Lat/Lng Directly in Data

Data Pane Abc Store Name # Latitude # Longitude # Sales Amount Geographic Role → Latitude Map View Size = Sales Amount

Understanding Geographic Roles

A geographic role tells Tableau how to interpret a field. When you assign a role, Tableau knows whether a number like 40.7128 is a latitude, a zip code, or just a plain number.

★ Built-in Roles
Country, State, City, Zip Code, Airport, Area Code, CBSA
★ Coordinate Roles
Latitude and Longitude: used for custom point plotting

The Geocoding Workflow

Load Data into Tableau Locations recognized? Yes Map Ready No Edit Locations Import Custom CSV Add Lat/Lng Fields All Locations Mapped

Common Mistakes to Avoid

✕ Swapping Lat and Lng
Latitude goes on Rows, Longitude on Columns. Reversing them places markers in the wrong hemisphere.
✕ Missing Geographic Role
Without assigning "Latitude" or "Longitude" roles, Tableau aggregates coordinates into a single averaged point.
✕ Wrong Number Format
Using degrees-minutes-seconds (41° 52' N) instead of decimal degrees (41.8781). Tableau expects decimals only.
✕ Aggregating Coordinates
Tableau defaults to aggregating measures. If Lat/Lng are measures, they'll be averaged (AVG) or summed (SUM), plotting one point. Change them to Dimension to plot each location.
✕ Ignoring the Indicator
The "unknown locations" indicator means data rows are missing from your map. Always check and resolve it.

Summary: Resolution Methods

Edit Locations Import CSV Lat/Lng in Data
Best For Quick fixes Reusable location sets Full control
Speed Fastest Moderate Varies
Persistence Workbook only Tableau Repository Tied to data source
Scalability Low (manual) High Highest
Requires Lat/Lng No Yes Yes

Question 1 of 5

What does custom geocoding allow you to do in Tableau?

Question 2 of 5

When importing a custom geocoding CSV, which three columns are required at minimum?

Question 3 of 5

You drag a Latitude field to Rows and a Longitude field to Columns, but only one point appears on the map. What is the most likely cause?

Question 4 of 5

The valid range for Latitude values in decimal degrees is:

Question 5 of 5

Where do you access the Import Custom Geocoding feature in Tableau?