Sydney Traffic

Results of a little bit of weekend hacking…
http://twitter.com/sydneytraffic

It parses / screen scrapes the Sydney RTA’s traffic reports, does some text substitution in an effort to get the event text under the twitter 140 character message limit and automatically posts the updates. The idea is that one could then subscribe to sydneytraffic on twitter and receive SMS updates of the latest traffic situation.

Strangely, the RTA don’t provide an XML / RSS / Atom feed or anything sensible for these updates, so it was a bit of a challenge to strip out the relevant information from the table heavy HTML. I’m going to continue making improvements and updates to the text substitution and shortening, but it’s basically functional now.

UPDATE: Source at http://bitbucket.org/akent/sydneytraffic

12 Comments

  1. Posted 11 September 2008 at 9:02 am | Permalink

    Brilliant stuff! Hate to think how much work this took, but it certainly seems to work well at this point. Ill keep checking back here for updates.

  2. Posted 01 October 2008 at 8:37 pm | Permalink

    Just stumbled across this… Great work! It’s disappointing (though not surprising) that organisations like the RTA don’t have the initiative to do this themselves. Again, top work!

  3. Dean
    Posted 31 December 2008 at 7:28 am | Permalink

    Just found this aswell, and loving it!

    Any chance of using your methods to report on cityfrail disruptions?

  4. Adam Kent
    Posted 31 December 2008 at 7:55 am | Permalink

    Dean (and all) thanks. For Cityrail there is http://twitter.com/sydtrainservice … More info here.

  5. Posted 13 January 2009 at 9:36 pm | Permalink

    Interesting little project! It would be pretty cool if there was a service that allowed you to lookup coordinates via street addresses, and you could do a daily map of incidents.

    Anyways – as there aren’t any XML feeds to consume, are you just scraping the page with BeautifulSoup (or something else)?

    Nice work!

  6. scatsboy
    Posted 25 March 2009 at 12:07 pm | Permalink

    Just found this – interesting.

    We’ll see what we can do to make this info a little bit more accessible.

    We’ll also keep an eye on this forum for your comments and suggestions.

    No promises (of course), but we will consider your thoughts.

  7. Phil
    Posted 15 April 2009 at 1:02 pm | Permalink

    Great service. Amazed at home many incidents there in any one day. The downside of which is the feed overloading my twitter account.

    What’s the possibilty of segmenting the information into seperate feeds? CBD, North Shore, Inner West etc…

    Currently I feel like I’m suffering from Too Much Information™

  8. Adam Kent
    Posted 15 April 2009 at 1:08 pm | Permalink

    Hi Phil. I agree, the number of daily incidents is quite remarkable. You might be interested in checking out the separate “area” feeds:

    http://twitter.com/sydtraffic_city
    http://twitter.com/sydtraffic_nth
    http://twitter.com/sydtraffic_sw
    http://twitter.com/sydtraffic_nw

  9. abe
    Posted 27 May 2009 at 3:03 pm | Permalink

    Great idea!

    Did you guys have to ask permission from the RTA to reproduce their content..?

  10. Adam Kent
    Posted 27 May 2009 at 7:46 pm | Permalink

    @abe: I have not asked the RTA for explicit permission, no, but I think scatsboy above in comment #6 is somehow affiliated with the RTA so I’m taking that as implicit tolerance. Also there are a few other sites that seem to use the same data, check out http://prangz.com and http://www.traffichawk.com.au

  11. Adam Kent
    Posted 27 May 2009 at 7:49 pm | Permalink

    Belatedly @scatsboy, thanks for the feedback. When the data format changed in June 2008 that made life a lot easier. To be honest, the screenscraping solution is working pretty well right now, so I’m disinclined to change what’s working, as long as the RTA is happy with the bandwidth overhead! I try to be quite polite with the polling though, only every 5 mins in peak hours and every 20 minutes other times.

  12. Dave
    Posted 05 June 2009 at 12:19 am | Permalink

    Also a heads up on http://snarl.com.au. Launching this week. Starting in Sydney and moving all around the country.

One Trackback

  1. [...] Can’t seem to find any mention of the incident on the RTA Sydney traffic reports. Which, I find, have been usefuly turned into twitter feeds: [...]

Post a Comment

Your email is never shared. Required fields are marked *

*
*