Using the following code to cluster geolocation coordinates results in 3 clusters:
import numpy as np
import matplotlib.pyplot as plt
from scipy.cluster.vq import kmeans2, whiten
coordinates= np.array([
[lat, long],
[lat, long],
...
[lat, long]
])
x, y = kmeans2(whiten(coordinates), 3, iter = 20)
plt.scatter(coordinates[:,0], coordinates[:,1], c=y);
plt.show()
Is it right to use Kmeans for location clustering, as it uses Euclidean distance and not Haversine formula as a distance function?