afimb/gtfslib-python

Add stop clustering

laurentg opened this issue · 1 comments

When doing data analysis, one want to see data aggregated by "station" (a restricted geographical zone containing several stops). But some GTFS data do not aggregate stop into stations; or stops comes from various different GTFS. So stop spatial proximity is not always encoded in the data in an easy and accessible way.

The idea is to add a utility function/class to cluster close stops into a "stop cluster", bypassing the notion of "station". Every set of stop where two stops are closer than a certain limit is bundled together in a cluster.