Unify Location Data

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

Introduction

Use the Unify Location Data transformation 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 transformation to add ISO codes for regions and countries to your data extract. ISO codes are required to create geo map widgets in Explore. For example, if you have country names in your data extract, you can use the Unify Location Data transformation to add a column to your data extract containing ISO alpha-2 values corresponding to these country names.

This video guide explains how to create and configure the Unify Location Data transformation.

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 transformation. Before completing this step, start creating a transformation by following the instructions in Using standard transformations. To configure this transformation, 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 transformation 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 transformation 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 transformation.

    Ignore

    If Adverity encounters an error, the Unify Location Data transformation 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.

You can preview your transformation in the Preview tab. Here, you can see how your current transformation instructions will transform the data you have previously collected using the selected datastream.

Click Refresh Preview at the bottom of the Configuration tab to see the preview of your latest changes.

For more information about the preview, see Previewing transformations.