Skip to content

[GTFS Fares v2] Add rider_categories.txt#511

Merged
tzujenchanmbd merged 3 commits intogoogle:masterfrom
MobilityData:rider_category
Feb 21, 2025
Merged

[GTFS Fares v2] Add rider_categories.txt#511
tzujenchanmbd merged 3 commits intogoogle:masterfrom
MobilityData:rider_category

Conversation

@tzujenchanmbd
Copy link
Copy Markdown
Collaborator

@tzujenchanmbd tzujenchanmbd commented Oct 16, 2024

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 in fare_products.txt
  • Not include min_age and max_age fields for now
  • Add a field to indicate the default rider category

Changes in this PR

  • Add rider_categories.txt file
  • Add fare_products.rider_category_id field and update the primary key of fare_products.txt
  • Add content to the description of 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.

@tzujenchanmbd tzujenchanmbd added GTFS-Fares Issues and Pull Requests that focus on GTFS-Fares Extension Change type: Functional Refers to modifications that significantly affect specification functionalities. Support: Needs Review labels Oct 16, 2024
@tzujenchanmbd tzujenchanmbd linked an issue Oct 16, 2024 that may be closed by this pull request
@tzujenchanmbd
Copy link
Copy Markdown
Collaborator Author

Quick updates:

@sberkley
Copy link
Copy Markdown

sberkley commented Jan 9, 2025

Nice. Sound Transit has a semi-complete production of Fares v2 data that we'll be making fully complete in the next couple months. We can add rider_categories.txt as well since it applies to several of our fare products.

@drewda
Copy link
Copy Markdown

drewda commented Jan 9, 2025

Hi @tzujenchanmbd, the SF Bay Area Regional Feed includes a rider_categories.txt file:

rider_category_id,rider_category_name,min_age,max_age,eligibility_url
adult,Adult (18-65),18,65,
adult-2,Adult,,,
youth,Youth (5-18),5,18,
youth-2,Youth (6-18),6,18,
child,Child (Under 5),0,4,
child-2,Child (Under 6),0,5,
smd,Senior,65,,
smd,Person with disabilities,,,
smd,Medicare recipient,,,
smdy,Senior,65,,
smdy,Person with disabilities,,,
smdy,Medicare recipient,,,
smdy,Youth,5,18,
AM:discount,Capitol Corridor (Disabled),,,https://www.capitolcorridor.org/disabled-passenger-discount/
AM:discount,Capitol Corridor (Senior),62,,https://www.capitolcorridor.org/senior-discounts/
MA:muir-youth,Marin Transit (15 and under),,15,
SR:veteran,Santa Rosa CityBus (U.S. Veteran),,,https://srcity.org/1658/Fares
ST:super-senior,SolTrans (Super Senior),80,,
AF:senior,Angel Island Tiburon Ferry (Senior),65,,
AF:child,Angel Island Tiburon Ferry (Child),6,12,
AF:small-child,Angel Island Tiburon Ferry (Small Child),3,5,
AF:toddler,Angel Island Tiburon Ferry (Toddler),,2,
AF:adult,Angel Island Tiburon Ferry (Adult),13,64,

@tzujenchanmbd
Copy link
Copy Markdown
Collaborator Author

Thanks @sberkley & @drewda!

@drewda any plan to update the file to include the is_default_fare_category field?

@drewda
Copy link
Copy Markdown

drewda commented Jan 14, 2025

@tzujenchanmbd yes, we can add the is_default_fare_category column when this PR is adopted

Also in case it's useful to others, we maintain a list of the Fares-v2 tables in the SF Bay Area Regional Feed, which we can update as the remaining proposed tables are adopted: https://www.interline.io/blog/mtc-regional-gtfs-feed-fares-updates/#gtfs-fares-v2-base-implementation-and-future-additions-to-the-specification

@gcamp
Copy link
Copy Markdown
Contributor

gcamp commented Jan 27, 2025

Support for is_default_fare_category has been added in the latest version of Transit (5.17.9), I think this proposal can be open for a vote.

@jll01
Copy link
Copy Markdown

jll01 commented Jan 28, 2025

In the Transit app, the is_default_fare_category property is now used to automatically select the appropriate rider_category for fare calculations. This functionality is already in production for TriMet.

As demonstrated in the provided screenshot, the ADULT category is prioritized and selected over the HONORED_CITIZEN and YOUTH categories when displaying cEMV fares.

transitapp_trimet_default_rider_cat]

@tzujenchanmbd
Copy link
Copy Markdown
Collaborator Author

tzujenchanmbd commented Jan 30, 2025

Thanks @jll01 @gcamp !

We have at least one producer: TriMet. Their feed could be downloaded at https://developer.trimet.org/GTFS.shtml
We have at least one consumer: Transit. Please see the screenshot provided by @jll01.

As per the GTFS amendment process, the requirements to open a vote are met.
We are opening a vote for adding rider_categories.txt.

Voting ends on 2025-02-13 at 23:59:59 UTC.

@isabelle-dr isabelle-dr added the Vote to Test Community votes to determine whether the proposal is ready for testing. label Jan 30, 2025
@m-mcqueen
Copy link
Copy Markdown

+1 TriMet!

@m-mcqueen
Copy link
Copy Markdown

Thanks @jll01 @gcamp !

We have at least one producer: TriMet. Their feed could be downloaded at https://developer.trimet.org/GTFS.shtml We have at least one consumer: Transit. Please see the screenshot provided by @jll01.

As per the GTFS amendment process, the requirements to open a vote are met. We are opening a vote for adding rider_categories.txt.

Voting ends on 2025-02-13 at 23:59:59 UTC.

C-TRAN is also publishing rider_categories.txt now.

https://mail.c-tran.com/about-c-tran/business/c-tran-gtfs-data

@evansiroky
Copy link
Copy Markdown
Contributor

+1 Caltrans. 🚌

@drewda
Copy link
Copy Markdown

drewda commented Jan 31, 2025

+1 from @interline-io

@jll01
Copy link
Copy Markdown

jll01 commented Feb 3, 2025

+1 from Transit

@miklcct
Copy link
Copy Markdown
Contributor

miklcct commented Feb 6, 2025

+1 from Aubin

@jfabi
Copy link
Copy Markdown
Contributor

jfabi commented Feb 6, 2025

+1 from the @mbta

@westontrillium
Copy link
Copy Markdown
Contributor

+1 Trillium!

@tzujenchanmbd tzujenchanmbd removed Vote to Test Community votes to determine whether the proposal is ready for testing. Support: Needs Review labels Feb 18, 2025
@tzujenchanmbd
Copy link
Copy Markdown
Collaborator Author

The vote passed on 2025-02-13 at 23:59:59 UTC.

7 votes in favour and no votes against.

Votes came from:
TriMet (@m-mcqueen)
Caltrans (@evansiroky)
Interline-io (@drewda)
Transit (@jll01)
Aubin (@miklcct)
MBTA (@jfabi)
Trillium (@westontrillium)

Thank you to everyone who participated!

@tzujenchanmbd tzujenchanmbd added this to the GTFS-Fares v2 milestone Feb 18, 2025
@emmambd
Copy link
Copy Markdown
Collaborator

emmambd commented Mar 12, 2025

As an update, validation rules for rider categories have been added to the Canonical GTFS Schedule Validator release this week: https://github.com/MobilityData/gtfs-validator/releases/tag/v7.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Change type: Functional Refers to modifications that significantly affect specification functionalities. GTFS-Fares Issues and Pull Requests that focus on GTFS-Fares Extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add rider_category_id to fare_products.txt