-
Notifications
You must be signed in to change notification settings - Fork 214
GTFS-Occupancies #240
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-Occupancies #240
Changes from all commits
be8a380
8b99ddf
720d897
d816fe9
12e6692
54ec83e
1ea4b35
716d192
cb183e7
6dcb9ea
4557902
d99a627
92a8b02
8eba8b9
51d273e
0b35ec6
b23784c
9e3200b
d28afc3
f2ea4cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -24,6 +24,7 @@ This document defines the format and structure of the files that comprise a GTFS | |||||||
| - [transfers.txt](#transferstxt) | ||||||||
| - [pathways.txt](#pathwaystxt) | ||||||||
| - [levels.txt](#levelstxt) | ||||||||
| - [occupancies.txt](#occupanciestxt) | ||||||||
| - [translations.txt](#translationstxt) | ||||||||
| - [feed\_info.txt](#feed_infotxt) | ||||||||
| - [attributions.txt](#attributionstxt) | ||||||||
|
|
@@ -95,6 +96,7 @@ This specification defines the following files: | |||||||
| | [frequencies.txt](#frequenciestxt) | Optional | Headway (time between trips) for headway-based service or a compressed representation of fixed-schedule service. | | ||||||||
| | [transfers.txt](#transferstxt) | Optional | Rules for making connections at transfer points between routes. | | ||||||||
| | [pathways.txt](#pathwaystxt) | Optional | Pathways linking together locations within stations. | | ||||||||
| | [occupancies.txt](#occupanciestxt) | Optional | Expected or usual in-vehicle occupancy levels. | | ||||||||
| | [levels.txt](#levelstxt) | **Conditionally Required** | Levels within stations.<br><br>Conditionally Required:<br>- **Required** when describing pathways with elevators (`pathway_mode=5`).<br>- Optional otherwise. | | ||||||||
| | [translations.txt](#translationstxt) | Optional | Translations of customer-facing dataset values. | | ||||||||
| | [feed_info.txt](#feed_infotxt) | Optional | Dataset metadata, including publisher, version, and expiration information. | | ||||||||
|
|
@@ -380,6 +382,31 @@ Describes levels in a station. Useful in conjunction with `pathways.txt`, and is | |||||||
| | `level_index` | Float | **Required** | Numeric index of the level that indicates its relative position. <br><br>Ground level should have index `0`, with levels above ground indicated by positive indices and levels below ground by negative indices.| | ||||||||
| | `level_name` | Text | Optional | Name of the level as seen by the rider inside the building or station.<hr>_Example: Take the elevator to "Mezzanine" or "Platform" or "-1"._| | ||||||||
|
|
||||||||
| ### occupancies.txt | ||||||||
|
|
||||||||
| File: **Optional** | ||||||||
|
|
||||||||
| Usual or expected in-vehicle occupancy levels. | ||||||||
|
|
||||||||
| Methods for occupancy forecasting used to populated `occupancies.txt` are not strictly specified. Beyond the guidelines given below, it is the responsibility of data producers to ensure that the data provided are meaningful. | ||||||||
|
|
||||||||
| For describing historical average occupancies, it is recommended that at least 4 weeks of occupancy data be averaged across each unique day of the week, and valid for up to 2 weeks thereafter in `occupancies.txt`. | ||||||||
|
|
||||||||
| | Field Name | Type | Required | Description | | ||||||||
| | ----- | ----- | ----- | ----- | | ||||||||
| | `trip_id` | ID referencing `stop_times.trip_id` | **Required** | Identifies a `trip_id` for which an occupancy level is described. | | ||||||||
sccmcca marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||
| | `stop_sequence` | ID referencing `stop_times.stop_sequence` | Optional | Identifies a `stop_sequence` along `occupancies.trip_id` for which an occupancy level is described.<br><br>Defined values in `occupancies.stop_sequence` will apply to subsequent `stop_times.stop_sequence` that are not defined in `occupancies.stop_sequence` for the same `trip_id`. | | ||||||||
| | `occupancy_status` | Enum | **Required** | Indicates the state of in-vehicle occupancy. This field refers to the GTFS Realtime [`OccupancyStatus`](http://gtfs.org/reference/realtime/v2/#enum-occupancystatus) enums. Valid options are:<br><br> `0` - **Empty**. The vehicle is considered empty by most measures, and has few or no passengers onboard, but is still accepting passengers. <br> `1` - **Many seats available**. The vehicle has a large percentage of seats available. What percentage of free seats out of the total seats available is to be considered large enough to fall into this category is determined at the discretion of the producer. <br> `2` - **Few seats available**. The vehicle has a small percentage of seats available. What percentage of free seats out of the total seats available is to be considered small enough to fall into this category is determined at the discretion of the producer. <br> `3` - **Standing room only**. The vehicle can currently accommodate only standing passengers. <br> `4` - **Crushed standing room only**. The vehicle can currently accommodate only standing passengers and has limited space for them. <br> `5` - **Full**. The vehicle is considered full by most measures, but may still be allowing passengers to board. <br> `6` - **Not accepting passengers**. The vehicle can not accept passengers. | | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For those who wish to provide objective historical values without the subjective categorizations, could we make this conditionally required with an option to use occupancy_percentage instead?
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even if one is officially adopted, I'd still request that both options be available in the static version. (Or, at the very least, we may choose to release both with one being treated as an experimental field.) |
||||||||
| | `monday` | Enum | **Required** | Indicates whether an occupancy level is valid for all Mondays in the date range specified by `occupancies.start_date` and `occupancies.end_date`. Valid options are: <br><br> `1` - The occupancy level applies for all Mondays in the date range.<br>`0` or empty - The occupancy level does not apply for all Mondays in the date range. | | ||||||||
| | `tuesday` | Enum| **Required** | Functions in the same way as `occupancies.monday` except applies to Tuesdays. | | ||||||||
| | `wednesday` | Enum| **Required** | Functions in the same way as `occupancies.monday` except applies to Wednesdays. | | ||||||||
| | `thursday` | Enum| **Required** | Functions in the same way as `occupancies.monday` except applies to Thursdays. | | ||||||||
| | `friday` | Enum| **Required** | Functions in the same way as `occupancies.monday` except applies to Fridays. | | ||||||||
| | `saturday` | Enum| **Required** | Functions in the same way as `occupancies.monday` except applies to Saturdays. | | ||||||||
| | `sunday` | Enum| **Required** | Functions in the same way as `occupancies.monday` except applies to Sundays. | | ||||||||
| | `start_date` | Date | **Required** | Start date of the date interval that the occupancy level is valid.<br><br>To define single dates, `start_date` and `end_date` may be the same. | | ||||||||
| | `end_date` | Date | **Required** | End date of the date interval that the occupancy level is valid.<br><br>To define single dates, `start_date` and `end_date` may be the same. | | ||||||||
| | `start_time` | Time | **Conditionally Required** | First stop departure time for a given vehicle on a trip using `frequencies.txt`.<br><br>Must be some multiple (including zero) of `frequencies.headway_secs` plus `frequencies.start_time` for the corresponding time period.<br><br>Conditionally Required:<br>- **Required** for trips using `frequencies.txt`.<br>- **Forbidden** otherwise. | | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will get very complex. But do we want to do something like start_time end_time so for frequency based trips a producer could do occupancy time bands? Self-note to my future self: I just shot myself in the foot.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe I am missing something, but isn't
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @scmcca in frequency based operation only exact times will have some useful meaning for start_time.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This could be what I am missing. At the risk of sounding misinformed, why would it not work for
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that part is only possible heuristically, hence clamp to the nearest start_time. If that route is suggested that must be documented.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with @skinkie that specifying a start and end time to define a window is a more natural solution for exact_times=0 trips. For exact_times=1, you have specific trips instances that are defined in static GTFS where you can say "A bus is scheduled to arrive in 5 minutes", so start_time unambigously maps to a single trip instance. For exact_times=0 trips, static GTFS is just defining an expected frequency (not trip instances at specific times), so (without real-time data) you can only say "Vehicles are expected to arrive every 15 minutes" during this time window. The exact time that these trip instances are expected to occur drifts throughout the day depending on the previous trip instances, so defining just a start_time may get ambiguous. We would need defined heuristics in the spec of how specific cases would be handled. |
||||||||
|
|
||||||||
| ### translations.txt | ||||||||
|
|
||||||||
|
|
||||||||
Uh oh!
There was an error while loading. Please reload this page.