I am just curious to know, what distance metric would the initial call for the clustering method would take. The documentation says that it would by default take the euclidean distance.
class sklearn.cluster.DBSCAN(eps=0.5, min_samples=5, metric='euclidean', algorithm='auto', leaf_size=30, p=None, random_state=None)[source]
Would that mean, the initial clusters are formed by the euclidean dist by taking lat/long data?
When I run your function reverse_geocode to get the geocode_data from latlng as df['geocode_data'] = df['latlng'].map(reverse_geocode)
all the results of geocode_data are emplty, which mean that there is no returned object.
When I change number of samples to 20 in the code,
db = DBSCAN(eps=epsilon, min_samples=20, algorithm='ball_tree', metric='haversine').fit(np.radians(coords))
I am getting the error, IndexError: list index out of range on the line in get_centermost_point(cluster)
----> 2 centroid = (MultiPoint(cluster).centroid.x, MultiPoint(cluster).centroid.y)
Was wondering if there was an easy way to modify the output file for the clustering script to modify the input file and show the centroid lat/lons that are assigned to the original lat/lons and possibly assign IDs to those centroid lat/longs (i.e. - Original Lat | Original Lon | Centroid Lat | Centroid Lon | Cluster ID (1,2,3,etc.))