---
schema_version: "1"
id: a5e373b3148d5c4552a5ef89a3e690fa783adf540440151616f8bd700a5bb024
title: Blend Geographic Data
collection: tableau
version: current
locale: en-us
portal_url: https://docs.salesforce.com/tableau/current/en-us/public/desktop/maps_customgeocode_ex_datablend.md
canonical_url: https://help.tableau.com/current/public/desktop/en-us/maps_customgeocode_ex_datablend.htm
source_site: help.tableau.com
content_type: documentation
content_hash: dc6071cf7aa9da9816b67d01ffcf2e7ba2071df6ce5008c6c44e19cac897fec5
description: Example of blending geographic data to plot custom locations on a map.
---
[Skip to main content](#main-content)

# Blend Geographic Data

This example demonstrates how to blend geographic data in Tableau using two small sample data sources. Follow the steps in this topic to learn how to create a file that defines your geographic data, blend two data sources, and build the map view below using the two data sources.

The embedded view below shows famous theaters around the world, and was created by blending geographic data with another data source. Hover over the marks in the view to see information about each theater. If you would like to follow along with the steps in this topic, click Download in the view below, and then select Tableau Workbook. This will open the view in Tableau Desktop.

## Step 1: Create a file that defines your geographic data

When you have a data source that contains geographic information that is not automatically geocoded in Tableau, the first step is to create a second data source that defines the latitudinal and longitudinal values for that information. You will later connect to this file in Tableau Desktop and blend it with your original data source.

Create a second data source with the following information:

- **Geographic name column**: This column includes any geographic information you want to plot on a map view and typically matches a geographic column name in your original data. For example, if your original data source has a column called Street Address, your second data source should also have a column called Street Address. The data in this column would then be all of the street addresses you want to plot on a map view.
    
    If the column does not match a geographic column name in your original data source, you may need to edit the relationships between your two data sources in Tableau Desktop. For more information, see [Step 3](#Step3).
    
    Finally, this column should not match the names of any geographic roles already in Tableau, such as **County**, **Area Code**, or **CBSA/MSA**.
    
    **Note:** The data in these columns can be strings or numbers. However, if your locations are numbers, especially numbers with leading zeros (for example, 00501), make sure the data type of the field is set to String in Tableau. For more information, see [Data Types](https://help.tableau.com/current/public/desktop/en-us/datafields_typesandroles_datatypes.htm).
- **Latitude and Longitude columns**: The values in these columns need to be in decimal degrees (for example, 47.651808, -122.356881).

Below is an example of an original data source with geographic locations, and a second data source that defines those geographic locations.

<table>
                    <colgroup><col>
                    <col>
                    </colgroup><tbody>
                        <tr>
                            <td><b>Original data source</b>
                            </td>
                            <td><b>Second data source</b>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <img src="https://help.tableau.com/current/public/desktop/en-us/Img/blend_geodata2.png" alt="A portion of a table about theaters with the following column headers: name, estimated seats, and street address.">
                            </td>
                            <td>
                                <img src="https://help.tableau.com/current/public/desktop/en-us/Img/blend_geodata1.png" alt="A portion of a table with the following column headers: street address, latitude, and longitude.">
                            </td>
                        </tr>
                    </tbody>
                </table>

## Step 2: Connect to the data sources

1. Connect to the original data source.
2. Connect to the data source that defines your geographic data.
    
    ![Data pane showing the name, street address, and measure names dimensions.](/tableau/current/en-us/public/desktop/en-us/Img/blend_geodata3.png)

## Step 3: Edit Relationships

(Optional) If the two data sources share the same column names, your data should blend automatically when you add fields to the view. However, if the file you created to define your geographic data does not share the same column name as the geographic data in your original data source, you will need to create a relationship between those two fields using the Edit Relationships option. For information about how to edit relationships, see [Blend Your Data](https://help.tableau.com/current/public/desktop/en-us/multiple_connections.htm#step4relationships).

### Step 4: Plot the data on a map view

1. In the Data pane, select the second data source that defines your geographic data. Under Measures, assign the Latitude geographic role to the Latitude field and the Longitude geographic role to the Longitude field. For more information, see [Assign Geographic Roles](https://help.tableau.com/current/public/desktop/en-us/maps_geographicroles.htm) .
    
    ![Assign geographic roles to fields.](/tableau/current/en-us/public/desktop/en-us/Img/blend_geodata4.gif)
2. In the Data pane, select the original data source, and then drag the field you want to plot on a map to **Detail** on the **Marks** card.
    
    ![Drag a diimension field onto detail.](/tableau/current/en-us/public/desktop/en-us/Img/blend_geodata5.gif)
    
    **Note:** This field should have a data type of String, and should be a dimension. For more information on how to change the data type of a field, see [Data Types](https://help.tableau.com/current/public/desktop/en-us/datafields_typesandroles_datatypes.htm).
3. In the Data pane, select the second data source , and then double-click Latitude and Longitude to add them to the Columns and Rows shelves.
    
    The link icon ![A reddish orange chain link icon.](/tableau/current/en-us/public/desktop/en-us/Img/blend_geodata8.png) indicates that the Street Address field is blended with the Street Address field in the original data source. A broken link icon ![A broken blue chain link icon.](/tableau/current/en-us/public/desktop/en-us/Img/blend_geodata9.png) indicates that the Street Address field is not blended with the Street Address field in the original data source.
    
    ![A data pane displays two datasets, dimensions, and options for filtering and sorting.](/tableau/current/en-us/public/desktop/en-us/Img/blend_geodata6.png)

The view is now complete. Each mark represents an address from the original data source.

![A world map with blue markers indicating average latitude and longitude.](/tableau/current/en-us/public/desktop/en-us/Img/blend_geodata7.png)

## See also

[Data Blending vs. Custom Geocoding](https://help.tableau.com/current/public/desktop/en-us/maps_customgeocode_datablend.htm)