Go Raleigh + BusTime: Elevating Your Transit Experience 🚌🚀

Hey there transit enthusiasts, it’s been quite the ride this summer in Raleigh, NC, as the Go Raleigh transit agency decided to change things up in the real-time bus tracking game. They swapped out their trusty old TransLoc system for Clever Device’s BusTime. As a result, the Go Raleigh riders had to endure a brief hiatus in their real-time bus tracking experience.

But, guess what? I’m back in the driver’s seat, and after some serious detective work, I’m thrilled to announce that BusTime is now officially in the family of supported backends for the Go Transit App’s impressive Montclair system! 🎉

BusTime isn’t just any newcomer; it’s a proven player in the transit world, trusted by major agencies like the Chicago Transit Authority (CTA). In fact, my testing took me on a virtual tour of the Windy City, where CTA’s buses roll with the power of BusTime.

What’s even more exciting? This integration with BusTime paves the way for future expansion, potentially bringing our stellar transit tracking to even more cities down the road!

Now, let’s get technical. While Clever Device’s website may hide some of BusTime’s API details, fear not! CTA comes to the rescue with an excellent Developer Page offering access to API Keys and comprehensive API Documentation.

But wait, there’s more! Every feature you’ve come to rely on with Go Transit is fully supported through the BusTime API. This is especially good news for the residents of Raleigh, as it happens to be the city with the highest ridership.

As of the latest update, the Open Source software that powers Go Transit (Montclair) now boasts support for a diverse range of backends, ensuring a smooth ride:

  • Availtec
  • BusTime
  • GTFS-RT (Beta)
  • RouteShout
  • RouteShout v2
  • Transloc
  • Transloc v3

This comprehensive coverage guarantees that you’ll never miss your next bus, no matter which backend you prefer. So, whether you’re a loyal Go Raleigh rider or a transit aficionado eager to explore the wonders of BusTime, we’re here to meet your transit needs.

Stay tuned for more updates as we continue to enhance your transit experience. Thank you for your patience and loyalty – we look forward to serving you better than ever before! 🌟🚌🌟

Announcing Montclair for iOS and Android

I have taken my Montclair bus tracking web site and created an App for both Android and iOS that you can download for free in their app stores.

Montclair
Montclair
Developer: Marcus Dillavou
Price: Free

Montclair
Montclair
Developer: line72
Price: Free

This came about because I have been unhappy about how iOS handles progressive web apps. Every time the app is brought to the foreground, iOS does a full reload, which can be slow and annoying. The native app handles this much nicer, and doesn’t ever have to reload the state.

To build the native apps, I used this handy tool: Progress Web App Builder. It takes your website, wraps it using Cordova, and generates both an iOS and an Android project. With only a few tweaks, I was able to get them submitted to the app store.

API For Historical Bus Data

My previous blog post (Visualizing the On Time Performance of Birmingham’s Bus System) looked at creating visualizations based on the real time data provided for Birmingham, Alabama’s public transit system. I have now created a simple, public API that can be used to query the historical data captured from the real time system.

Using my dv8 scripts, I am capturing a snapshot of the real time data every 30 seconds. I am then storing this data in a sql database, so that we will have a historical database. This allows for generating reports and visualizations over time. As of writing this, I have about 2.5 months of data captured.

I am making all of this data public, along with a simple API for making queries. The API is located at:

https://api.dv8.line72.net/

 

However, if you visit that site, you will notice that you get a ‘Page Not Found’ error. That is because it is only a backend API, and you will need to construct URLS to make queries. Let’s look at a few sample queries (All data is returned in JSON format. I have found that making these queries in Firefox is preferred over Chrome, since Firefox will nicely format the results):

Query for all the routes:

https://api.dv8.line72.net/routes

This returned a list of all the known routes and their properties. Each route also has a set of “Trips”. A trip is a unique instance of a bus running along a route. For example, if everyday at 4.00pm a bus leaves Central Station along the route 44 and arrives at its final destination at 5.00pm, this would be a Trip. We can get a list of all the trips for a specific route.

Query for all the trips on the Route 44

Based on the previous query, I have found that the “44 Montclair” has an id of 21.

https://api.dv8.line72.net/route/21/trips

This returned all 61 trips associated with the route 44. Unfortunately, this doesn’t give us that much information about the individual trip. For instance, we have no idea based on the returned results what time of day a trip runs. For every trip, we can get a series of “Waypoints”. Waypoints are all the known information about a bus on a trip at a given time. They are essentially a snapshot, showing the location, passenger count, time deviation, and various other details. We can pick a specific trip and query it.

Query all Waypoints for a single trip on the Route 44

I am going to select a trip at random from the previous query. I will use 699, and will query its waypoints:

https://api.dv8.line72.net/route/21/trip/699/waypoints

This returned A LOT of data. This trip runs every weekday, and we have samples at every 30 seconds. The API returns a maximum of 1000 waypoints, so only the first part of the data was returned. Typically, we want to filter this data, and only get a specific range. For example, let’s only get the waypoints on a specific date. We can use the start_date and end_date parameters to put limits:

Filter the waypoints for a specific date:

https://api.dv8.line72.net/route/21/trip/699/waypoints?start_date=2017-09-05&end_date=2017-09-06

On this date, this trip was an Outbound (0) trip. It left Central Station at 11:45:00 AM and arrived at Eastwood Mall on time at 12:21:00 PM.

We have samples every 30 seconds of this trip. Using that, we could calculated the average on time performance or visualize the number of passengers on the bus. You can take this json data and convert it to CSV using a simple converter tool. You can then import your CSV into a spreadsheet program, like Excel or LibreOffice Calc and create visualizations.

For full documentation on the API including all the routes, parameters, and data types, a Swagger file is available. You can also view the documentation online.

Source Code

Th API was written in PHP using the SLIM framework. The source code is available on my dv8-api-server github project.

BJCTA Trip Planner now in sync with official data

My trip planner for the BJCTA Max buses (http://www.bjctatripplanner.org) along with my android app, are now in sync with the official data from the BJCTA. I will continue to keep my site in sync with their data, which means up to date and accurate data!

The app was not found in the store. 🙁

Weld Article On The BJCTA Bus System

Weld recently did a two part series on the status of the BJCTA Bus System. My trip planner was featured in the second part. You can read it online from the links below:

Part 1
Part 1

Part 2
Part 2

Part 1 is a very interesting look at the decline of the bus system since the 1950s and the turmoil and political games around transit in Birmingham. Part 2 takes a look at what is being done now to improve the system along with stories from riders who rely on the system.

Sightings of My App

Last night I was waiting on a bus in 5 points after some drinks with friends. Among the 12 of us who were waiting on a bus, I noticed two young girls, who we clearly not from Birmingham, looking at their phones to figure out what bus to ride to get back to their hotel near the convention center. As I looked over their shoulder, I saw they were using my App! That right there was enough to make me realize that all the work I’ve been doing for the last 1.5 years has been worth it! So, if you haven’t already, give the buses a try and use my app to help you.

 

BJCTA Bus Trip Planner

The app was not found in the store. 🙁

The app was not found in the store. 🙁

 

 

Updated Trip Planner with Route 41 – Fairfield

I have updated the trip planner for the BJCTA Max buses to include new routes. The 41 Fairfield has been completed. You can download the data off of the GTFS Data Exchange.

My Trip Planner already includes the latest data. Or you can download my Android App for free from below.

The app was not found in the store. 🙁

If you have an iPhone, you can download a 3rd party app called Hop Stop.

The app was not found in the store. 🙁