Off the Rails: The Hacks

Home > Blog > Off the Rails: The Hacks

Following our successful hack day a few weeks ago, this post showcases the 10 great hacks that resulted

During the presentations of the below hacks I was blown away by the range of ideas. Now that some of the teams have done further work since the day itself, I remain stunned at the range and quality of the output, particularly because of the complexity of the subject matter, and the fact that a lot of the developers hadn’t built any train-related software before. So check out all of the impressive, useful and fun train hacks, and marvel at what can be done when data is opened and great minds work together…

Hack #1 – Trainspot.in… FourSquare for trains

Trainspot.in screenshots

What? A very clever hack that enables users to check into a train. The resulting platform/API could be used to build all manner of interesting applications, exciting trainspotters everywhere with the ability to earn badges and social recognition for travelling on as many different trains as possible. Try it out for yourself here!

Who? James Smith, Chris AdamsFlorian Rathgeber and Neil Ford

Data/technology used: This sophisticated implementation uses lots of Network Rail data, an existing API built by Tom Cairns (see Hack #6 below) and combines these with HTML5 Geolocation, allowing users to check in from any supported browser. STOMP tells the application each time a train enters or leaves a station. The station is then matched to the NaPTAN dataset (converting STANOX->TIPLOC along the way) to find a geolocation for each station, and hence each train.

Github: https://github.com/trainhack/trainspot

Next steps: Not quite clear yet, but there’s a lot of potential…

Hack #2 – Journey planner maps with lines that follow the tracks

Sleeper map

What? A method of extracting open streetmap data to put it into graph form and allow it to be used in journey-planning applications.

Who? Matthew Westcott, Jon Leighton and others

Data/technology used: Open Street Map data for Wales downloaded from Geofabrik. Nodes/edges extracted from the vector data and put into PostGIS.

Github: https://github.com/trainhack/traingraph

Next steps: Improve database queries so that it takes less than a month of processing(!) to apply this solution to all European OSM data

Hack #3 – Scenic railways

Scenic railways iPhone app

What? An app that tells you about what to see out of the window. There’s an actual live website to try out and you can read more about it in this blog post.

Who? James JefferiesFrankie RobertoJez Nicholson, and Joe Hughes

Data/technologies used: Ruby on Rails, Objective-C (dummy data for now)

Github: https://github.com/frankieroberto/scenic-railways

Next steps: Link itineraries to proper open train data so that users can start adding their own points of interest

 

Hack #4 – Realtime Dutch trains

Realtime Dutch trains

What? A simple but highly-usable site showing live departure boards for all Dutch train stations using the amazing API made available by the Dutch rail company, NS. Check out the Realtime Dutch Trains site which is live right now and very helpful if you’re catching trains in the Netherlands.

Who? Ian Shortman

Data/technologies used: NS API. Other technology not specified, but presumably similar to the technology behind trains.im (PHP/MySQL and Bootstrap)

Next steps: Use a similar approach for realtime UK data if/when a suitable API becomes available (see Hack #6 below)

 

Hack #5 – ChooChooTune

Choo Choo Tune app screenshots

What? An app that helps you pick a playlist tailored to the length of your train journey!

Who? Lee and Nial from Pinkfroot

Data/technologies used: Data from Transportapi.com (part JSON, part scraped HTML), mashed up with Rdio API

Next steps: Go on a train and listen to some tunes! (Next steps for the app still being decided…)

 

Hack #6 – Realtimetrains

Real time trains

What? The Realtimetrains.co.uk site makes sophisticated use of newly-open realtime data, and has been live for some time. The hack day work related to one specific improvement relating to minimising reliance on one specific message in the feed to ensure that overall reliability/data completeness increased (the technical term is “self-activating trains”).

Who? Tom Cairns

Data/technologies used: TRUST data via Network Rail datafeeds (delivered by Rockshore’s Event Processing Platform)

Next steps: Code being tidied up to put on Github whilst Tom concentrates on the 3rd year of his degree

 

Hack #7 – Follow the rails

What? A site that mashes up Network Rail realtime data with tweets within a one mile radius of trains on a Googlemap. Very useful for getting more context/information on train delays before catching a train, or to see what fellow passengers are saying when you’re on board. More info in this presentation.

Who? Elena Croitoru

Data/technologies used: Network Rail datafeeds, Googlemaps and Twitter API. Built in Java.

Next steps: Code to be tidied and put on Github…

 

Hacks #8, #9 and #10

We don’t have screenshots or detailed info for the remaining hacks, but that doesn’t mean that they weren’t amazing!

Hack #8 gathered together all of the data on how to to take bikes on trains in the UK to make it available for journey-planners and booking sites to work better for cyclists. All the collated data and more info about the possible next steps for the project can be found over on the open rail data wiki

Hack #9 used iRail and Opendatacity/ZugMonitor to help users find the middle point between two locations so that they could each travel for the same amount of time when deciding where to meet

Hack #10 was The Dank Spangle Memorial Train Timeliness Reckoning and helped users to see exactly the total amount of delays in the UK at any one point, as well as the most delayed train. More information and all of the code is on Github.

Thanks again to all the amazing people who took part on the day. If you want to join the #trainhack community and get involved with future hack days, please join the mailing list.