-
Notifications
You must be signed in to change notification settings - Fork 184
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 Fares v2] Add rider_categories.txt #511
base: master
Are you sure you want to change the base?
Conversation
| ------ | ------ | ------ | ------ | | ||
| `rider_category_id` | Unique ID | **Required** | Identifies a rider category. | | ||
| `rider_category_name` | Text | **Required** | Rider category name as displayed to the rider. | | ||
| `is_default_fare_category` | Enum | **Required** | Specifies if an entry in [rider_categories.txt](#rider_categoriestxt) should be considered the default category (i.e. the main category that should be displayed to riders). For example: Adult fare, Regular fare, etc. Valid options are:<br><br>`0` or empty - Category is not considered the default.<br>`1` - Category is considered the default one.<br><br>When multiple rider categories are eligible for a single fare product specified by a `fare_product_id`, there must be only one of these rider categories indicated as the default rider category (`is_default_fare_category = 1`). | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a bit clearer (as well as in the definition for fare_products.rider_category_id
), should it be "there must be at most one" or "there must be exactly one"? In other words, should it be permissible to not have any categories as is_default_fare_category = 1
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the idea is that multiple entries in rider_categories.txt
may have is_default_fare_category = 1
. However, when a fare_product_id
in fare_products.txt
references multiple rider_category_id
s, exactly one of these referenced rider_category_id
s must have is_default_fare_category = 1
. When entries in the fare_products.txt
and rider_categoies.txt
files exist, it is not allowed to have no categories set as is_default_fare_category = 1
.
Does it look clearer if we just modify the sentence from
there must be only one of these rider categories indicated as the default rider category (
is_default_fare_category = 1
).
to
there must be exactly one of these referenced rider categories indicated as the default rider category (is_default_fare_category = 1
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @tzujenchanmbd, the explanation makes a lot of sense, I think in my initial reading I missed the context that this was among those rider categories filtered for a specified fare product ID.
I like your proposed clarification, though might suggest changing "referenced" to "eligible" to make even more clear which rider categories we're talking about.
gtfs/spec/en/reference.md
Outdated
|
||
Used to describe the range of fares available for purchase by riders or taken into account when computing the total fare for journeys with multiple legs, such as transfer costs. | ||
|
||
| Field Name | Type | Presence | Description | | ||
| ------ | ------ | ------ | ------ | | ||
| `fare_product_id` | ID | **Required** | Identifies a fare product or set of fare products.<br><br>Multiple records in [fare_products.txt](#fare_productstxt) may share the same `fare_product_id`, in which case all records with that ID will be retrieved when referenced from another file.<br><br>Multiple records may share the same `fare_product_id` but with different `fare_media_id`s, indicating various methods available for employing the fare product, potentially at different prices. | | ||
| `fare_product_id` | ID | **Required** | Identifies a fare product or set of fare products.<br><br>Multiple records in [fare_products.txt](#fare_productstxt) may share the same `fare_product_id`, in which case all records with that ID will be retrieved when referenced from another file.<br><br>Multiple records may share the same `fare_product_id` but with different `fare_media_id`s, indicating various methods available for employing the fare product, potentially at different prices.<br><br>Multiple records may share the same `fare_product_id` but with different `rider_categories_id`s, indicating multiple rider categories are eligible for the fare product, potentially at different prices. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think there’s an opportunity here to clarify both existing language and new language around what is permitted with shared fare_product_id
s. Would the following language be an improvement, and does it accurately describe what is allowed?
Multiple records sharing the same
fare_product_id
are permitted as long as they contain differentfare_media_id
s orrider_category_id
s. Differingfare_media_id
s would indicate various methods are available for employing the fare product, potentially at different prices. Differingrider_category_id
s would indicate multiple rider categories are eligible for the fare product, potentially at different prices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the suggestion @westontrillium!
This looks great to me - changes on 8068e8c
The
rider_categories.txt
file is part of the GTFS-Fares v2 proposal, aimed at modeling rider categories that are eligible for certain fares.In the August and September meetings, the working group reached the following consensus:
rider_category_id
will be referenced infare_products.txt
min_age
andmax_age
fields for nowChanges in this PR
rider_categories.txt
filefare_products.rider_category_id
field and update the primary key offare_products.txt
fare_product_id
For previous discussions please see the working group meeting note
Comments and questions welcome!
Side note: Currently the fares working group is primarily discussing fare use cases. However, in the future this file may be used for use cases such as service eligibility.