Whether you're dealing with a list of addresses in a spreadsheet, or with CSV files containing scraped data. You end up with a list of unstructured addresses. The process of extracting structured values from those locations is useful for filtering your list, or when you connect your data to other services that require location in parts. Datablist is a tool to clean, normalize and enrich data. With the built-in "Location Lookup" enrichment, you can import a CSV or Excel file, and extract the City, Country, Latitude, and Longitude information from a location input.

In this step-by-step guide, you will learn:

Get structured city and country data from unstructured location texts

Step 1: Import a CSV or Excel file with your list of addresses

Datablist is a tool to organize and enrich your data. It's an online CSV editor with superpowers. And it scales up to millions of items per collection.

To begin, you need to create an account on Datablist.

Once you are registered, create a collection and load your CSV file with your addresses.

To create a new collection, click on the + button in the sidebar. And click "Import CSV/Excel" to load your file. Or click the shortcut from the getting started page to move directly to the file import step.

Create a collection
Create a collection

Check our documentation for importing data if needed.

Step 2: Configure the "Location Lookup" enrichment

After the import, you should have a collection with at least one property containing unstructured data location data.

Your location data can contain:

  • Single Country
  • Single City
  • Combinaison of City and Country
  • Full address

Click on the "Enrichment" button to open a list of available enrichments.

Open Enrichments Drawer
Open Enrichments Drawer

Then, select the "Location Lookup" enrichment.

Select Location Lookup
Select Location Lookup

Enrichments work with "Inputs" and "Outputs".

"Inputs" are the data you give to the enrichment, and the "Outputs" are the data that the enrichment returns to you.

To configure the "Location" input property, select your "Location" property using the dropdown. Datablist will try to auto-map the inputs and outputs with your collection if it finds similar names.

Map Inputs and Outputs
Map Inputs and Outputs

Then, to configure your "Outputs":

  • Click on the "+" button to automatically create a property and auto-map with the output
  • Or select an existing property from your collection

The "Location Lookup" enrichment returns the following outputs:

  • City - The city name found for your location
  • Country - The country name found in your location text or the country extrapolated from the city
  • Country Code - The ISO 3266 alpha-2 country code. A two-letter country code.
  • Latitude - The latitude coordinate when available (for city or full address)
  • Longitude - The longitude coordinate when available (for city or full address)
  • Processed - A Checkbox output to track when an item has been processed. This is useful when the "Location Lookup" enrichment can't extract structured location data from your text. Perfect to avoid running the enrichment twice.

After mapping the outputs, your collection will look like this:

Mapped Outputs
Mapped Outputs

Step 3: Run the enrichment to extract structured parts from your location text

Datablist will run the enrichment on your "current items", which are in priory order:

  • Your selected items
  • Your filtered items
  • All your collection items otherwise

After configuring the "Location Lookup" enrichment, click on the "Run action" button to process your items. Datablist processes your items by batch.

A counter will appear to show you how many items are currently in the current batch, and how many items have already been processed.

Processing Data
Processing Data

Once finished, your items will be automatically updated with the extracted address information.

Results of the Location Lookup Enrichment
Results of the Location Lookup Enrichment

Step 4: Export your data as CSV or Excel file if needed

Keep your data in Datablist to organize your leads. Or click on the "Export" button to export your data into a CSV or Excel file.

Export Data as CSV or Excel files
Export Data as CSV or Excel files

Use Cases for the Location Lookup Enrichment

Extract City and Country from LinkedIn location data

Datablist Location Lookup is the perfect tool to parse the location data from LinkedIn profiles. When you perform a search on LinkedIn to build your prospect list, having structured location data helps you filter the leads to match your targeted country or city.

Export your LinkedIn profiles to a CSV file, then import it into Datablist to process your lead locations.

Normalize LinkedIn Location
Normalize LinkedIn Location

Filter a list of addresses with their latitude and longitude coordinates

For local marketing, you might want to filter a list of addresses to exclude the addresses that are far from a GPS point. For that, you will need to extract the latitude and longitude coordinates for your addresses.

Then, click on the "Filters" button to open the filtering modal.

Add filter to your address list
Add filter to your address list

To list the items that are around a GPS point, add two filters for each Latitude and Longitude property. One filter with the greater than, and one with lower than.

On the values, enter the range for your GPS point. One degree equals 110 kilometers.

Filter Latitude or Longitude coordinates
Filter Latitude or Longitude coordinates

FAQ

How many location lookups can I do with Datablist?

The "Location Lookup" enrichment uses several services to return the structured data. If your input data contains only City and Country information and is in English, the enrichment will use a built-in algorithm to process the request. For this, no limit exists except the number of credits you have. For large lists, please contact us to discuss pricing.

If you process full addresses with street names, it will fall back to online services such as Bing Maps, Open Street Map, etc. They might return throttling errors for large collections. Your credits won't be consumed on requests with errors.

How long does it take to process my location lists?

Extracting the structured parts of a single address is fast, less than a second. But the process can take several minutes for large collections.

The total time to process your data depends on your input data. If the location text contains only City and Country information, it will use our built-in algorithm and it will be very fast. Expect to process thousands of items in a few seconds.

If you run the "Location Lookup" enrichment with full addresses, the process will be quite slow. Datablist will call external APIs one by one for each item. It can take minutes to process large collections. Contact us to discuss parallel processing if needed.

Why can't I run the "Location Lookup" enrichment when my output properties have data?

To avoid misuse and fat fingers error, Datablist won't overwrite your output properties if they already contain data.

To change this behavior and overwrite existing data, just check the "Overwrite data" setting. The setting is available after clicking on the "Gear" button.

Overwrite Data
Overwrite Data