cluster_and_update

bandicoot.helper.stops.cluster_and_update(records, group_dist=50, eps=100)

Update records, by clustering their positions using the DBSCAN algorithm. Returns a dictionnary associating new antenna identifiers to (lat, lon) location tuples.

Note

Use this function to cluster fine-grained GPS records.

Parameters:
records : list

A list of Record objects ordered by non-decreasing datetime

group_dist : float, default: 50

Minimum distance (in meters) to switch to a new stop.

eps : float, default: 100

The eps parameter for the DBSCAN algorithm.