Closed yiyange closed 6 years ago
Similar question re: handling direction_id
column in:
https://github.com/kuanb/peartree/blob/8e4b6a71e22b69ac5f2b7f4a2ff5c7b5b92a2b88/peartree/parallel.py#L142-L149
It seems like if there are multiple points at which this decision needs to be made, then the decision should happen upstream. That is, at the very beginning of this processing, if there is not 100% coverage of direction ID, then we should remove/drop the column entirely.
@kuanb How about this ^^^
When working with a GTFS feed from Beaumont, CA,
pt.paths.generate_summary_graph_elements
erred and logged as below:It turns out that it is because
trips_and_stop_times
generated inroute_analyzer.generate_route_costs()
has adirection_id
but it is all NaN. Consequently, all average wait based on headway for each stop is NaN.Has
direction_id
but it is all NanAs a result, no valid wait time is generated.
However, the logic in
generate_wait_times()
makes a different decision abouttrips_and_stop_times
having nodirection_id
It just uses the all trips, no matter what direction, to get wait time at a given stop.
It seems that
direction_id
being NaN and having nodirection_id
are essentially the same. Can we also copytrips_and_stop_times
for the former case?