kylebarron / all-transit

Interactive visualization of all transit in the Transitland database
https://all-transit.com
MIT License
26 stars 2 forks source link

First try matching against RouteStopPattern #26

Closed kylebarron closed 4 years ago

kylebarron commented 4 years ago

I match ScheduleStopPairs against Routes instead of RouteStopPatterns because while manually looking through a few of them, the RouteStopPattern on the SSP was null. However it would be better if you first tried matching against the RouteStopPattern and only matched against the Route as a fallback.

When matching to Routes, sometimes the SSP is matched to the wrong direction of the Route. Usually that doesn't matter but with highways or any place where the route is different in each direction, it can look like the bus is driving on the wrong side of the road. For example: https://all-transit.com/#13.53/47.53084/-122.29016 image

kylebarron commented 4 years ago

From the US data:

sqlite> SELECT COUNT(*) from ssp WHERE route_stop_pattern_onestop_id = '';
12531804
sqlite> SELECT COUNT(*) from ssp;
93228527

So the route_stop_pattern is missing for about 13.4%