-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User Story: Python dbt model to produce shape-stop grain table #2237
Comments
I think we'll have to take a really close look at this. I can think of a few examples of when this would not be true -- for example a route where one trip in a particular direction deviates to serve a high school around dismissal time, then resumes the route and serves all remaining stops. It seems possible that those remaining stops would have a shifted (or even completely different) My first thought is that making a table like this at the Totally get why a table like this would be helpful, but it also seems to involve assumptions beyond what we can rely on from the GTFS spec since my read is that stop sequence relationships are only required to be consistent within the individual trip (hence the cumbersome joins). Curious to see the results of the EDA (or even participate if the timing works out post-Better Buses). Perhaps one middle ground would be to make this table without |
@edasmalchi Good point, I'll open up a research task to dive into what exactly is happening with |
Conclusion: cannot go above shape-level if we want to use Changing this to shape-stop_id grain table, which can support the stop-to-stop segments. |
Closing....punt this task to the future, we have what we need in |
User stories
Summary
Use this issue to test out Python dbt models to cut stop-to-stop segments. Additional RT v2 Speeds Roadmap context.
Can these Python scripts to prep_stop_segments and
cut_stop_segments be adapted directly?
Table Schema
Grain:feed_key-route_id-shape_id-stop_id
Identifier columns:shape_array_key
,service_date
,stop_id
,stop_sequence
Drop duplicates on above.Is it ever possible thatstop_id
has differentstop_sequence
values for different routes? It seems possible that it can have different values acrosstrips
, but hopefully by accounting for route and direction, the samestop_id
only has 1 stop sequence value. Exploratory Finding: yes, it can. Atshape_id
level,stop_id-stop_sequence
is unique combo, but not anything more aggregated thanshape_id
Potential use cases:Tester [Stakeholder]
Sprint Ready Checklist
The text was updated successfully, but these errors were encountered: