rectangle-dbmi / Realtime-Port-Authority

Realtime transit tracker of Pittsburgh's Port Authority buses using the realtime PAT API using Google Maps to Display the Maps
GNU General Public License v3.0
60 stars 33 forks source link

More info in bus dialog #137

Open sgdoerfler opened 9 years ago

sgdoerfler commented 9 years ago

In 2.95B, the bus dialog shows the next few stops and estimated arrival times. Apart from the name of the next stop, this isn't terribly useful info. The times are nearly always in the next few minutes, and saying "this stop in 2 minutes, that one in 3" suggests an accuracy that the system can't really deliver, what with red lights and such.

Here's some info that I'd find more useful in this dialog, if it could be added.

  1. Times for more distant stops. For instance, when do you predict this 61C will get to Oakland? To downtown? If PAT's data says which stops are designated as timepoiints on the route (and get a column on the printed schedule), please include times for those stops, plus the next stop the bus is approaching. No need to include the next few after that. Also, please add "(in 8 minutes)" next to the times, so we don't have to subtract.
  2. Showing the bus's speed was occasionally helpful; it let me see if a bus was stopped at a light or just happened to be passing through it at that moment. Please bring that back. (It would be even more helpful if the dialog updated all its info as new real-time data was available, instead of making me tap Looks Good and go find the bus again, but I guess that was only possible with the former info window.)
  3. Add info on next and previous buses. "Next 61C is 12 minutes behind this one. Previous 61C is 8 minutes ahead of this one." Knowing about upcoming buses lets you decide if it's OK to wait for a less-crowded bus. Knowing about the last bus helps you judge in advance how crowded this one will be. (Ideally, the app would understand how 61A-D, for example, all share the same partial route, and also tell you about the next bus that shares the same partial route as the one you selected. "Next outbound bus headed to Forbes at Murray, 61A, in 13 minutes. Next outbound bus headed to Brownsville Rd opp Parkway Blvd, 61D, in 16 minutes." It would figure out where the routes split off, and show alternatives to get to that point.)
  4. I'd often like to get an idea of how far off schedule the buses are running at the moment. It would be great if the app could add "(23 minutes late)" or "(2 minutes early)" when displaying time predictions. I think each bus knows how far off schedule it is, and displays it to the driver, but I'm not sure if it transmits this info.
RitwikGupta commented 9 years ago

We can't do 3 and 4 unfortunately due to API limitations. We could partially do 4 by telling you if the bus was delayed or not.

RitwikGupta commented 9 years ago

Also, the predictions may not be terribly useful now because there is not traffic, but the predictions do take red lights and traffic into account.

sgdoerfler commented 9 years ago

Red lights: I meant that the predictions don't have real-time info on traffic light cycles (as far as I know!), only historical probabilities. So they'll know that it takes 60 seconds on average to get through a certain light, but won't know if a specific bus is going to hit a green and go right through, or miss it and wait 2 minutes for the next. As a result, the actual arrival time of a bus that's just a few lights away can vary by a minute or two based on circumstances the prediction system won't know. So it's best to treat many predictions as "10 minutes plus or minus 1 minute or so".

sgdoerfler commented 9 years ago

Re 4: Sounds like "bus is delayed" would be very useful info. :-)

sgdoerfler commented 9 years ago

Re 3: I think part of what I'm requesting wouldn't require any info that's not in the API, so let me explain it again, because I probably wasn't clear enough.

Say an outbound 61C is approaching Forbes and Murray when I click on its icon. I'd like to see "Next 61C is 4 minutes behind this one." I can get that info by going to PAT's real-time site and selecting that stop in its interface; it shows me a list of buses that will be stopping there. Something like:

61C: approaching 61A: 2 minutes 61B: 3 minutes 61C: 4 minutes 61A: 12 minutes

I see that The Tranisit App can also pull up similar info, by selecting a route and clicking the schedule icon (which unhelpfully merges real-time and scheduled data). So I think the needed info is in the API, for at least this most basic "next bus after this one on the same route" info.

Finding info on previous buses is harder; you'd have to look ahead N stops. Perhaps it's not worth bothering about.

sgdoerfler commented 9 years ago

To put it another way: When I click a bus stop, I'd like to see a list of the next N buses expected at that stop, and how long from now, just like I get when I select a stop on PAT"s real time web site interface. And when I select a bus, I'd like to see it locate the next stop for that bus, and then show the same info as above for that stop. (The other stuff I was describing was really just a way of filtering that list to make it more useful and shorter, but not filtering it is simpler and still very useful.)

epicstar commented 9 years ago
  1. Good point.... We'll have to go by hand manually to get all important bus stops.... This will definitely be implemented!
  2. We can try to bring the speeds back but it's unlikely. We would have to add the speed to the title of the marker.... or somehow have a static adapter. EDIT: I know a way to do it but it will take a day or two to do this.
  3. Definitely possible... However, if we are to do this, it'd be sometime in the future.
  4. Half of it is easy to do. We know what is delayed and what is not... However, they don't give us the bus stop schedules via api. We'd have to add the scheduled times to a database. In the near future, we can say if it's delayed or not but we'll have to start using db calls.
epicstar commented 9 years ago

To the last part.... That's where the dialog will come in handy. Most likely, we'll have the markers display the stops but will have a dialog open if you click the infowindow.

sgdoerfler commented 9 years ago

"We'll have to go by hand manually to get all important bus stops"

In theory, PAT already has this data for its web site's schedule tables, so you could get it via screen scraping (or maybe just asking them for it). But they name the stops slightly differently there, so that alternative could be tricky.

epicstar commented 9 years ago

Looks like we will be finally doing something about this.... However I want to see more of a bottom gravity fragment pop up at the bottom of the app and display stuff similar to how google maps does things.