Cleaning Data for Geocoding
- You have data you need to geocode.
Whether you geocode your data by using the “Gecoding Analysis” in Builder, or with one of the Geocoding Functions available in the Data Services API, it will require data that you provide. This article will help to understand the best practices for the best results.
Data Best Practices
One of the most important things to consider before geocoding anywhere, with any tool, is data cleanliness. If your data is inconsistent, or wrong, geocoders will not be able to match your input with any of their stored values that relate to a coordinate pair. Let’s look at some examples of addresses:
CARTO DC, 4075 Wilson Blvd 8th Floor, Arlington, VA 22203
CARTO HQ, 114 W 26th FL 3 New York NY 10001
CARTO Madrid, Plaza Callao 4, Planta 2 (Gran Via 46), 28013 Madrid España
The best way to separate these addresses into columns would be as follows:
|CARTO DC||4075 Wilson Blvd||8th Floor||Arlington||VA||USA||22203|
|CARTO HQ||114 W 26th||FL 3||New York||NY||USA||10001|
|CARTO Madrid||Grand Via 46||Planta 2||Madrid||Madrid||España||28013|
Most geocoders will have different parameters for each of these columns to fit in. Our street level geocoder is able to take a free form address as the first parameter, but you will still want to only include street address related details, separated with commas e.g.
4075 Wilson Blvd, Arlington, VA rather than
CARTO DC, 4075 Wilson Blvd 8th Floor, Arlington, VA 22203.
Know your Geocoder
Know what type of information your geocoder is looking for! This is from our Country Geocoder documentation:
It recognizes the names of the different countries either by different synonyms (such as their English name or their endonym), or by ISO (ISO2 or ISO3) codes.
Make sure you look into exactly what type of information the geocoder you are using is looking for.
- Check out this article to learn about all the different ways you can geocode your data using CARTO.