Journey Planner and Fares
The Journey Planner and Fares (JPAF) calculates fares and their validity on journeys from the Journey Planner.
The JPAF service is specific to British rail fares and relies on data from Rail Delivery Group. The rules around journey/fare validity are very specific to British rail and are not useful for other data sets.
Journey Validity
At present JPAF checks the validity of the journeys on:
- the route of the fare (according to the fares data)
- restriction code of the fare
- validity period of the ticket type (for returns)
It does not check
- the rules according to the National Routing Guide (the data feed is not public)
- Advance fare availability (also not public information)
TODO
- apply TOC specific ticket rules
- break of journey in restriction header
- London terminals mapping
- Weekender outward validity
Testing
npm test
Run
npm start
Contributing
Issues and PRs are very welcome.
License
This software is licensed under GNU GPLv3.
Copyright 2017 Linus Norton.