Skip to content

in-development Network Rail data analysis project

License

Notifications You must be signed in to change notification settings

eeeeeta/trainsplorer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

the trainsplorer (aka osm-signal)

Build Status IRC chat @ #trainsplorer on freenode IRC chat logs GNU AGPLv3 licensed

What is this?

This is an in-development project that processes Network Rail's Open Rail Data feeds - absorbing all sorts of information about train schedules, and keeping a record of current and historic live train data. The eventual end goal of the project is to link this information into OpenStreetMap geodata, in order to provide cool things like a live map of train locations (approximately, that is), predictions on level crossing opening & closing times, and the ability to find out which trains are going to pass any location on the railway at any given time. It's all written in Rust as well, because Rust is cool.

However, it's very much not done yet! Watch this space for further stuff! Also, feel free to join the chatroom (#trainsplorer on chat.freenode.net), if you'd like to discuss the project (or anything about trains in general, really). (We also keep logs for that chatroom, in case you're interested in seeing what we've been up to.)

What are all these moving parts?

This repository contains many individual Rust crates. Here's a short overview of what they do:

  • atoc-msn: parses the Master Station Names (MSN) file from the Rail Delivery Group's Industry Data dataset
  • ntrod-types: parses data from the Network Rail open data feeds, specifically the SCHEDULE, Train Movements, reference data, and VSTP feeds
  • osms-db: the main database library for the project; handles storing data into and retrieving data from a PostgreSQL database, as well as performing some other handy utility functions, such as navigating between two points on the railway
  • osms-db-setup: builds on osms-db, and contains a utility for loading data into the database in the first place
  • osms-nrod: connects to the Network Rail STOMP messaging service and the National Rail Enquiries Darwin feed, and processes real-time train data, storing it in the database using osms-db
  • osms-darwin: used for testing the Darwin feed
  • osms-web: a fancy webserver with lots of buttons to press that enables people to admire the wonderful collections of data in the database
  • doc: that's not a crate, that's a directory containing mostly incoherent design notes and the like

Can I have some screenshots?

Yes! That's what osms-web is for, after all. Here you go:

'search for trains' interface' movement search interface train details schedule details

Licensing

All crates in this repository are free software: you can redistribute them and/or modify them under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The atoc-msn, national-rail-departures, and ntrod-types crates are also licensed under Apache 2.0 and MIT terms. This means that you can use these crates (but only these crates) under AGPLv3, MIT, or Apache 2.0 at your option.