metrics-mvp icon indicating copy to clipboard operation
metrics-mvp copied to clipboard

[Draft] Changes needed to add TTC

Open EddyIonescu opened this issue 5 years ago • 0 comments

Makes progress on adding TTC. Improves error messages for adding future agencies.

Proposed changes

  • Replacing the default TRYNAPI_URL is required for running compute_new.py locally; however the error thrown when it is not doesn't suggest this. This PR catches the trynapi request error in trynapi.py and prints an error message that says it could not connect to TrynAPI and asks whether the environment variable was provided and exits. The stacktrace resulting from raising there is very long and not very useful, so it seems reasonable to simply exit.

  • Tolerance for broken stop geometry is increased from 100 to 300 metres, as to account for route terminals that are moved without the geometry being updated. In the image below the stop was moved farther back as the airport decided that Uber/Lyft needed more space near the arrivals hall. IMG_3617

  • Skipping over the route's geometry resulted in the dashboard being all grey as the initial metrics API call failed due to an exception thrown in the average speed calculation as the geometry for a stop was missing. Now save_routes.py raises an exception if the stop geometry is bad, which has not caused issues for Muni, Trimet, or TTC.

  • Continue working on the config for TTC, this PR adds one route and changes the start time for the overnight bus routes.

  • Implement #574, which adds custom default directions, allowing east-west routes to be specified in less lines than custom_directions would require.

...

Link to demo, if any

https://eddy-opentransit.herokuapp.com (will be pre-computed when #423 is resolved) ...

EddyIonescu avatar Feb 22 '20 06:02 EddyIonescu