tonywchen / toronto-traffic

0 stars 0 forks source link

model ttc routes from trip data #7

Closed tonywchen closed 3 years ago

tonywchen commented 3 years ago

This is a fix for #4

The changes here use existing trip data to model actual TTC routes and adjacent stops, which is more desirable than the incomplete route data from Nextbus. The idea is that, when fetching predictions from NextBus, the predictions show a list of stops (not just the immediate one but all subsequent ones up to a limit) and the expected amount of time it would take to arrive at each of those stops. The list is a great source of adjacent stops and their relative duration from each other. By aggregating all those data, it is possible to model a graph structure of the stops and hence the actual routes.

The following steps were taken to make this work:

The resulting data then are used to validate existing paths: