Bird
Raised Fist0
Tableaubi_tool~15 mins

Custom geocoding in Tableau - Real Business Scenario

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Scenario Mode
👤 Your Role: You are a sales analyst at a retail company.
📋 Request: Your manager wants a map showing sales by store location, including some new stores not in Tableau's default map.
📊 Data: You have a sales dataset with store names, sales amounts, and custom latitude and longitude coordinates for all stores.
🎯 Deliverable: Create a Tableau map visualization that uses custom geocoding to plot all stores with their sales amounts.
Progress0 / 6 steps
Sample Data
Store NameSalesLatitudeLongitude
Central Store15000040.7128-74.0060
Northside Outlet9000041.8781-87.6298
East End Shop12000034.0522-118.2437
New Horizon6000039.9526-75.1652
Sunset Point8000037.7749-122.4194
Lakeview Store7000047.6062-122.3321
Greenfield5000036.1627-86.7816
Harbor Shop11000025.7617-80.1918
1
Step 1: Open Tableau and connect to the sales dataset containing Store Name, Sales, Latitude, and Longitude.
Connect to the data source with columns: Store Name, Sales, Latitude, Longitude.
Expected Result
Data is loaded and visible in Tableau's Data pane.
2
Step 2: Create a custom geocoding file to map Store Name to Latitude and Longitude.
Create a CSV file with columns: Store Name, Latitude, Longitude matching the sample data.
Expected Result
Custom geocoding CSV file is ready for import.
3
Step 3: Import the custom geocoding file into Tableau.
In Tableau, go to Map > Geocoding > Import Custom Geocoding, then select the CSV file.
Expected Result
Tableau recognizes the custom store locations with their coordinates.
4
Step 4: Assign the Store Name field as a geographic role 'Custom Geocode'.
Right-click Store Name > Geographic Role > Custom Geocode.
Expected Result
Store Name is linked to custom geocoding coordinates.
5
Step 5: Create a map visualization using Store Name and Sales.
Drag Store Name to Detail on Marks card and Sales to Size. Tableau will automatically generate Latitude (generated) and Longitude (generated) on Rows and Columns.
Expected Result
Map shows all stores plotted with circle sizes representing sales amounts.
6
Step 6: Format the map for clarity and accessibility.
Add tooltips showing Store Name and Sales, ensure color contrast is good, and enable keyboard navigation.
Expected Result
Map is clear, accessible, and interactive.
Final Result
Map Visualization

  * (Central Store)  ●●●●●  $150,000
  * (Northside Outlet)  ●●●  $90,000
  * (East End Shop)  ●●●●  $120,000
  * (New Horizon)  ●●  $60,000
  * (Sunset Point)  ●●●  $80,000
  * (Lakeview Store)  ●●  $70,000
  * (Greenfield)  ●  $50,000
  * (Harbor Shop)  ●●●●  $110,000

Circles sized by sales amount, placed by custom latitude and longitude.
Central Store has the highest sales at $150,000.
New Horizon and Greenfield are new stores added via custom geocoding.
Sales vary by location, with larger sales in Central and Harbor Shop areas.
Bonus Challenge

Add a filter to the map to show sales only above a selected threshold.

Show Hint
Create a parameter for sales threshold and use it to filter the data on the map.

Practice

(1/5)
1. What is the main purpose of custom geocoding in Tableau?
easy
A. To create charts other than maps
B. To change the color scheme of maps
C. To export maps as images
D. To add new or special locations not included in Tableau's default maps

Solution

  1. Step 1: Understand Tableau's default map data

    Tableau has built-in locations but may miss some special or new places.
  2. Step 2: Purpose of custom geocoding

    Custom geocoding lets you add these missing locations by providing coordinates.
  3. Final Answer:

    To add new or special locations not included in Tableau's default maps -> Option D
  4. Quick Check:

    Custom geocoding = add new locations [OK]
Hint: Think: Why add new places to a map? [OK]
Common Mistakes:
  • Confusing custom geocoding with color or style changes
  • Thinking it exports maps instead of adding data
  • Assuming it creates non-map charts
2. Which file format is required to import custom geocoding data into Tableau?
easy
A. .csv (Comma-separated values)
B. .xlsx (Excel workbook)
C. .txt (Plain text file)
D. .json (JavaScript Object Notation)

Solution

  1. Step 1: Identify Tableau's accepted custom geocoding format

    Tableau requires a CSV file with location names and coordinates for custom geocoding.
  2. Step 2: Compare file types

    CSV is the standard for tabular data import in Tableau for geocoding, unlike Excel or JSON.
  3. Final Answer:

    .csv (Comma-separated values) -> Option A
  4. Quick Check:

    Custom geocoding file = CSV [OK]
Hint: Remember: CSV is simple table data for Tableau [OK]
Common Mistakes:
  • Choosing Excel because it's common for data
  • Thinking JSON or TXT are accepted for geocoding
  • Confusing file formats for other Tableau features
3. Given this CSV snippet for custom geocoding:
Location,Latitude,Longitude
MyTown,40.7128,-74.0060
NewPlace,34.0522,-118.2437

What will Tableau do after importing this file?
medium
A. Show an error because coordinates are invalid
B. Replace all existing locations with MyTown and NewPlace
C. Add MyTown and NewPlace as mappable locations on Tableau maps
D. Ignore the file because it lacks population data

Solution

  1. Step 1: Understand the CSV content

    The CSV has location names with valid latitude and longitude values.
  2. Step 2: Tableau's behavior on import

    Tableau adds these locations to its map data without removing existing ones.
  3. Final Answer:

    Add MyTown and NewPlace as mappable locations on Tableau maps -> Option C
  4. Quick Check:

    Valid CSV adds locations [OK]
Hint: Valid coordinates + names = new map points [OK]
Common Mistakes:
  • Thinking Tableau replaces all locations
  • Assuming coordinates are invalid without checking
  • Believing extra data like population is mandatory
4. You imported a custom geocoding CSV but Tableau does not show your new locations on the map. What is the most likely error?
medium
A. You forgot to restart Tableau after import
B. The CSV file has incorrect column headers like 'Lat' instead of 'Latitude'
C. Tableau does not support custom geocoding
D. The CSV file is too large for Tableau to process

Solution

  1. Step 1: Check CSV format requirements

    Tableau requires exact column headers: 'Location', 'Latitude', and 'Longitude'.
  2. Step 2: Identify common import issues

    Incorrect headers like 'Lat' cause Tableau to ignore the data.
  3. Final Answer:

    The CSV file has incorrect column headers like 'Lat' instead of 'Latitude' -> Option B
  4. Quick Check:

    Correct headers = data shown [OK]
Hint: Check headers match exactly: Location, Latitude, Longitude [OK]
Common Mistakes:
  • Blaming file size without evidence
  • Thinking Tableau lacks custom geocoding support
  • Assuming restart is always needed
5. You want to map a new set of store locations in Tableau that are not recognized by default. Your CSV has duplicate location names but different coordinates. What is the best way to handle this in custom geocoding?
hard
A. Add a unique identifier to the location names to differentiate each location
B. Remove duplicates and keep only one coordinate per name
C. Import as is; Tableau automatically handles duplicates
D. Change all location names to the same name for simplicity

Solution

  1. Step 1: Understand duplicate location issues

    Duplicate names with different coordinates confuse Tableau's mapping.
  2. Step 2: Use unique identifiers

    Adding a unique ID or modifying names helps Tableau distinguish each location.
  3. Step 3: Avoid data loss or confusion

    Removing duplicates or renaming all the same causes loss or errors.
  4. Final Answer:

    Add a unique identifier to the location names to differentiate each location -> Option A
  5. Quick Check:

    Unique IDs fix duplicate location issues [OK]
Hint: Make each location name unique to avoid confusion [OK]
Common Mistakes:
  • Assuming Tableau auto-fixes duplicates
  • Deleting duplicates losing data
  • Using identical names causing map errors