For certain routes, the first "event" of the trip is a departure from a stop with a stop_id=None. Wicked spooky! Here's an example of a Green line train departing from who-knows-where before arriving to Riverside:
17 was able to fix this particular issue and we are now returning sane behavior on the Blue, Orange, and most Green lines (besides the D). We might need to try a more subtle trick later if we want to start picking up/intuiting stop_id's for Null events, and this can benefit gobble as well.
For certain routes, the first "event" of the trip is a departure from a stop with a
stop_id=None
. Wicked spooky! Here's an example of a Green line train departing from who-knows-where before arriving to Riverside:We want to ensure that the first event of any given trip is an ARRIVAL into a sensible stop (like Wonderland on the Blue.) It's pretty important because these are the first/last stops of their respective lines, and this can really screw over the
route_starts
calculations in this line https://github.com/transitmatters/mbta-performance/blob/a03170700e41d55b7e43d771b54787249f7c46b5/mbta-performance/chalicelib/lamp/ingest.py#L170