Yahoo Pipes is something I've been meaning to get to grips with for quite a while but just never had the right application for it. However before heading home last night I did my quick check of the tube status page for any usual problems and it suddenly hit me, wouldn't it be great if this information was machine readable!
I raced home and checked around to see if something similar had already been created and found an existing pipe implementation. This existing implementation reads a Twitter feed that's feed from the excellent twitter tube tracker by Tom Morris. The problem is that the data isn't realtime and isn't in an easily usable form by another application.
After a late night I finally finished a new pipe implementation that extracts it's data directly from The tube realtime status page which means it's always up-to-date as well as being fast to run. The feed can be used as an RSS feed, supplying human readable information, in which case you see the following :
or it can be used as a JSON feed/Pipe source, in which case the information is broken down into further parts. As an example, here's an item from the JSON Feed:
{ "statusDescription":"Saturday 17 and Sunday 18 January, suspended between Barking and Upminster. Two rail replacement bus services operate.", "status":"Part closure", "content":null, "id":"district", "title":"District", "description":"Part closure | Saturday 17 and Sunday 18 January, suspended between Barking and Upminster. Two rail replacement bus services operate." }
As you can see, further item elements are available such as Status (general status), StatusDescription (further information) and id (a unique id for this line).
The London Tube Realtime Status pipe can be found here : http://pipes.yahoo.com/pipes/pipe.info?_id=c4feb5c6dea54a73500f8bb2f17912f6.
Hopefully it'll be useful to somebody, certainly I learnt A LOT about Yahoo Pipes whilst building it (which was the general aim after all)
1 comment:
David, this is really cool.
I've just started reading about pipes tonight, and I'm impressed. I followed through your example, and it makes sense!
The cogs are now whirring - what can I do... :D
Post a Comment