Would this method work for GTFS Bus routes?
I'm also keen to port it to Sydney's train network as we have GTFS and GTFS realtime!
GTFS realtime is a lot of fun, I built a simple JSON real time API for Sydney buses which could be easily ported to other GTFS realtime feeds: https://github.com/jakecoppinger/sydney-bus-departures