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

Rename fare_zone_id column #546

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

r-akemii
Copy link
Collaborator

@r-akemii r-akemii commented Jun 21, 2024

In this PR we rename the variables fare_zone_id and fare_zones in stops and fare_zones transit tables, explaining its relation to stops.txt file in GTFS. We also remove an unnecessary column.

Modifications include:

  • renames transit_zone to zone_id in stops.sql and fixes documentation
  • renames fare_zone_id to transit_fare_zone in fare_zones.sql and stops.sql and fixes documentation
  • removes references to foreign key fare_zone_id in fare_rules.sql
  • fixes variable name in queries in transit/lib_gtfs.py and transit/transit_elements/stops.py
  • fixes tests in tests/aequilibrae/transit
  • fixes Coquimbo example to assign these modifications

@r-akemii r-akemii linked an issue Jun 21, 2024 that may be closed by this pull request
@r-akemii
Copy link
Collaborator Author

Hey @pedrocamargo, I want to check one thing with you before opening this PR. A couple of days ago I asked you if I couldn't remove the fare_zone table. You told me it was necessary because it associates the fare zones from stops with the TAZs, but we also have this same information in the stops table, i.e. we have the same information in two different tables. My question is: can we make it simple and keep this info in only one table?

@pedrocamargo pedrocamargo self-requested a review June 27, 2024 07:48
@pedrocamargo
Copy link
Contributor

This is wrong.

The fare zone should be transit_fare_zone (and appear in the fare AND stop table), while **zone_id ** should appear only in the stop table and contain the ZONE_ID for the zoning layer

@r-akemii r-akemii marked this pull request as ready for review July 4, 2024 16:02
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.

Rename fare_zone_id column in fare_zone table
2 participants