• Our new ticketing site is now live! Using either this or the original site (both powered by TrainSplit) helps support the running of the forum with every ticket purchase! Find out more and ask any questions/give us feedback in this thread!

UK Train/Tube Fare Map

Status
Not open for further replies.

drspa44

Member
Joined
19 Sep 2018
Messages
43
Hello all,
You may be interested in a free/non-commercial open-source website I have just released today called faremap ( http://faremap.ml ). Its purpose is to display UK train and Oyster fares on a colourful map, so that you can work out optimal journeys. I have also pre-computed every split ticket combination and these are displayed all at once. Feel free to have a play and tell me what you think. If you can, use Chrome on desktop - it is very graphics-heavy and is more usable with a mouse.

Please take the results with somewhere between a pinch and a truckload of salt. Many of the split tickets are only for the most dedicated individuals - my Dijkstra implementation does not care if you'd have to wait hours changing at a station receiving only a few trains per day! There's more caveats in the About section of the website.

I can probably answer any technical questions, but I am far from an expert on trains.

preview.png
 
Sponsor Post - registered members do not see these adverts; click here to register, or click here to log in
R

RailUK Forums

greatkingrat

Established Member
Joined
20 Jan 2011
Messages
3,293
Can anyone beat 17 splits?

SOS Stromeferry - Portslade (+Any Permitted) 213.00
OR
SDS Stromeferry - Achnasheen 8.70
SDS Achnasheen - Gleneagles (Via Aviemore) 39.40
SDS Gleneagles - Croy 12.20
SDS Croy - Sanquhar 14.00
SDS Sanquhar - Hellifield (Via Appleby) 23.70
SDS Hellifield - Keighley 5.50
SDS Keighley - Denby Dale 6.80
SDS Denby Dale - Kiveton Bridge (Via Sheffield) 5.00
SDS Kiveton Bridge - Langwith Whaley Thorns 4.70
SDS Langwith Whaley Thorns - Radcliffe 7.50
SDS Radcliffe - Peterborough 19.30
SDS Peterborough - Hatfield 16.40
SDS Hatfield - Hadley Wood 5.10
Oyster Hadley Wood - West Croydon 4.30
SDS West Croydon - Gatwick Airport (Thameslink Only) 4.60
SDS Gatwick Airport - Brighton (Thameslink Only) 8.80
SDS Brighton - Portslade 2.70

TOTAL 188.70!
 

higthomas

Established Member
Joined
27 Nov 2012
Messages
1,227
That is fascinating! Those default fares maps do show some operators up!
For some reason it doesn't seem to be able to find default fares from Guildford to Norfolk! I guess the two aren't meant to mix!

P.S. A return tickets option would be great.
 

drspa44

Member
Joined
19 Sep 2018
Messages
43
I have recently realised my code that reads in the fares data ( http://data.atoc.org/fares-data ) is flawed in that it ignores fares where they have been marked as 'not for publication in the national fares manual'. I thought this meant that they were not supposed to be for sale, but clearly I was wrong. And it has caused some black holes around recently opened stations like Kenilworth as well, so I am looking to fix this shortly. Unfortunately it takes me about 12 hours to upload all of the data, so it is not that easy to fix immediately :)
 

furlong

Established Member
Joined
28 Mar 2013
Messages
5,312
Location
Reading
I'm assuming this also ignores the many quirks of the routeing guide and the ability to "break" a journey on some tickets (and not use the complete ticket). Perhaps add more caveats in the About text and explain how the splits you present were calculated, that trains must stop where you change tickets, and the lines shown graphically don't represent the route of the railway lines.
 
Last edited:

greatkingrat

Established Member
Joined
20 Jan 2011
Messages
3,293
I don't think the routeing guide is relevant here. If you have a ticket A-B and B-C, that will always be valid from A to C via B.

There may be even cheaper splits you could use with clever interpretation of the routing guide, but that isn't what this site is trying to do.
 

drspa44

Member
Joined
19 Sep 2018
Messages
43
It does not know about the routeing guide. However the split ticket calculation is making no assumptions about whether you are staying on the train at the split points. In the worst case, you will have to get off and change at every waypoint listed. Maybe you can provide an example of a split ticket it gave which is invalid?
 

furlong

Established Member
Joined
28 Mar 2013
Messages
5,312
Location
Reading
For example, it might say: From A to C, 2 tickets A to B plus B to C are cheaper but it would ignore it if while getting to B you are allowed to travel through C and end your journey there and didn't need the 2nd ticket at all.
 

alistairlees

Established Member
Joined
29 Dec 2016
Messages
4,405
This is a great piece of work drspa44. Well done. I know how hard all this stuff is.
 

ForTheLoveOf

Established Member
Joined
7 Oct 2017
Messages
6,416
I am equally impressed over what you've managed. I think this definitely has the potential to become a useful and interesting tool - if nothing else, to illustrate to people who know little about fares and ticketing how splitting might work, in a visual and easy to understand way.
 

ForTheLoveOf

Established Member
Joined
7 Oct 2017
Messages
6,416
Having said the above, there do seem to be a small number of journeys where the map isn't showing appropriate fares. This is mostly because it is only implementing some fare overrides. Fare overrides are complex but essentially most fares are priced in clusters - i.e. from one collection of stations to another collection of stations. The longer the distance, the bigger the cluster typically.

However sometimes big clusters can result in a situation where journeys from one extreme of the cluster to the other are priced unreasonably high or low. Therefore TOCs can set individual fares for specific station combinations within those clusters. An example of where this occurs is Stoke-on-Trent to Newark North Gate - here it suggests using Blythe Bridge to Fiskerton; however, it incorrectly uses the cluster price for this (£11.00 single), instead of the override fare of £16.30 which is then suddenly much less attractive.
 

Starmill

Veteran Member
Joined
18 May 2012
Messages
27,276
Location
Bolton
This is absolutely fascinating well done. It's an excellent way to scour for tickets geographically rather than sort of computationally using the data. It's a process I sometimes try to do manually.

The only criticism that I really have is that it could do with some tickets being blocked from the results - SVH and SSU tickets for a start as these can only be sold as part of a return journey.
 
Joined
24 Jul 2011
Messages
535
Location
Wigan
Fantastic work drspa44!

Making sense of the UKs complex fares system is one thing, but displaying it in such a unique format is some really clever work! :)
 

_toommm_

Established Member
Joined
8 Jul 2017
Messages
6,295
Location
South West London
Looks really good - make sure to message a mod to get the rank that says you're officially allowed to talk about and represent the views of this website.
 

drspa44

Member
Joined
19 Sep 2018
Messages
43
Thanks for all of the feedback! Currently, I am working on repairing the gaps in the map and trying to copy the logic used by brfares.com to show London zonal train tickets.

Having said the above, there do seem to be a small number of journeys where the map isn't showing appropriate fares. This is mostly because it is only implementing some fare overrides. Fare overrides are complex but essentially most fares are priced in clusters - i.e. from one collection of stations to another collection of stations. The longer the distance, the bigger the cluster typically.

However sometimes big clusters can result in a situation where journeys from one extreme of the cluster to the other are priced unreasonably high or low. Therefore TOCs can set individual fares for specific station combinations within those clusters. An example of where this occurs is Stoke-on-Trent to Newark North Gate - here it suggests using Blythe Bridge to Fiskerton; however, it incorrectly uses the cluster price for this (£11.00 single), instead of the override fare of £16.30 which is then suddenly much less attractive.

Wow. I did not realise this and I have added it to the backlog of things to fix.

This is absolutely fascinating well done. It's an excellent way to scour for tickets geographically rather than sort of computationally using the data. It's a process I sometimes try to do manually.

The only criticism that I really have is that it could do with some tickets being blocked from the results - SVH and SSU tickets for a start as these can only be sold as part of a return journey.
Do you have a source for this, because with the first example I found, it did not seem to be the case?
Hatfield (Herts) (HAT) Kirkconnel (KRK) SVH OFF-PEAK S 2T ANY PERMITTED £64.05

At the moment, the fares I'm considering are the ones that are single and standard class and either have the word 'anytime' in the description or matches the regex ((SUP(ER)?) )?OFF.?P.*K.* (DAY|S), of which there are very many.
 

drspa44

Member
Joined
19 Sep 2018
Messages
43
Over the next 5 hours, I'm uploading 17 GB of fare data with the following enhancements:
1. Fares that were missing before for the reason of "fares on this flow are not published in the National Fares Manual" are now shown, so there are fewer gaps. e.g. Guildford to Norfolk, Kenilworth to anywhere nearby, Newcastle Airport to anywhere.
2. All ticket names are now prefixed with the 3 letter code, like SDS. This should make it more obvious if I've made a mistake.
3. Support for fares like 'Cambridge to London Z1-6', meaning there are fewer gaps in London. I'm not sure how accurate this is, but I've tried to follow the logic used in librailfare.sourceforge.net and I don't see any obvious errors. I'll just wait for the complaints to roll in :).
 

some bloke

Established Member
Joined
12 Feb 2017
Messages
1,811
I'd say this is the best way so far to present fare information - and hope this is the future for public transport journey planning.

I don't know if you had an overall aim of instant information, but the result is something far better than typing in station names to try alternatives. The coloured "fare zones from the origin" display is very useful, the pre-loading of data works very well and the resulting instant fares display is great.

The integration with TfL Pay As You Go fares is useful in filling a gap in the official information, as is the split ticketing on PAYG.



You might like to add a note on railcard discounts (including that there are regional ones such as the Network Railcard and Annual Gold Card) and a reference to Rangers/Rovers. Maybe in the future these could be integrated into the fares data and/or overlays of their zones could be displayed.

Perhaps add London Terminals/Birmingham Stations etc, and separate St Pancras from KGX.

It could be even more beautiful with curved boundaries, though I imagine that might not be easy.

The About page says, "Split ticketing Oyster/contactless fares in London will require you to use multiple cards."
Alternatives include waiting the appropriate time, and touching in on a bus then getting off immediately, which is free if the cap has been or will be reached.

Starmill is saying that, for example, SVH tickets should be excluded from results for singles because they are only sold with a return journey.
 
Last edited:

ForTheLoveOf

Established Member
Joined
7 Oct 2017
Messages
6,416
Starmill is saying that, for example, SVH tickets should be excluded from results for singles because they are only sold with a return journey.
However, there are some similar products - e.g. LNER's (Super) Saver Half - which is currently sold as a single, when bought without a Railcard discount on certain websites (e.g. LNER's website, TrainSplit etc.).
 

Starmill

Veteran Member
Joined
18 May 2012
Messages
27,276
Location
Bolton
However, there are some similar products - e.g. LNER's (Super) Saver Half - which is currently sold as a single, when bought without a Railcard discount on certain websites (e.g. LNER's website, TrainSplit etc.).
Those are just SSS tickets with S50 discount. You can tell because the price is slightly wrong e.g. Leeds to London Terminals is £54.50. If it were an SSU it would be £55.00.
 

Bantamzen

Established Member
Joined
4 Dec 2013
Messages
10,499
Location
Cheshire
This is an excellent piece of work, so well done. My only criticism is that it is not rendering too well on a mobile device (Sony XZ2, Android 8.0), I assume you'll be looking to optimise for mobile devices in a future version.
 

some bloke

Established Member
Joined
12 Feb 2017
Messages
1,811
As one use of split ticketing is to avoid peak fares applying to the whole journey, it might be worth adding a note to the effect that this can be done, and that people can combine the results of peak and off-peak searches. If the splitting points differ, trial and error on BRfares.com or elsewhere could help refine the results.
 
Last edited:

MikeWh

Established Member
Associate Staff
Senior Fares Advisor
Joined
15 Jun 2010
Messages
8,567
Location
Crayford
This looks great. I especially like the integration of National Rail fares with the TfL supplied Oyster fares as the Oyster fares in the National Rail database leave a lot to be desired in many cases.

I've tried a journey I often make and have a query. CRY-NWD. I agree with every fare except the
SDS ANYTIME DAY S
£6.20

ANY - PERMITTED
one. That doesn't appear on brfares and appears to undercut the Oyster fare.
 

drspa44

Member
Joined
19 Sep 2018
Messages
43
I'd say this is the best way so far to present fare information - and hope this is the future for public transport journey planning.

I don't know if you had an overall aim of instant information, but the result is something far better than typing in station names to try alternatives. The coloured "fare zones from the origin" display is very useful, the pre-loading of data works very well and the resulting instant fares display is great.

The integration with TfL Pay As You Go fares is useful in filling a gap in the official information, as is the split ticketing on PAYG.



You might like to add a note on railcard discounts (including that there are regional ones such as the Network Railcard and Annual Gold Card) and a reference to Rangers/Rovers. Maybe in the future these could be integrated into the fares data and/or overlays of their zones could be displayed.

Perhaps add London Terminals/Birmingham Stations etc, and separate St Pancras from KGX.

It could be even more beautiful with curved boundaries, though I imagine that might not be easy.

The About page says, "Split ticketing Oyster/contactless fares in London will require you to use multiple cards."
Alternatives include waiting the appropriate time, and touching in on a bus then getting off immediately, which is free if the cap has been or will be reached.

Starmill is saying that, for example, SVH tickets should be excluded from results for singles because they are only sold with a return journey.

Initially this was only going to show TfL fares and my goal was to make clearer the big divide between tube and train fares, showing exactly where these applied. I didn't think it would be possible to have a functioning web page with 2874 individually styled polygons.

With railcards, I figured in most cases, one can just mentally subtract a third of the price in most cases. I'd like to keep this from diverging too much from the mainstream and I think there is a risk of that with adding more and more information and options. Also, it means larger data files for each station that need to be downloaded, which is more expensive for me and cuts out people using a slow internet connection. If I ever add returns, it will probably be displayed on a separate page altogether.

If by curved boundaries, you mean around the edge of Great Britain, like https://mathematica.stackexchange.c...-a-voronoi-diagram-bounded-by-the-convex-hull , I have spent many an hour on this and couldn't get it working. I will probably try again at some point. The other problem to solve is what to do with stations that have exactly the same coordinates, as these prove difficult to display without me manually changing the coordinates provided by Naptan. In some cases, like Kings Cross St Pancras, it was simpler to just merge the stations.

It should include fares that say 'to London terminals', but it doesn't make it clear if this is what the ticket will say on it. Again, something for the backlog if I can show this in a friendly way.

I know there's other ways to split with Oyster, but I figured in the interests of not having a really long list of caveats, I would present the simplest option. In most cases, I imagine the bus trick would not be free and cancel out the saving.

If people can highlight specific fares with source/dest that I've shown that are not valid, I'm happy to review them.
 

drspa44

Member
Joined
19 Sep 2018
Messages
43
This looks great. I especially like the integration of National Rail fares with the TfL supplied Oyster fares as the Oyster fares in the National Rail database leave a lot to be desired in many cases.

I've tried a journey I often make and have a query. CRY-NWD. I agree with every fare except the
SDS ANYTIME DAY S
£6.20

ANY - PERMITTED
one. That doesn't appear on brfares and appears to undercut the Oyster fare.
Thanks - I guess my integration of London zonal fares was imperfect. I have uploaded my old file for Crayford to https://storage.googleapis.com/faremap-test/index.html# where that doesn't appear.

I will have a look at it in the next few days and try to fix.
 

drspa44

Member
Joined
19 Sep 2018
Messages
43
This is an excellent piece of work, so well done. My only criticism is that it is not rendering too well on a mobile device (Sony XZ2, Android 8.0), I assume you'll be looking to optimise for mobile devices in a future version.
My goal with mobile was to just make it workable enough that it would encourage people to try it on desktop. It is just way too much data to render and the page benefits so much from using a mouse. Plus downloading 8 MB odd of data for each station lookup would not be a great experience over 3G/4G.
 

Bantamzen

Established Member
Joined
4 Dec 2013
Messages
10,499
Location
Cheshire
My goal with mobile was to just make it workable enough that it would encourage people to try it on desktop. It is just way too much data to render and the page benefits so much from using a mouse. Plus downloading 8 MB odd of data for each station lookup would not be a great experience over 3G/4G.

A fair point, I hadn't considered the data issue. Is it something you might look at in future if the site works out, perhaps as an app? It would be really useful I think.
 

drspa44

Member
Joined
19 Sep 2018
Messages
43
A fair point, I hadn't considered the data issue. Is it something you might look at in future if the site works out, perhaps as an app? It would be really useful I think.
I think it's unlikely unless this proves to be very popular with a mainstream audience. One can publish a website like this for free (not counting the 100s of hours of development :)), but you need to pay Apple and Google a fee to publish apps with them.
Also if the fare data was stored in the app in its current format, it would still be pretty massive.
 

PeterC

Established Member
Joined
29 Sep 2014
Messages
4,777
For example, it might say: From A to C, 2 tickets A to B plus B to C are cheaper but it would ignore it if while getting to B you are allowed to travel through C and end your journey there and didn't need the 2nd ticket at all.
I'm keeping quiet as I may want to use this to visit my daughter but I have found one route where it is cheaper to go through a city centre station to a suburban one and then come back again.
 

tom73

Member
Joined
24 Apr 2018
Messages
211
Wondering why I am sent out all the way to North Wembley from London King's Cross to get a train back to Euston when I could have simply walked from London King's Cross to Euston (8-10 minutes) to begin with. (The leg from North Wembley to Rugely Town involves travelling back down to Euston and then northbound to Rugeley Town)
Doc1.jpg
 
Status
Not open for further replies.

Top