Data Sources

378 views
Skip to first unread message

Nathan Merrett

unread,
Mar 7, 2024, 1:26:46 PMMar 7
to A gathering place for the Open Rail Data community
Hi guys,

hope you can help me with this simple one. I am after some datasets, specifically to help me do the following:
1. Track the historical departures of a particular services.
2. Be able to find a particular journey
3. be able to track that particular journey and understand if its on time and where its leaving from.

I believe I have signed up to some of the main sources through network rail and rail data, but I'm struggling to understand what type of data is stored where.

Thanks so much

Nathan

Nathan

unread,
Mar 9, 2024, 7:55:56 PMMar 9
to A gathering place for the Open Rail Data community
Hi Nathan!

Unfortunately, the answer depends slightly on how far back you want to look - if you have access, I believe Network Rail's LDBSV has a 'historical services' endpoint you can query, which might be the easiest solution.

In abstract terms, to find a particular service across different dates you probably want to find the service's UID (It'll look somewhat similar to 'N98399') - this is the code that generally refers to the same service on different days (although there are of course many exceptions), to look up a particular day you just have to add the date in front and convert the letter code (to get something like '202403107898399')

- Nathan

David Rickmann

unread,
Mar 10, 2024, 10:19:01 AMMar 10
to A gathering place for the Open Rail Data community
The source that I would instinctively turn to is the TRUST datasets which are used for historic delay attribution.

However, I think that you would want to cross reference the mileage or movement databases with the delay database, and I think that you won't be able to get the mileage or movement databases. They're huge and I think not open data?
But you could get the historical delay data, and then check t see if your train is in that. If it isn't listed, then in theory it was not delayed. 
(Or at least not delayed more than 3 minutes, which is the threshold for delays to be attributable)


you'll see delay attribution data zipped up by rail year and period.

This should get you the origin date and time, and locations of the service. 
Locations are in Stanox codes, which I suspect you'd want to convert to something a bit more legible, there are various stanox code lookups knocking about.

Nathan Merrett

unread,
Mar 19, 2024, 2:50:19 PMMar 19
to A gathering place for the Open Rail Data community
Thanks both for your responses much appreciated. 

Do you know the correct data source for journey planning. ie. I want to travel from X to Y and it returns the available options for a selected day?

Cheers

Peter Hicks (Poggs)

unread,
Mar 19, 2024, 2:56:14 PMMar 19
to A gathering place for the Open Rail Data community
Hi Nathan


On 19 Mar 2024, at 18:50, Nathan Merrett <merr...@gmail.com> wrote:

Do you know the correct data source for journey planning. ie. I want to travel from X to Y and it returns the available options for a selected day?

If you want to do this for passenger train journeys, you’ll need the Routeing Guide (see https://www.raildeliverygroup.com/our-services/rail-data/routeing-guide-data.html) and also timetable data that contains all passenger trains.  You might also need to look at the type of ticket somebody has - for example, a journey from London to Reading can be done via South Western Railway through Staines, or direct out of Paddington.

You will certainly need the timetable data published by Network Rail and RDG every night - the RDG data may well be better suited as it has minimum interchange times and fixed links that aren’t in the raw timetable.

Alternatively, there is a chargeable (but probably less than the cost of you developing it yourself) API for the National Rail Journey Planner available.


Peter

Michael Tsang

unread,
Mar 25, 2024, 10:09:29 AMMar 25
to openrail...@googlegroups.com
On Tuesday, 19 March 2024 18:55:58 GMT Peter Hicks (Poggs) wrote:
> If you want to do this for passenger train journeys, you’ll need the
> Routeing Guide (see
> https://www.raildeliverygroup.com/our-services/rail-data/routeing-guide-dat
> a.html) and also timetable data that contains all passenger trains. You
> might also need to look at the type of ticket somebody has - for example, a
> journey from London to Reading can be done via South Western Railway
> through Staines, or direct out of Paddington.
>
> You will certainly need the timetable data published by Network Rail and RDG
> every night - the RDG data may well be better suited as it has minimum
> interchange times and fixed links that aren’t in the raw timetable.
>
> Alternatively, there is a chargeable (but probably less than the cost of you
> developing it yourself) API for the National Rail Journey Planner
> available.
>
>
> Peter

The Routeing Guide is only needed if you want to validate tickets. It is not
needed just to produce valid itineraries. There are situations where the best
route is a route not permitted by the Routeing Guide, in such case a
combination of tickets may be needed for the journey.

Michael

signature.asc

Gaelan Steele

unread,
Mar 25, 2024, 12:32:02 PMMar 25
to 'Adam Stead' via A gathering place for the Open Rail Data community

> On Mar 25, 2024, at 2:09 PM, Michael Tsang <mik...@gmail.com> wrote:
>
> The Routeing Guide is only needed if you want to validate tickets. It is not
> needed just to produce valid itineraries. There are situations where the best
> route is a route not permitted by the Routeing Guide, in such case a
> combination of tickets may be needed for the journey.
>
> Michael

Although I’d argue that a general-purpose journey planner should only suggest
routes with a valid through ticket, or at least display a prominent warning on
routes that aren’t - otherwise you’re risking users getting into trouble.

(I’m pretty sure Google and Apple Maps fail to do this.)

Gaelan

Ben Woodward

unread,
Mar 25, 2024, 12:56:33 PMMar 25
to openraildata-talk
Itineraries by those are valid by definition. But that's not to say a member of staff acknowledges that.

--
You received this message because you are subscribed to the Google Groups "A gathering place for the Open Rail Data community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openraildata-t...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/openraildata-talk/0B0A7BC3-8909-4339-9E80-77D7CCE2422F%40canishe.com.

Nathan Merrett

unread,
Mar 27, 2024, 12:22:04 PMMar 27
to A gathering place for the Open Rail Data community
Hi all,

Thanks for your notes.

I must admit, I am probably more confused than I started :D. 

Then general aim of my application is a user should be able to create an account and then identify a journey that they regularly get on for commuting purposes. Then I could set up some reminder texts / notifications about this leading up to the journey. 

I think I need then two bits of data:
1. Being able to identify a journey using journey planner data (this would then be stored and drive number 2)
2. Being able to keep track of said journey using live train data (This would feed the reminder information).

I've seen things such as TAPI, be good to get some links from you guys about the simplest ways of getting this data, I am more focused on building out the backend and application side of things as opposed to wrangling with complex datasources, if that makes sense.

Cheers!


Nathan Merrett

unread,
Mar 27, 2024, 12:24:28 PMMar 27
to A gathering place for the Open Rail Data community
Just to add, it would be great if someone could give me a holistic overview of the sources of all these differeent UK train datasets. I'm rather confused between what National Rail have, vs Network rail etc etc. Cheers! 

Evelyn Snow

unread,
Mar 27, 2024, 12:42:03 PMMar 27
to openrail...@googlegroups.com
Hi Nathan,

The live data part is potentially relatively straightforward, you can query individual
services with the LDBSV SOAP service. Journey planning is either significantly more
complex, or subject to usage charges, if using OJP.

Evelyn
Reply all
Reply to author
Forward
0 new messages