BPLAN Geography: Difference between revisions
Liam Crozier (talk | contribs) Added BPlan API |
Liam Crozier (talk | contribs) m Specified PIF |
||
Line 101: | Line 101: | ||
= API = | = API = | ||
An API is now available that retrieves a gzip file containing the current and next timetable BPlan files. | An API is now available that retrieves a gzip file containing the current and next timetable BPlan PIF files. | ||
An account is required in order to access the API which can be requested by contacting opendata@networkrail.co.uk. Once an account has be authorised, you will receive a client_id and client_secret. Below is the API url and an example of how to use the credentials within Postman. | An account is required in order to access the API which can be requested by contacting opendata@networkrail.co.uk. Once an account has be authorised, you will receive a client_id and client_secret. Below is the API url and an example of how to use the credentials within Postman. |
Revision as of 17:06, 25 January 2023
The rail industry uses a system called BPLAN (a successor to a system called APLAN) to manage a master set of geography data used when planning trains. Network Rail create extracts of this geographical data as a PIF.
Data
The following sets of data are included in the extracts:
Record type | Description |
---|---|
PIF | Header record |
REF > ACC | Accommodation Class codes |
REF > ACT | Activity codes |
REF > BHX | Bank Holiday Excepted codes |
REF > BRA | Brand codes |
REF > BUS | Business Sector codes (no longer used) |
REF > CAT | Catering codes |
REF > OPC | Operating Characteristics |
REF > PWR | Power Supply Type codes |
REF > RES | Reservations codes |
REF > SER | Service Codes (not released in the Open Data extract) |
REF > SLE | Sleeper codes |
REF > TCL | Train Class codes |
REF > TCT | Train Category codes |
REF > TOC | Train Operating Company codes (not ATOC codes) |
REF > TRS | Train Status codes used in bid/offer files (not released as Open Data) |
REF > TST | Publication Status codes |
REF > ZNE | Data Areas |
TLD | Timing loads |
LOC | Location codes |
PLT | Platform data |
NWK | Network links |
TLK | Timing links |
PIT | Trailer record |
More detailed documentation on the data structure is available.
Availability
The data is available for each principal and subsidiary timetable (twice a year).
Limitations
- Service Code reference data (SER) is not currently published, as it contains data about freight operators
- Bid and offer files (sometimes called PEX files) between Network Rail and train operators are not published, as they may contain unworkable train bids or sensitive data
Downloading
Links to current and historical data are contained on a separate page.
API
An API is now available that retrieves a gzip file containing the current and next timetable BPlan PIF files.
An account is required in order to access the API which can be requested by contacting opendata@networkrail.co.uk. Once an account has be authorised, you will receive a client_id and client_secret. Below is the API url and an example of how to use the credentials within Postman.
API URL: https://data.networkrail.co.uk/api/pifgeography/v1/train/referenceDataFile
https://www.networkrail.co.uk/who-we-are/transparency-and-ethics/transparency/open-data-feeds/