Skip to content
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

Gtfs time zone handling #2457

Merged
merged 30 commits into from
Apr 24, 2023
Merged

Gtfs time zone handling #2457

merged 30 commits into from
Apr 24, 2023

Conversation

lauriemerrell
Copy link
Contributor

@lauriemerrell lauriemerrell commented Apr 4, 2023

Description

This PR adds timezone localization information to GTFS schedule data:

  • Adds feed_timezone in all schedule dimension tables (suppressed from open data publishing)
  • Adds trip_start_timezone and trip_end_timezone to int_gtfs_schedule__stop_times_grouped and fct_daily_scheduled_trips
  • Adds trip-localized and Pacific Time trip start and end times as DATETIMEs in fct_daily_scheduled_trips
  • Uses service_date as the date summary level for stops, shapes, and daily schedule service summary per discussion in Slack with @tiffanychu90 and @edasmalchi
  • Some assorted cleanup: fixes some existing table documentation
  • Fixes daylight savings handling: service_date should not be cast directly to a timestamp (i.e. midnight); it is explicitly defined as starting from noon minus 12 hours to handle daylight savings

Follow-ups:

Resolves #2348

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) -- changes date columns but relevant downstream places have been updated
  • Documentation
  • agencies.yml

How has this been tested?

Have run & tested affected tables locally. Looked specifically at daylight savings day service to confirm new implementation works.

Screenshots (optional)

@lauriemerrell
Copy link
Contributor Author

lauriemerrell commented Apr 20, 2023

Waiting on feedback on which date value to use for fct daily scheduled stops/shapes, once I can implement that, this will be good to go, unless it seems worth it to do RT date changes as part of this. I am conflicted about how to handle the nexus of this, #2413, and #2471.

Copy link
Contributor

@atvaccaro atvaccaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comprehensive docs 📖

Copy link
Contributor

@atvaccaro atvaccaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty ty

@lauriemerrell lauriemerrell merged commit 3e99864 into main Apr 24, 2023
@lauriemerrell lauriemerrell deleted the gtfs-time-zone-handling branch April 24, 2023 17:25
@lauriemerrell lauriemerrell mentioned this pull request Apr 24, 2023
5 tasks
lauriemerrell pushed a commit that referenced this pull request Apr 24, 2023
@lauriemerrell lauriemerrell mentioned this pull request Apr 25, 2023
5 tasks
lauriemerrell pushed a commit that referenced this pull request Apr 28, 2023
lauriemerrell pushed a commit that referenced this pull request May 5, 2023
lauriemerrell added a commit that referenced this pull request May 8, 2023
* add intervals and seconds to dim frequencies

* wip -- trip summary

* update stop times after #2457 merged

* working expanded frequencies, wip yaml

* clean up yaml

* clean up comments

* update yaml and rename some cols

* cleanup

* frequency based trips in stop times grouped

* frequency based trips in fct daily scheduled trips

* add frequencies to daily stops

* remove erroneous comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fct_daily_scheduled_trips should handle feed time zone
2 participants