Saturday, February 14, 2009

Pocket PC Weather and Bus Arrival Time App

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

http://www.mweisman.com/transit.html

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 also hard-coded.

Install:
http://www3.telus.net/mrchiu/blog/bustime/BusTime.cab

Source:
http://www3.telus.net/mrchiu/blog/bustime/BusTime.zip

Comments welcome.