PocketPC Weather and Bus Arrival Time App

I recently discovered that translink had released an API to the bus arrival time information.


Initially I wanted a way to check when the bus will arrive on my phone. I did a search on the Translink website for my bus and stops and then saved the table in Excel after sanitizing all the html artifacts. It worked well until I found out that the times changed and I would have to create another one.

Anyway, I sort of deviated from my original idea and came up with a program that would pull data from Translink and update periodically on one of my PocketPCs that I don’t use anymore. It is coded in C#.NET.

I also added current weather and weather forecast using the WeatherBug API as well. Here is how it looks.

The bus times are updated every minute, current weather every 10 minutes and forecast every half hour over the device’s wireless connection.

The station ID’s are hard-coded but it shouldn’t be too difficult to find where they are and change them. The city ID is also hard-coded.



UPDATE (2011-05-28)

The m.translink.ca mobile interface has been updated to an device auto-detecting page at tripplanning.tranlink.ca. I have updated the code to parse the new page. However, it might be better to use GTFS (General Transit Feed Specification) data for the arrival times as it will be not rely on a working parser. Please email if interested in the new code.

Leave a Reply

Your email address will not be published. Required fields are marked *