Geo-targeting Project [16-25]

We can now calculate the distance between the two coordinates by using a simple formula:

Did the code fail?

Copy and run the code below to create the input data sets.

Let's examine how far customers traveled to buy computers.

In the first transaction, the distance calculated is 4691.

This means the distance between the customer's address and the store location is 4691 meters or (4.7 km).

This customer traveled 4.7 km to make this particular transaction.