About @whensmyDLR
What is @whensmyDLR?
@whensmyDLR is a Twitter bot that tells you what time DLR trains are arriving at a stop near you, based on your location and TfL’s real-time data.
Awesome. How do I get train times?
The easiest way is, if you have GPS-enabled smartphone like an iPhone or Android phone. Just make sure you have your current location added to your Tweet - instructions on doing so are here. Then just Tweet to @whensmyDLR, e.g.:
@whensmyDLR DLR
If you don’t have a GPS-enabled smartphone, or prefer not to disclose your location, then you can include “from [placename]” where, [placename] is where you want to go from, e.g.:
@whensmyDLR DLR from Canary Wharf
Either way, @whensmyDLR will work out where you are and within a minute Tweet back at you the latest times for DLR trains from the station nearest to you, such as:
@qwghlm Canary Wharf to Lewisham 1519, 1525; Stratford 1526, 1536; Bank 1524, 1534
What’s better, GPS or non-GPS?
The GPS version, it’s sexier. Seriously, it will be more accurate - there’s always a chance you’ll spell the placename wrong, or it will be ambiguous. @whensmyDLR will try its best to find the most appropriate station for you, but geocoding is hard and it may not work 100%, especially if you’re asking for something vague like “High Street”.
Isn’t this pointless? Don’t TfL offer the same information as well?
The DLR do offer the same information, on the web (for free). But I found the mobile web experience a bit fiddly, and thought a lightweight Twitter solution, using its geolocation and realtime features, was a nice alternative.
I’d like to use @whensmyDLR but I don’t like giving away my location. Can I send it a direct message instead?
Yep, you can send Direct Messages to @whensmyDLR as well. You first need to follow it, then it will auto-follow you back within a few minutes. Once you’re both following each other, you can send it a Direct Message. However, you cannot add your GPS position to a Direct Message (Twitter’s rules, not mine), so you have to specify your departure point in your Tweet, e.g.:
d whensmyDLR DLR from Canary Wharf
I’ve added location to my Tweets but it’s not working!
This can be a point of confusion: Twitter offers the option to add a default “Place” to every Tweet you make (e.g. “Westminster, London”) via the website or via desktop apps such as Tweetdeck. However these Places are not your exact GPS location and they are too vague for @whensmyDLR to work out exactly where you are; for example, “Westminster, London” covers virtually all of Travelcard Zone 1.
This Place info (via the web, or on a desktop app) is not to be confused with adding your exact location via GPS (on your mobile). At the moment, Twitter doesn’t allow you to provide detailed GPS-quality location information from the Twitter website or desktop apps, alas.
I want to ask it several times during the day, but Twitter doesn’t like me making duplicate Tweets
Put a random hashtag at the end of your Tweet after the route number to make it unique; the bot will ignore all hashtags and let you ask for the same station multiple times.
Who are you, and why did you create this bot?
I’m Chris Applegate, and I’m a hacker and transport geek based in London.
Argh! It’s not working!
Feel free to contact me and let me know what’s wrong - my email address is here or just Tweet me @qwghlm. Don’t Tweet @whensmyDLR with a bug report, it’ll probably ignore you.
How did you build this? Is the source code available?
I built this with TfL’s data API, co-ordinate conversion code from Chris Veness and the help of the Tweepy library. Geocoding of placenames is done by the Yahoo Placefinder API. The source code is available on github.