Addresses are among the most challenging data to clean. They're entered by humans, they change over time, and they follow complex rules that vary by country, province, and municipality.
Why Addresses Are Hard
A single address can be written many ways: "123 Main Street," "123 Main St," "123 Main St.," "123 MAIN STREET." All are the same address, but a simple string comparison treats them as different.
Addresses also change. Streets get renamed. Buildings get renumbered. New postal codes are created. An address that was valid five years ago may no longer exist.
Address Parsing
Parsing breaks an address into its components: street number, street name, street type, unit number, city, province, postal code. Parsed addresses are much easier to validate and standardize than free-text strings.
For Canadian addresses, the standard components are:
- Unit/suite number (if applicable)
- Street number
- Street name
- Street type (Street, Avenue, Boulevard, etc.)
- Street direction (N, S, E, W, NE, etc.)
- City/municipality
- Province/territory (two-letter code)
- Postal code
Canada Post publishes address standards for Canadian addresses. Following these standards — including approved street type abbreviations and province codes — ensures addresses are consistent and deliverable.
Geocoding for Validation
Geocoding converts an address to geographic coordinates (latitude and longitude). If an address can be geocoded successfully, it's likely valid. If geocoding fails, the address may be incorrect or non-existent.
Address Validation Services
Automated address validation services check addresses against authoritative databases and return standardized, corrected versions. These are particularly useful for large datasets with many addresses.
Learn about broader Data Standardization techniques.