Geocode Street Addresses into Point Geometries

Analysis Guides

Geocode Street Addresses into Point Geometries

If your dataset contains street addresses, without any other coordinates, the connected map layer may appear empty. Street address data is not automatically converted into geometries during the import process. You may have to apply the Georeference analysis to generate point geometries from street addresses. This option also enables you to define custom columns and values for city, state and country. Since CARTO uses coordinates to plot data, the more finite your data (such as a street address), the better your results.

Street georeferencing is subject to quota limitations and extra fees may apply. A permitted amount of credits are allowed per month. Any geocode matches to the indicated street address consumes credits from your account. It is recommended to view the Preparing Geocoded Data documentation before importing data to CARTO. You can also request a demo if you are interested in testing this service with your account.

For this guide, let's apply the Georeference analysis to visualize the street addresses of fire stations within the Austin, Texas area. Different types of street data from Austin's Open Data Portal is provided.

Georeference an Empty Layer into Street Address Data

This section describes how to georeference an empty layer to visualize street data.

  1. Import the template .carto file, packaged from "Download resources" of this guide and create the map. Builder opens with Austin Fire Stations as the first and only map layer.

    Click on "Download resources" from this guide to download the zip file to your local machine. Extract the zip file to view the files used for this guide.
  2. Click on the Austin Fire Stations map layer.

    The STYLE tab indicates that there is no geometry data and provides a shortcut to georeference your data. If you switch to the Data View, you will notice that the_geom column contains null values, even though there is an address, city, and state column.

    Example of empty layer Data View with an address column

    The Data View and Map View appear as icons on your map visualization when a map layer is selected. Click to switch between viewing your connected dataset as a table, or show the map view of your data.
  3. Click GEOREFERENCE.

    The ANALYSIS tab opens and Georeference is automatically selected.

  4. Change the georeference TYPE to Street Addresses.

    Once Street Addresses is selected, you are notified how many credits will be consumed from your account.

  5. Apply the following NORMAL MODE_ parameters:

    • For the STREET ADDRESS parameter, select the address column from your dataset.
    • Click the checkbox next to CITY and select the city column from your dataset.
    • Click the checkbox next to STATE and select the state column from your dataset.
    • Click the checkbox next to COUNTRY. Since this dataset does not have a country column, you can add a custom column by typing United States. Click to add it as the custom value.

      Enter custom georeference value

    • Click CONFIRM to run the analysis.

      Analysis applied to layer

  6. Click the Data View to see how the specified street addresses were converted to points in the_geom column.

    Street Addresses converted to geometries

  7. From the Map View, click Center map on layer (next to the layer name) to visualize the street data as points on your Map View.

    Center map on layer

Concatenate Street Addresses with Advanced Mode

In the example above, we were able to georeference street data in NORMAL MODE, since our map layer contained a complete street address in the address column.

If you have a dataset where street data is fragmented across multiple columns, you need to string together the street values in order to create a geometry. The street georeference option provides an ADVANCED MODE, which enables you to enter free-form text that concatenates street data from multiple columns into the_geom column.

This section describes how to georeference a map layer that contains fragmented street data.

  1. From the LAYERS pane in Builder, hide the Austin Fire Stations layer.

  2. Click ADD to connect the fragmented_data.csv dataset as a map layer.

    This file is provided from the "Download resources" of this guide.

    Note that the fragmented data layer indicates that there are no geometries.

    No geometry for layer

  3. Click on the fragmented data map layer.

    If you switch to the Data View, you will notice that the_geom column contains null values. The actual street address values are fragmented across multiple columns; steet_no, street_name, street_type, and steet_opt.

    Data View of fragmented map layer

  4. Click GEOREFERENCE from the STYLE tab.

    The ANALYSIS tab opens and Georeference is automatically selected.

  5. Change the georeference TYPE to Street Addresses.

    Once Street Addresses is selected, you are notified how many credits will be consumed from your account.

  6. Apply the following ADVANCED MODE parameters:

    • Click ADVANCED MODE to manually define the street address values.

      Advanced mode of street addresses georeferencing

    An example of how columns should be formatted appears.

    • Type free-form text by entering the four columns from your dataset that contain street data, as shown in the following example:

      Define street column values

    • Click the checkbox next to CITY and select the city column from your dataset.

    • Click the checkbox next to STATE and select the state column from your dataset.
    • Click the checkbox next to COUNTRY. Since this dataset does not have a country column, you can add a custom column by typing United States. Click to add it as the custom value.
    • Click CONFIRM to run the analysis.

Street addresses appear as points on your visualization!

Example of street address data on visualization

Download the final .carto file from the "Download resources" of this guide, and explore additional analysis and cartography applied. For example, apply the Filter by column value analysis as the next chain in the workflow to show only the fire stations on your map layer. Additionally, the layer was styled by image markers and contains POP-UP information windows.

External Resources

If you are using the Data Services API with CARTO Engine to manage your data, view the Street-Level Geocoder documentation.