Unify Location Data

This guide explains how to use the Unify Location Data enrichment to transform location data into a standardized format.

Introduction

Use the Unify Location Data enrichment to standardize location values based on your existing location data. Location data often has to be standardized so that you can filter it correctly and visualize it.

You can also use this enrichment to add ISO codes for regions and countries to your data extract. ISO codes are required to create geo map widgets in Data Explorer. For example, if you have country names in your data extract, you can use the Unify Location Data enrichment to add a column to your data extract containing ISO alpha-2 values corresponding to these country names.

Prerequisites

Before you complete the procedure in this guide, perform all of the following actions:

  • Make sure that the data extract contains location data.

Procedure

This guide explains how to configure the Unify Location Data enrichment. Before completing this step, start creating an enrichment by following the instructions in Using standard enrichments. To configure this enrichment, follow these steps:

  1. In the Select the geo data to enrich section, configure the following settings:

    Source column

    In the drop down menu, select the column in your data extract that contains the location data. The enrichment will use this data to create new, standardized location data.

    Location type

    In the drop down menu, select the type of location data in the source column. For a full list of compatible country names, country codes and numeric country codes, and links to compatible region codes, see this resource:

    • Select Country name if the source column contains country names, such as Austria or United States.

    • Select Country code ISO 3166-1 alpha-2 if the source column contains two-letter country codes, such as AT or US.

    • Select Country code ISO 3166-1 alpha-3 if the source column contains three-letter country codes, such as AUT or USA.

    • Select Country code ISO 3166-1 alpha-3 numeric if the source column contains three-digit numeric country codes, such as 040 for Austria or 840 for the USA.

    • Select Region code ISO 3166-2 if the source column contains region codes, such as AT-9 for Vienna (Austria) or US-HI for Hawaii (USA)

  2. Click Apply.

  3. In the Choose location columns to add section, configure the location data you want to add to your data extract:

    • Select the checkboxes for the location data types you want to add. Each type of location data will be added in a new column.

    • (Optional) Rename the columns for the selected location data type.

  4. Click Confirm selection.

  5. In the Decide how to handle errors section, choose what Adverity should do if an error occurs:

    Stop and flag

    If Adverity encounters an error, the enrichment stops and an error message is displayed in the datastream overview.

    Flag and notify

    If Adverity encounters an error, an email is sent to the user that created the enrichment.

    Ignore

    If Adverity encounters an error, the Unify Location Data enrichment continues.

    Enter a value to use if there is a missing source or mapping value

    (Optional) If you select Flag and notify or Ignore, enter a value that Adverity will include instead of the location data in the new column. Tip: You can then use this value to find any missing location data.

To preview your enrichment at this step, click the Table preview tab. Here, you can see how your current enrichment instructions will transform the data you have previously collected using this datastream.

If the preview shows that the enrichment is not working in the way you want it to, click the Instructions tab to adjust the enrichment settings.

Repeat these steps until the preview shows that the enrichment will have the effect you want.

For more information about the preview, see Previewing enrichments.