Simplify enum for occupancy, add occupancy_percentage#2
Merged
gcamp merged 12 commits intooccupancy_v2from Apr 9, 2020
Merged
Conversation
juanborre
reviewed
Apr 8, 2020
Co-Authored-By: Juan <juanborre@users.noreply.github.com>
Co-Authored-By: Juan <juanborre@users.noreply.github.com>
Co-Authored-By: Juan <juanborre@users.noreply.github.com>
Co-Authored-By: Juan <juanborre@users.noreply.github.com>
barbeau
reviewed
Apr 9, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OccupancyStatus was added 6 years ago as an experimental field to the GTFS-rt spec. Multiple producers and consumers have adopted the value but the implementation has currently some problems.
The enum of
occupancy_statushas 7 values, however we've seen that the range of values is not used in practice. We've seen consumer mostly use 3 values to represent the entire range of occupancy. For example :MANY_SEATS_AVAILABLE,FEW_SEATS_AVAILABLEandSTANDING_ROOM_ONLY.EMPTYandNOT_ACCEPTING_PASSENGERS. However, the agency suggest to never display more than 3 textual values for the consumer facing message. More granularity can be provided with colors.FEW_SEATS_AVAILABLE,STANDING_ROOM_ONLY,FULL.For this reason I would suggest to only give 3 values in the enum.
FEW_SEATS_AVAILABLE,STANDING_AVAILABLE,FULL. The naming changed slightly to reflect the same 3 values available in SIRI.However, we do lose a lot of granularity of how fine the occupancy value can be provided. To alleviate this problem I would suggest to add a second value
occupancy_percentageto give a more accurate value of occupancy.It would be percentage value representing the degree of passenger occupancy of the vehicle. The values are represented as an integer without decimals. 0 means 0% and 100 means 100%. The value 100 should represent the total maximum occupancy the vehicle was designed for, including both seated and standing capacity. It is possible that the value goes over 100 if there are currently more passengers than what the vehicle was designed for.
It was decided to have both values because they fulfill two different purpose.
occupancy_statusis provided to give a understandable value for the user (STANDING_ROOM_ONLYis way more understandable for a user than 50% full).occupancy_percentageis provided to give more granular data.