Python code to cluster geographical locations(long/lat) which are within 30 min of commute to each other? : I am trying to cluster geographical locations(long / lat) where the distance between data points in a cluster should be less than or equal to 30 min from each other. I can calculate duration between two points using google map api. How can I cluster those sites which are within 30 minutes commute from each other ?