Compare Addresses avatar
Compare Addresses

Pricing

Pay per usage

Go to Store
Compare Addresses

Compare Addresses

Developed by

Marco Gullo

Marco Gullo

Maintained by Community

Matches addresses in different formats, using geocoding. It fetches geocodes from Google Map, compares them, and returns the matching addresses, within some threshold.

0.0 (0)

Pricing

Pay per usage

2

Total users

6

Monthly users

2

Runs succeeded

>99%

Last modified

9 months ago

A utility Actor to compare and match locations' addresses.

Reason

When scraping places (apartments, hotels, restaurants...) from several platforms, such as Google, Facebook, and TripAdvisor, they can have different formats.

This Actor's purpose is to match different addresses which are actually the same, e.g.,

Vodičkova 704/36, 110 00 Nové Město

and

Praha, Vodičkova, 704/36, 110 00

How it works

It uses geocoding, i.e., it transform the addresses into geographical coordinates, and compute the distances among addresses using the Haversine formula.

Sequently, it selects the closest addresses and matches them. First, it selects the addresses that match exactly, having the same latitude and longitude. Then, it uses a Linear Programming solver to select the best couples of addresses that minimize the total distance.

Input

You will have to enter the addresses in the two groups.

You can also specify the coordinates for all the addresses you know in advance, otherwise they will be determined using Google Maps.

Finally, you can specify the maximum distance that two addresses can have to match. It can be useful to allow for some tolerance and not take exact matches only, especially if you provide coordinates in input from different providers, which will likely differ slightly.

Here is an input sample:

{
"group1": [
{
"key": "4 St Pappin Rd, Glasnevin, Dublin, D11 ND70, Ireland",
"value": "53.385766,-6.2659933" // the coordinates for this address are known in advance
},
{
"key": "93 95 Emmet Rd, Inchicore, Dublin 8, D08 P1H1, Ireland",
"value": "53.3405958,-6.3141984"
},
{
"key": "Malpas Court, Clanbrassil Street Lower, Dublin, D08 HN76, Ireland",
"value": "53.3344092,-6.2745379"
}
],
"group2": [
{
"key": "201 Emmet Road, Inchicore, Dublin, Ireland",
"value": "" // these coordinates will be determined using Google Maps
},
{
"key": "Main Street, Gorteendrunagh, Castlebar, Castlebar, Ireland",
"value": ""
},
{
"key": "93-95 Emmet road, Dublin, Ireland",
"value": ""
}
],
"toleranceInMeters": 25
}

Output

Here is an output sample:

[
{
"address1": "93 95 Emmet Rd, Inchicore, Dublin 8, D08 P1H1, Ireland",
"address2": "93-95 Emmet road, Dublin, Ireland",
"location1": {
"lat": 53.3405958,
"lng": -6.3141984
},
"location2": {
"lat": 53.3405969,
"lng": -6.3140013
},
"distanceInMeters": 13.085981314251544
}
]