OneBusAway / onebusaway-application-modules

The core OneBusAway application suite.
https://github.com/OneBusAway/onebusaway-application-modules/wiki
Other
212 stars 133 forks source link

Add support for OccupancyStatus GTFS-rt field #121

Open barbeau opened 9 years ago

barbeau commented 9 years ago

OccupancyStatus is now an "experimental/proposed" GTFS-realtime field, as discussed on the gtfs-realtime list.

Here’s an explanation of the enumeration values: https://groups.google.com/forum/#!msg/gtfs-realtime/_HtNTGp5LxM/0mvvEW1WuMMJ

...and the same text inline, for convenience:

 enum OccupancyStatus {
    // The vehicle is considered empty by most measures, and has few or no
    // passengers onboard, but is still accepting passengers.
    EMPTY = 0;

    // The vehicle has a relatively 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.
    MANY_SEATS_AVAILABLE = 1;

    // The vehicle has a relatively 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 feed producer.
    FEW_SEATS_AVAILABLE = 2;

    // The vehicle can currently accommodate only standing passengers.
    STANDING_ROOM_ONLY = 3;

    // The vehicle can currently accommodate only standing passengers
    // and has limited space for them.
    CRUSHED_STANDING_ROOM_ONLY = 4;

    // The vehicle is considered full by most measures, but may still be
    // allowing passengers to board.
    FULL = 5;

    // The vehicle is not accepting additional passengers.
    NOT_ACCEPTING_PASSENGERS = 6;
  }

We should consume this data and expose it via the OBA REST API.

We should have a live GTFS-rt feed with this field within the next few weeks - see https://github.com/CUTR-at-USF/bullrunner-gtfs-realtime-generator/issues/4.

drabell commented 9 years ago

@barbeau Dear Sean,

  1. Proposed Vehicle Occupancy Status enumeration would be a valuable addition to the vehicle monitoring real-time data feed. It may be also worthy to consider adding certain quantitative metrics extending the suggested "qualitative" enum, like Bus Maximum Occupancy and Bus Actual Occupancy.
  2. You may also consider implementing the real-time "upstream" that allows crowdsourcing data aggregation pertinent to the stops' crowd population/density estimates, i.e. adding commuters waiting metrics (the info to be sent by authorized commuters-participants, and/or by automated stop's supervision system utilizing some sort of real-time crowd population/density estimation tech). Thanks and regards, Alex
barbeau commented 9 years ago

@drabell I wanted more quantitative measures in GTFS-rt for occupancy (one reason being the underlying data we get from the Bull Runner AVL system is percentage [0-100]), but others (including Google) did not. See https://groups.google.com/forum/#!topic/gtfs-realtime/_HtNTGp5LxM for the full discussion. We settled just on these enumerations.

I agree that crowdsourcing other metrics (on-vehicle occupancy, stop waiting occupancy) would also be useful. Other systems that do something similar for vehicle occupancy are Moovit and CMU's Tiramisu. I'm personally open to this being included in OBA, but its outside the current scope of our (i.e., USF's) work. So, I'm open to pull requests that propose/implement something, but not likely something we'll tackle in the immediate future, unless someone decides to fund that concept specifically :).