Validating Availtec’s Bus Arrival Estimates

In my last post, I created a dashboard that shows the estimated arrival time of buses at specific stops. After using it, I was curious to see how accurate those estimates are.

So I have created a new project:

availtec-estimate-validation

As always, everything is opensource and available on my github page.

This project consists of two parts:

  1. A capture script that queries Availtec’s API every 30 seconds for the estimated arrival time and stores them in a local database
  2. A graph script that generates pretty visualizations from the captured data.

Here is an example of the Route 44 Inbound at St. Vincents Hospital for Birmingham, AL’s transit system.

Route 44 Estimates

Each “block” is a bus trip throughout the day. The dark black line represents the actual time the bus arrived at this stop. The dark blue line shows when Availtec estimated the bus would arrive at that specific time.

Ideally, the dark blue line would be as close as possible to the dark black line.

From the image above, we can see that the 4th trip, from 10:44:17 to 10:46:17 had the best estimate. From 10:00am to 10:50am, Availtec estimated the bus would arrive ±30 seconds from when it actually did.

We can also see that the trip after it, had the worst estimate. From the time the trip started, just before 10:50, until around 11:20, Availtec was estimating the bus would arrive at 11:32, when it actually came at 11:38. It wasn’t until about 11:25, that the system suddenly corrected and started estimating a more realistic time.

This project works with any bus system that utilizes Availtec for real time tracking. You can leave the capturer program running in the background for days, then generate graphs based on that historical data. The graphing script allows you to specify which stops, routes, and days to plot.

Announcing Realtime Bus Tracking for Smashing Dashboard

I recently set up a raspberry pi to use as a smart dashboard on my TV. The goal is to turn on my TV and have weather, my calendar, todo list, and other useful widgets readily available. Instead of building my own, I decided to use the Smashing Dashboard, a fork of the original Dashing developed by Shopify. It is a nice looking, simple dashboard and can easily be extended with lots of widgets.

One widget that I really needed is the ability to see when the next bus arrives at the stop down the street from me. Birmingham, Alabama’s bus system uses Availtec, which has an API for getting the real time location of the bus along with the estimated arrival times at a stop. Using this, I wrote a new widget for smashing called smashing-availtec. It should work with any transit system powered by Availtec. Here is what it looks like:

Real time bus tracking with Smashing Dash Board

Since there are multiple stops I want to monitor, my widget allows creating multiple widgets, and having each widget filter for a specific stop and route (in case multiple routes go through the same stop). It will give an estimated time of arrival for the next two buses and will also how a live map of where the next bus is.

Instructions for getting the source code and configuring it are available on my github project page. Enjoy!