mattwigway / gtfsrdb

GTFSrDB is a tool to archive gtfs-realtime data to a database.
56 stars 24 forks source link

Add support for GTFS-rt occupancy #7

Open barbeau opened 7 years ago

barbeau commented 7 years ago

OccupancyStatus is 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;
  }

I'd like to add support for archiving the occupancy field.

We have a live GTFS-rt feed with this field for our USF Bull Runner shuttle:

barbeau commented 7 years ago

cc @jadorno