https://wiki.openraildata.com//api.php?action=feedcontributions&user=Nathan+Johnson+2&feedformat=atomOpen Rail Data Wiki - User contributions [en-gb]2024-03-28T09:33:30ZUser contributionsMediaWiki 1.33.1https://wiki.openraildata.com//index.php?title=TOC_Codes&diff=1099TOC Codes2015-02-07T14:04:08Z<p>Nathan Johnson 2: </p>
<hr />
<div>This table lists the codes used to identify Train Operating Companies (TOCs) in the various data feeds available from Network Rail. Different feeds use different sets of codes to refer to the same company.<br />
<br />
* ''Company Name'' is the name of the Train Operating Company<br />
* ''Business Code'' is a two-character code used within the TRUST system. It is used in the names of the individual [[Train_Movements | train movement feeds]].<br />
* ''Sector Code'' is the sector code used to represent the TOC in [[Train_Movements | TRUST messages]]. <br />
* ''ATOC Code'' is a two-character code used to representing the TOC in the [[SCHEDULE]] feed. Freight trains are represented by an ATOC code of ''ZZ''.<br />
<br />
{| class="wikitable sortable"<br />
|-<br />
!Company Name<br />
!Business Code<br />
!Numeric Code<br />
!ATOC Code<br />
|-<br />
|Abellio Greater Anglia<br />
|EB<br />
|21<br />
|LE<br />
|-<br />
|Arriva Trains Wales<br />
|HL<br />
|71<br />
|AW<br />
|-<br />
|c2c<br />
|HT<br />
|79<br />
|CC<br />
|-<br />
|Chiltern Railway<br />
|HO<br />
|74<br />
|CH<br />
|-<br />
|CrossCountry<br />
|EH<br />
|27<br />
|XC<br />
|-<br />
|Crossrail<br />
|<br />
|<br />
|XR<br />
|-<br />
|Devon and Cornwall Railway<br />
|EN<br />
|34<br />
|DC<br />
|-<br />
|East Midlands Trains<br />
|EM<br />
|28<br />
|EM<br />
|-<br />
|East Coast<br />
|HB<br />
|61<br />
|GR<br />
|-<br />
|Eurostar<br />
|GA<br />
|06<br />
|ES<br />
|-<br />
|First Capital Connect (defunct)<br />
|EG<br />
|26<br />
|FC<br />
|-<br />
|First Great Western<br />
|EF<br />
|25<br />
|GW<br />
|-<br />
|First Hull Trains<br />
|PF<br />
|55<br />
|HT<br />
|-<br />
|First Scotrail<br />
|HA<br />
|60<br />
|SR<br />
|-<br />
|First Transpennine Express<br />
|EA<br />
|20<br />
|TP<br />
|-<br />
|Gatwick Express<br />
|HV<br />
|81<br />
|GX<br />
|-<br />
|Grand Central<br />
|EC<br />
|22<br />
|GC<br />
|-<br />
|Govia Thameslink Railway (Great Northern)<br />
|ET<br />
|88<br />
|GN<br />
|-<br />
|Govia Thameslink Railway (Thameslink)<br />
|ET<br />
|88<br />
|TL<br />
|-<br />
|Heathrow Connect<br />
|EE<br />
|24<br />
|HC<br />
|-<br />
|Heathrow Express<br />
|HM<br />
|86<br />
|HX<br />
|-<br />
|Island Lines<br />
|HZ<br />
|85<br />
|IL<br />
|-<br />
|London Midland<br />
|EJ<br />
|29<br />
|LM<br />
|-<br />
|London Overground<br />
|EK<br />
|30<br />
|LO<br />
|-<br />
|LUL Bakerloo Line<br />
|XC<br />
|91<br />
|LT<br />
|-<br />
|LUL District Line – Wimbledon<br />
|XB<br />
|90<br />
|LT<br />
|-<br />
|LUL District Line – Richmond<br />
|XE<br />
|93<br />
|LT<br />
|-<br />
|Merseyrail<br />
|HE<br />
|64<br />
|ME<br />
|-<br />
|Nexus (Tyne & Wear Metro)<br />
|PG<br />
|56<br />
|TW<br />
|-<br />
|North Yorkshire Moors Railway<br />
|PR<br />
|51<br />
|NY<br />
|-<br />
|Northern Rail<br />
|ED<br />
|23<br />
|NT<br />
|-<br />
|Serco Caledonian Sleeper<br />
|<br />
|<br />
|CS<br />
|-<br />
|South West Trains<br />
|HY<br />
|84<br />
|SW<br />
|-<br />
|Southeastern<br />
|HU<br />
|80<br />
|SE<br />
|-<br />
|Southern<br />
|HW<br />
|82<br />
|SN<br />
|-<br />
|Virgin Trains<br />
|HF<br />
|65<br />
|VT<br />
|-<br />
|West Coast Railway Co.<br />
|PA<br />
|50<br />
|WR<br />
|-<br />
|}<br />
<br />
{{Navtable-DataFeeds}}<br />
<br />
[[Category:Reference Data]]<br />
[[Category:Train Movement Data]]<br />
[[Category:Schedule Data]]</div>Nathan Johnson 2https://wiki.openraildata.com//index.php?title=Projects&diff=990Projects2015-01-06T23:16:21Z<p>Nathan Johnson 2: /* Existing projects */</p>
<hr />
<div>= Community projects =<br />
<br />
There are several community-driven projects which are creating additional datasets or adding value to existing ones. Some of these may need help - if you're interested in helping out, please get in touch with the organiser.<br />
<br />
* [[AddingJunctionsAndSidingsToOsm|Adding junctions and sidings to OpenStreetMap]]<br />
<br />
= Existing projects =<br />
<br />
There are a number of people working on projects using rail data. Please add yourself to this list if you are too!<br />
<br />
{|class="wikitable"<br />
!Who<br />
!Email<br />
!Project<br />
!Details<br />
|-<br />
|Peter Hicks<br />
|peter.hicks@poggs.co.uk<br />
|[http://www.opentraintimes.com/ OpenTrainTimes]<br />
|First user of Network Rail data. Timetables and real-time signalling maps<br />
|-<br />
|Tom Cairns<br />
|tom@swlines.co.uk<br />
|[http://www.realtimetrains.co.uk/ Realtime Trains]<br />
|Historical, real-time and future train schedules using TRUST and TD data<br />
|-<br />
|Matthew Cockburn<br />
|matthew.cockburn@blueyonder.co.uk<br />
|[http://www.tinyurl.com/wheresmytrain/ Trains around Bristol]<br />
|Real-time locations using TD data STANOX field<br />
|-<br />
|Rob West<br />
|feedback@raildar.co.uk<br />
|[http://raildar.co.uk/ Raildar]<br />
|Searchable historic train performance, statistics, departure boards and real-time location plotting<br />
|-<br />
|Placr<br />
|info@placr.co.uk<br />
|[https://developer.transportapi.com/ TransportAPI]<br />
|Aggregation and analytics service for UK public transport<br />
|-<br />
|RailCam<br />
|unknown<br />
|[http://railcam.tv/diagram/prestonstation.php Railcam.TV]<br />
|Trackside cameras and signalling diagrams<br />
|-<br />
|Real-time PPM<br />
|unknown<br />
|[http://www.realtimeflow.co.uk/ppm/ Real-time PPM]<br />
|A real-time display of PPM data and Twitter messages<br />
|-<br />
|Nathan Johnson<br />
|nathan@gbrail.info<br />
|[http://www.gbrail.info/ GB Rail GTFS]<br />
|Train schedules in GTFS format, updated weekly.<br />
|-<br />
|Realtime UK train map<br />
|connorhd@gmail.com<br />
|[http://connorhd.co.uk/2013/03/30/realtime-uk-train-map/ Realtime UK train map]<br />
|A quick project to visualise some of the open data available about the UK train network.<br />
|-<br />
|rowspan="3"|Michael Pritchard<br />
|rowspan="3"|blueghostuk@gmail.com<br />
|[http://www.traindelayed.co.uk Train Delayed]<br />
|Allows you to view delays on (direct) train journeys (work in progress)<br />
|-<br />
|[http://www.trainnotifier.co.uk Train Notifier]<br />
|Displays real-time train information, schedules and PPM (work in progress)<br />
|-<br />
|[https://twitter.com/fivewaysearly twitter account]<br />
|Tweets when trains leave FWY station early (work in progress) - needs to be more accurate based on TD data<br />
|-<br />
|Steve Ardagh-Walter<br />
|sardaghwalter@gmail.com<br />
|[http://www.levelx.info/ Levelx.info]<br />
|Road user alerts for level crossing closures. Early stage work in progress<br />
|-<br />
|RDF Group<br />
|[http://www.rdfgroup.com/contact/ Contact form]<br />
|[http://www.railtracker.co.uk/ Railtracker]<br />
|Real-time tracking of delays<br />
|-<br />
|Phil Wieland<br />
|phil@philwieland.com<br />
|[https://github.com/philwieland/openrail GIT Openrail]<br />
[http://charlwoodhouse.co.uk/ Livesig]<br />
|Open source software to download and process timetable, movement and TD streams.<br />
Real time signalling diagram.<br />
|-<br />
|Marc Siegenthaler<br />
|marc@level-crossing.co.uk<br />
|[http://www.level-crossing.co.uk Level-Crossing.co.uk]<br />
|Real-time information about level crossings.<br />
|}<br />
[[Category:Network Rail Data Feeds]]<br />
[[Category:Projects]]</div>Nathan Johnson 2https://wiki.openraildata.com//index.php?title=TOC_Codes&diff=876TOC Codes2014-09-13T19:23:29Z<p>Nathan Johnson 2: Added new ATOC codes</p>
<hr />
<div>This table lists the codes used to identify Train Operating Companies (TOCs) in the various data feeds available from Network Rail. Different feeds use different sets of codes to refer to the same company.<br />
<br />
* ''Company Name'' is the name of the Train Operating Company<br />
* ''Business Code'' is a two-character code used within the TRUST system. It is used in the names of the individual [[Train_Movements | train movement feeds]].<br />
* ''Sector Code'' is the sector code used to represent the TOC in [[Train_Movements | TRUST messages]]. <br />
* ''ATOC Code'' is a two-character code used to representing the TOC in the [[SCHEDULE]] feed. Freight trains are represented by an ATOC code of ''ZZ''.<br />
<br />
{| class="wikitable sortable"<br />
|-<br />
!Company Name<br />
!Business Code<br />
!Numeric Code<br />
!ATOC Code<br />
|-<br />
|Abellio Greater Anglia<br />
|EB<br />
|21<br />
|LE<br />
|-<br />
|Arriva Trains Wales<br />
|HL<br />
|71<br />
|AW<br />
|-<br />
|c2c<br />
|HT<br />
|79<br />
|CC<br />
|-<br />
|Chiltern Railway<br />
|HO<br />
|74<br />
|CH<br />
|-<br />
|CrossCountry<br />
|EH<br />
|27<br />
|XC<br />
|-<br />
|Devon and Cornwall Railway<br />
|EN<br />
|34<br />
|DC<br />
|-<br />
|East Midlands Trains<br />
|EM<br />
|28<br />
|EM<br />
|-<br />
|East Coast<br />
|HB<br />
|61<br />
|GR<br />
|-<br />
|Eurostar<br />
|GA<br />
|06<br />
|ES<br />
|-<br />
|First Capital Connect<br />
|EG<br />
|26<br />
|FC<br />
|-<br />
|First Great Western<br />
|EF<br />
|25<br />
|GW<br />
|-<br />
|First Hull Trains<br />
|PF<br />
|55<br />
|HT<br />
|-<br />
|First Scotrail<br />
|HA<br />
|60<br />
|SR<br />
|-<br />
|First Transpennine Express<br />
|EA<br />
|20<br />
|TP<br />
|-<br />
|Gatwick Express<br />
|HV<br />
|81<br />
|GX<br />
|-<br />
|Grand Central<br />
|EC<br />
|22<br />
|GC<br />
|-<br />
|Great Northern<br />
|<br />
|<br />
|GN<br />
|-<br />
|Heathrow Connect<br />
|EE<br />
|24<br />
|HC<br />
|-<br />
|Heathrow Express<br />
|HM<br />
|86<br />
|HX<br />
|-<br />
|Island Lines<br />
|HZ<br />
|85<br />
|IL<br />
|-<br />
|London Midland<br />
|EJ<br />
|29<br />
|LM<br />
|-<br />
|London Overground<br />
|EK<br />
|30<br />
|LO<br />
|-<br />
|LUL Bakerloo Line<br />
|XC<br />
|91<br />
|LT<br />
|-<br />
|LUL District Line – Wimbledon<br />
|XB<br />
|90<br />
|LT<br />
|-<br />
|LUL District Line – Richmond<br />
|XE<br />
|93<br />
|LT<br />
|-<br />
|Merseyrail<br />
|HE<br />
|64<br />
|ME<br />
|-<br />
|Nexus (Tyne & Wear Metro)<br />
|PG<br />
|56<br />
|TW<br />
|-<br />
|North Yorkshire Moors Railway<br />
|PR<br />
|51<br />
|NY<br />
|-<br />
|Northern Rail<br />
|ED<br />
|23<br />
|NT<br />
|-<br />
|South West Trains<br />
|HY<br />
|84<br />
|SW<br />
|-<br />
|Southeastern<br />
|HU<br />
|80<br />
|SE<br />
|-<br />
|Southern<br />
|HW<br />
|82<br />
|SN<br />
|-<br />
|Thameslink<br />
|<br />
|<br />
|TL<br />
|-<br />
|Virgin Trains<br />
|HF<br />
|65<br />
|VT<br />
|-<br />
|West Coast Railway Co.<br />
|PA<br />
|50<br />
|WR<br />
|-<br />
|}<br />
<br />
{{Navtable-DataFeeds}}<br />
<br />
[[Category:Reference Data]]<br />
[[Category:Train Movement Data]]<br />
[[Category:Schedule Data]]</div>Nathan Johnson 2https://wiki.openraildata.com//index.php?title=About_the_National_Rail_Feeds&diff=830About the National Rail Feeds2014-05-31T15:34:30Z<p>Nathan Johnson 2: </p>
<hr />
<div>In May 2014, [http://www.nationalrail.co.uk/ National Rail Enquiries] announced changes to its licensing conditions for using data from their [http://www.nationalrail.co.uk/contact/feedback/46615.aspx Darwin] system.<br />
<br />
The following documentation is available for the feeds:<br />
<br />
* [http://www.slideshare.net/nationalrailenq/nre-developer-terms-conditions Developer Terms & Conditions]<br />
* [http://www.slideshare.net/nationalrailenq/nre-developer-guidelines-v-22 Developer Guidelines]<br />
* [http://www.slideshare.net/nationalrailenq/nre-usage-charging-document-v-10-35307736 Usage Charging Document]<br />
<br />
It is anticipated that further information on the feeds, including their format and use cases, will be documented by the Open Rail Data community and made available here in due course.</div>Nathan Johnson 2https://wiki.openraildata.com//index.php?title=Projects&diff=724Projects2013-07-06T21:39:07Z<p>Nathan Johnson 2: /* Existing projects */</p>
<hr />
<div>= Community projects =<br />
<br />
There are several community-driven projects which are creating additional datasets or adding value to existing ones. Some of these may need help - if you're interested in helping out, please get in touch with the organiser.<br />
<br />
* [[AddingJunctionsAndSidingsToOsm|Adding junctions and sidings to OpenStreetMap]]<br />
<br />
= Existing projects =<br />
<br />
There are a number of people working on projects using rail data. Please add yourself to this list if you are too!<br />
<br />
{|class="wikitable"<br />
!Who<br />
!Email<br />
!Project<br />
!Details<br />
|-<br />
|Peter Hicks<br />
|peter.hicks@poggs.co.uk<br />
|[http://www.opentraintimes.com/ OpenTrainTimes]<br />
|First user of Network Rail data. Timetables and real-time signalling maps<br />
|-<br />
|Tom Cairns<br />
|admin@swlines.co.uk<br />
|[http://www.realtimetrains.co.uk/ RealTimeTrains]<br />
|Real-time and historical train schedules using TRUST and TD data<br />
|-<br />
|Matthew Cockburn<br />
|matthew.cockburn@blueyonder.co.uk<br />
|[http://www.tinyurl.com/wheresmytrain/ Trains around Bristol]<br />
|Real-time locations using TD data STANOX field<br />
|-<br />
|Rob West<br />
|feedback@raildar.co.uk<br />
|[http://raildar.co.uk/ Raildar]<br />
|Searchable historic train performance, statistics, departure boards and real-time location plotting<br />
|-<br />
|Placr<br />
|info@placr.co.uk<br />
|[https://developer.transportapi.com/ TransportAPI]<br />
|Aggregation and analytics service for UK public transport<br />
|-<br />
|RailCam<br />
|unknown<br />
|[http://railcam.tv/diagram/prestonstation.php Railcam.TV]<br />
|Trackside cameras and signalling diagrams<br />
|-<br />
|Real-time PPM<br />
|unknown<br />
|[http://www.realtimeflow.co.uk/ppm/ Real-time PPM]<br />
|A real-time display of PPM data and Twitter messages<br />
|-<br />
|GB Rail Info<br />
|nathan@gbrail.info<br />
|[http://www.gbrail.info/ GB Rail Info]<br />
|Journey planner based on Network Rail and ATOC data<br />
|}<br />
<br />
[[Category:Network Rail Data Feeds]]<br />
[[Category:Projects]]</div>Nathan Johnson 2https://wiki.openraildata.com//index.php?title=SCHEDULE&diff=344SCHEDULE2013-01-29T17:52:21Z<p>Nathan Johnson 2: /* Validity */</p>
<hr />
<div>= Schedule data =<br />
<br />
== Overview ==<br />
<br />
The Schedule feed is an extract of train schedules from Network Rail's ITPS (Integrated Train Planning System), converted in to JSON format for easier parsing. Network Rail are not planning to make raw CIF files available.<br />
<br />
Schedule files are available for all passenger TOCs and for each TOC. Two types of file are available - a 'full' file which contains a snapshot of all schedules, and an 'update' file which can be applied to a a local database to bring it up-to-date with any changes.<br />
<br />
The [http://www.atoc.org/about-atoc/rail-settlement-plan/data-feeds/types-of-data CIF User Specification] is available from ATOC's website, which details the format of the CIF file. This will be useful to developers wishing to gain deep understanding about the way train scheduling works, above and beyond the information contained here.<br />
<br />
== Downloading ==<br />
<br />
The schedule data, compressed using gzip, is downloaded from Amazon S3 via a private URL which is valid for a few minutes after generation.<br />
<br />
To request schedule data, send an HTTP request with your username and password to:<br />
<br />
https://datafeeds.networkrail.co.uk/ntrod/CifFileAuthenticate?type=bucket&day=file<br />
<br />
For example:<br />
<br />
https://datafeeds.networkrail.co.uk/ntrod/CifFileAuthenticate?type=CIF_ALL_FULL_DAILY&day=toc-full<br />
<br />
'type' and 'day' values should be one of the following:<br />
<br />
{| class='wikitable'<br />
!Type<br />
!Day<br />
!Description<br />
|-<br />
|CIF_ALL_FULL_DAILY<br />
|toc-daily<br />
|Daily all-TOC snapshot<br />
|-<br />
|CIF_ALL_UPDATE_DAILY<br />
|toc-update-DAY<br />
|Daily all-TOC update<br />
|-<br />
|CIF_XX_TOC_FULL_DAILY<br />
|toc-full<br />
|Daily snapshot for TOC XX<br />
|-<br />
|CIF_XX_TOC_UPDATE_DAILY<br />
|toc-update-DAY<br />
|Daily update for TOC XX<br />
|-<br />
|}<br />
<br />
'''DAY''' should be replaced with the date of the previous day. For example, on Monday, Sunday's ('sun') update should be requested.<br />
<br />
A list of [[TOC Codes]] is available. Note that the TOC code used in the URL is not the ATOC code as seen in schedule files, but the business code as used in Network Rail systems.<br />
<br />
Replace '''bucket''' with the name of the bucket, and '''file''' with the name of the file. On successful authentication, you will receive a 403 redirect to the location of the schedule files.<br />
<br />
== Data ==<br />
<br />
The schedule data contains a header row, a set of zero or more association records, a set of zero or more schedule records, and an end-of-file (EOF) record.<br />
<br />
Each association and schedule record has an action - either 'create' or 'delete'. In full files, there will be no 'delete' records.<br />
<br />
Update files must be applied sequentially to a full file.<br />
<br />
== Interpretation ==<br />
<br />
=== Validity ===<br />
<br />
Associations and schedule validities are between a start date and an end date, and on particular days of the week. They each have a Short Term Planning (STP) indicator field as follows:<br />
<br />
* '''C''' - Planned cancellation: the schedule does not apply on this date, and the train will not run. Typically seen on public holidays when an alternate schedule applies, or on Christmas Day.<br />
* '''N''' - STP schedule: similar to a permanent schedule, but planned through the Short Term Planning process<br />
* '''O''' - Overlay schedule: an alteration to a permanent schedule<br />
* '''P''' - Permanent schedule: a schedule planned through the Long Term Planning process<br />
<br />
For any date a permanent schedule ('P') is valid, it may be overridden by an overlay ('O') or a planned cancellation ('C'). However, if any two schedules appear to be valid for a particular day, the schedule with the lowest alphabetical STP indicator wins.<br />
<br />
=== Schedules ===<br />
<br />
A schedule comprises a header containing a schedule UID, data about the schedule (including whether it is a train, bus or ship) and validity dates, and an ordered list of locations and times at which a particular service should arrive, depart or pass.<br />
<br />
* Originating locations will always have a WTT departure time and optionally a public departure time<br />
* Intermediate locations in a schedule will have a passing time if they are a mandatory timing point, or an arrival and departure time if the train carries out an activity at that location<br />
* Terminating locations will always have a WTT arrival time and optionally a public arrival time, which may be some minutes later than the WTT time<br />
* A location may have one or more activities associated with it - for example, '''U''' for locations where the train calls to pick up passengers (i.e. not available for alighting), '''D''' for locations where the train calls to set down passengers (i.e. not available for boarding).<br />
* A location may have engineering, pathing or performance allowances<br />
<br />
=== Associations ===<br />
<br />
Associations are relationships between two schedules - a main train and an associated train.<br />
<br />
There are three types of association:<br />
<br />
* '''NP''' - Next Train. Not present for all schedules, but indicates the UID of the next service that the vehicle on this service will work<br />
* '''JJ''' - Join. Occurs at the end of the associated train's schedule.<br />
* '''VV''' - Split. Occurs at an intermediate location of the main train's schedule and indicates another train services that part of this train will form.<br />
<br />
Associations may be for the same day ('''S'''), or cross midnight either backward ('''P''') or forward ('''N''') depending on the date indicator field.</div>Nathan Johnson 2https://wiki.openraildata.com//index.php?title=SCHEDULE&diff=343SCHEDULE2013-01-29T17:48:46Z<p>Nathan Johnson 2: /* Validity */</p>
<hr />
<div>= Schedule data =<br />
<br />
== Overview ==<br />
<br />
The Schedule feed is an extract of train schedules from Network Rail's ITPS (Integrated Train Planning System), converted in to JSON format for easier parsing. Network Rail are not planning to make raw CIF files available.<br />
<br />
Schedule files are available for all passenger TOCs and for each TOC. Two types of file are available - a 'full' file which contains a snapshot of all schedules, and an 'update' file which can be applied to a a local database to bring it up-to-date with any changes.<br />
<br />
The [http://www.atoc.org/about-atoc/rail-settlement-plan/data-feeds/types-of-data CIF User Specification] is available from ATOC's website, which details the format of the CIF file. This will be useful to developers wishing to gain deep understanding about the way train scheduling works, above and beyond the information contained here.<br />
<br />
== Downloading ==<br />
<br />
The schedule data, compressed using gzip, is downloaded from Amazon S3 via a private URL which is valid for a few minutes after generation.<br />
<br />
To request schedule data, send an HTTP request with your username and password to:<br />
<br />
https://datafeeds.networkrail.co.uk/ntrod/CifFileAuthenticate?type=bucket&day=file<br />
<br />
For example:<br />
<br />
https://datafeeds.networkrail.co.uk/ntrod/CifFileAuthenticate?type=CIF_ALL_FULL_DAILY&day=toc-full<br />
<br />
'type' and 'day' values should be one of the following:<br />
<br />
{| class='wikitable'<br />
!Type<br />
!Day<br />
!Description<br />
|-<br />
|CIF_ALL_FULL_DAILY<br />
|toc-daily<br />
|Daily all-TOC snapshot<br />
|-<br />
|CIF_ALL_UPDATE_DAILY<br />
|toc-update-DAY<br />
|Daily all-TOC update<br />
|-<br />
|CIF_XX_TOC_FULL_DAILY<br />
|toc-full<br />
|Daily snapshot for TOC XX<br />
|-<br />
|CIF_XX_TOC_UPDATE_DAILY<br />
|toc-update-DAY<br />
|Daily update for TOC XX<br />
|-<br />
|}<br />
<br />
'''DAY''' should be replaced with the date of the previous day. For example, on Monday, Sunday's ('sun') update should be requested.<br />
<br />
A list of [[TOC Codes]] is available. Note that the TOC code used in the URL is not the ATOC code as seen in schedule files, but the business code as used in Network Rail systems.<br />
<br />
Replace '''bucket''' with the name of the bucket, and '''file''' with the name of the file. On successful authentication, you will receive a 403 redirect to the location of the schedule files.<br />
<br />
== Data ==<br />
<br />
The schedule data contains a header row, a set of zero or more association records, a set of zero or more schedule records, and an end-of-file (EOF) record.<br />
<br />
Each association and schedule record has an action - either 'create' or 'delete'. In full files, there will be no 'delete' records.<br />
<br />
Update files must be applied sequentially to a full file.<br />
<br />
== Interpretation ==<br />
<br />
=== Validity ===<br />
<br />
Associations and schedule validities are between a start date and an end date, and on particular days of the week. They each have a Short Term Planning (STP) indicator field as follows:<br />
<br />
* '''C''' - Planned cancellation: the schedule does not apply on this date, and the train will not run. Typically seen on public holidays when an alternate schedule applies, or on Christmas Day.<br />
* '''N''' - STP schedule: similar to a permanent schedule, but planned through the Short Term Planning process<br />
* '''O''' - Overlay schedule: an alteration to a permanent schedule<br />
* '''P''' - Permanent schedule: a schedule planned through the Long Term Planning process<br />
<br />
For any date a permanent schedule ('P') is valid, it may be overridden by an overlay ('O') or a planned cancellation ('C'). However, if two schedules appear to be valid for a particular day, the schedule with the lowest alphabetical STP indicator wins.<br />
<br />
=== Schedules ===<br />
<br />
A schedule comprises a header containing a schedule UID, data about the schedule (including whether it is a train, bus or ship) and validity dates, and an ordered list of locations and times at which a particular service should arrive, depart or pass.<br />
<br />
* Originating locations will always have a WTT departure time and optionally a public departure time<br />
* Intermediate locations in a schedule will have a passing time if they are a mandatory timing point, or an arrival and departure time if the train carries out an activity at that location<br />
* Terminating locations will always have a WTT arrival time and optionally a public arrival time, which may be some minutes later than the WTT time<br />
* A location may have one or more activities associated with it - for example, '''U''' for locations where the train calls to pick up passengers (i.e. not available for alighting), '''D''' for locations where the train calls to set down passengers (i.e. not available for boarding).<br />
* A location may have engineering, pathing or performance allowances<br />
<br />
=== Associations ===<br />
<br />
Associations are relationships between two schedules - a main train and an associated train.<br />
<br />
There are three types of association:<br />
<br />
* '''NP''' - Next Train. Not present for all schedules, but indicates the UID of the next service that the vehicle on this service will work<br />
* '''JJ''' - Join. Occurs at the end of the associated train's schedule.<br />
* '''VV''' - Split. Occurs at an intermediate location of the main train's schedule and indicates another train services that part of this train will form.<br />
<br />
Associations may be for the same day ('''S'''), or cross midnight either backward ('''P''') or forward ('''N''') depending on the date indicator field.</div>Nathan Johnson 2https://wiki.openraildata.com//index.php?title=TOC_Codes&diff=341TOC Codes2013-01-28T17:02:27Z<p>Nathan Johnson 2: </p>
<hr />
<div>* 'Company name' is the name of the operating company.<br />
* 'Business code' is the two-character code used as part of the NCI sign-in to TRUST and seen in the names of the train movement feeds.<br />
* 'Code' is the numeric code used to represent the TOC in TRUST messages.<br />
* Additionally, freight trains are represented by an ATOC code of "ZZ".<br />
<br />
{| class="wikitable"<br />
|-<br />
!Company name<br />
!Business Code<br />
!Numeric Code<br />
!ATOC<br />
|-<br />
|Arriva Trains Wales<br />
|HL<br />
|71<br />
|AW<br />
|-<br />
|c2c<br />
|HT<br />
|79<br />
|CC<br />
|-<br />
|Chiltern Railway<br />
|HO<br />
|74<br />
|CH<br />
|-<br />
|CrossCountry<br />
|EH<br />
|27<br />
|XC<br />
|-<br />
|Devon and Cornwall Railway<br />
|EN<br />
|34<br />
|DC<br />
|-<br />
|East Midlands Trains<br />
|EM<br />
|28<br />
|EM<br />
|-<br />
|East Coast<br />
|HB<br />
|61<br />
|GR<br />
|-<br />
|Eurostar<br />
|GA<br />
|6<br />
|ES<br />
|-<br />
|First Capital Connect<br />
|EG<br />
|26<br />
|FC<br />
|-<br />
|First Great Western<br />
|EF<br />
|25<br />
|GW<br />
|-<br />
|First Hull Trains<br />
|PF<br />
|55<br />
|HT<br />
|-<br />
|First Scotrail<br />
|HA<br />
|60<br />
|SR<br />
|-<br />
|First Transpennine Express<br />
|EA<br />
|20<br />
|TP<br />
|-<br />
|Gatwick Express<br />
|HV<br />
|81<br />
|GX<br />
|-<br />
|Grand Central<br />
|EC<br />
|22<br />
|GC<br />
|-<br />
|Heathrow Connect<br />
|EE<br />
|24<br />
|HC<br />
|-<br />
|Heathrow Express<br />
|HM<br />
|86<br />
|HX<br />
|-<br />
|Island Lines<br />
|HZ<br />
|85<br />
|IL<br />
|-<br />
|London Midland<br />
|EJ<br />
|29<br />
|LM<br />
|-<br />
|London Overground<br />
|EK<br />
|30<br />
|LO<br />
|-<br />
|LUL Bakerloo Line<br />
|XC<br />
|91<br />
|LT<br />
|-<br />
|LUL District Line – Wimbledon<br />
|XB<br />
|90<br />
|LT<br />
|-<br />
|LUL District Line – Richmond<br />
|XE<br />
|93<br />
|LT<br />
|-<br />
|Merseyrail<br />
|HE<br />
|64<br />
|ME<br />
|-<br />
|Greater Anglia<br />
|EB<br />
|21<br />
|LE<br />
|-<br />
|Nexus (Tyne & Wear Metro)<br />
|PG<br />
|56<br />
|TW<br />
|-<br />
|North Yorkshire Moors Railway<br />
|PR<br />
|51<br />
|NY<br />
|-<br />
|Northern Rail<br />
|ED<br />
|23<br />
|NT<br />
|-<br />
|South West Trains<br />
|HY<br />
|84<br />
|SW<br />
|-<br />
|Southeastern<br />
|HU<br />
|80<br />
|SE<br />
|-<br />
|Southern<br />
|HW<br />
|82<br />
|SN<br />
|-<br />
|Virgin Trains<br />
|HF<br />
|65<br />
|VT<br />
|-<br />
|West Coast Railway Co.<br />
|PA<br />
|50<br />
|WR<br />
|-<br />
|}</div>Nathan Johnson 2https://wiki.openraildata.com//index.php?title=TOC_Codes&diff=340TOC Codes2013-01-28T17:02:01Z<p>Nathan Johnson 2: Added reference to ATOC code "ZZ".</p>
<hr />
<div>* 'Company name' is the name of the operating company<br />
* 'Business code' is the two-character code used as part of the NCI sign-in to TRUST and seen in the names of the train movement feeds<br />
* 'Code' is the numeric code used to represent the TOC in TRUST messages<br />
* Additionally, freight trains are represented by an ATOC code of "ZZ".<br />
<br />
{| class="wikitable"<br />
|-<br />
!Company name<br />
!Business Code<br />
!Numeric Code<br />
!ATOC<br />
|-<br />
|Arriva Trains Wales<br />
|HL<br />
|71<br />
|AW<br />
|-<br />
|c2c<br />
|HT<br />
|79<br />
|CC<br />
|-<br />
|Chiltern Railway<br />
|HO<br />
|74<br />
|CH<br />
|-<br />
|CrossCountry<br />
|EH<br />
|27<br />
|XC<br />
|-<br />
|Devon and Cornwall Railway<br />
|EN<br />
|34<br />
|DC<br />
|-<br />
|East Midlands Trains<br />
|EM<br />
|28<br />
|EM<br />
|-<br />
|East Coast<br />
|HB<br />
|61<br />
|GR<br />
|-<br />
|Eurostar<br />
|GA<br />
|6<br />
|ES<br />
|-<br />
|First Capital Connect<br />
|EG<br />
|26<br />
|FC<br />
|-<br />
|First Great Western<br />
|EF<br />
|25<br />
|GW<br />
|-<br />
|First Hull Trains<br />
|PF<br />
|55<br />
|HT<br />
|-<br />
|First Scotrail<br />
|HA<br />
|60<br />
|SR<br />
|-<br />
|First Transpennine Express<br />
|EA<br />
|20<br />
|TP<br />
|-<br />
|Gatwick Express<br />
|HV<br />
|81<br />
|GX<br />
|-<br />
|Grand Central<br />
|EC<br />
|22<br />
|GC<br />
|-<br />
|Heathrow Connect<br />
|EE<br />
|24<br />
|HC<br />
|-<br />
|Heathrow Express<br />
|HM<br />
|86<br />
|HX<br />
|-<br />
|Island Lines<br />
|HZ<br />
|85<br />
|IL<br />
|-<br />
|London Midland<br />
|EJ<br />
|29<br />
|LM<br />
|-<br />
|London Overground<br />
|EK<br />
|30<br />
|LO<br />
|-<br />
|LUL Bakerloo Line<br />
|XC<br />
|91<br />
|LT<br />
|-<br />
|LUL District Line – Wimbledon<br />
|XB<br />
|90<br />
|LT<br />
|-<br />
|LUL District Line – Richmond<br />
|XE<br />
|93<br />
|LT<br />
|-<br />
|Merseyrail<br />
|HE<br />
|64<br />
|ME<br />
|-<br />
|Greater Anglia<br />
|EB<br />
|21<br />
|LE<br />
|-<br />
|Nexus (Tyne & Wear Metro)<br />
|PG<br />
|56<br />
|TW<br />
|-<br />
|North Yorkshire Moors Railway<br />
|PR<br />
|51<br />
|NY<br />
|-<br />
|Northern Rail<br />
|ED<br />
|23<br />
|NT<br />
|-<br />
|South West Trains<br />
|HY<br />
|84<br />
|SW<br />
|-<br />
|Southeastern<br />
|HU<br />
|80<br />
|SE<br />
|-<br />
|Southern<br />
|HW<br />
|82<br />
|SN<br />
|-<br />
|Virgin Trains<br />
|HF<br />
|65<br />
|VT<br />
|-<br />
|West Coast Railway Co.<br />
|PA<br />
|50<br />
|WR<br />
|-<br />
|}</div>Nathan Johnson 2https://wiki.openraildata.com//index.php?title=TOC_Codes&diff=335TOC Codes2013-01-28T13:23:30Z<p>Nathan Johnson 2: East Coast is GR, apparently.</p>
<hr />
<div>* 'Company name' is the name of the operating company<br />
* 'Business code' is the two-character code used as part of the NCI sign-in to TRUST and seen in the names of the train movement feeds<br />
* 'Code' is the numeric code used to represent the TOC in TRUST messages<br />
<br />
{| class="wikitable"<br />
|-<br />
!Company name<br />
!Business Code<br />
!Numeric Code<br />
!ATOC<br />
|-<br />
|Arriva Trains Wales<br />
|HL<br />
|71<br />
|AW<br />
|-<br />
|c2c<br />
|HT<br />
|79<br />
|CC<br />
|-<br />
|Chiltern Railway<br />
|HO<br />
|74<br />
|CH<br />
|-<br />
|CrossCountry<br />
|EH<br />
|27<br />
|XC<br />
|-<br />
|Devon and Cornwall Railway<br />
|EN<br />
|34<br />
|DC<br />
|-<br />
|East Midlands Trains<br />
|EM<br />
|28<br />
|EM<br />
|-<br />
|East Coast<br />
|HB<br />
|61<br />
|GR<br />
|-<br />
|Eurostar<br />
|GA<br />
|6<br />
|ES<br />
|-<br />
|First Capital Connect<br />
|EG<br />
|26<br />
|FC<br />
|-<br />
|First Great Western<br />
|EF<br />
|25<br />
|GW<br />
|-<br />
|First Hull Trains<br />
|PF<br />
|55<br />
|HT<br />
|-<br />
|First Scotrail<br />
|HA<br />
|60<br />
|SR<br />
|-<br />
|First Transpennine Express<br />
|EA<br />
|20<br />
|TP<br />
|-<br />
|Gatwick Express<br />
|HV<br />
|81<br />
|GX<br />
|-<br />
|Grand Central<br />
|EC<br />
|22<br />
|GC<br />
|-<br />
|Heathrow Connect<br />
|EE<br />
|24<br />
|HC<br />
|-<br />
|Heathrow Express<br />
|HM<br />
|86<br />
|HX<br />
|-<br />
|Island Lines<br />
|HZ<br />
|85<br />
|IL<br />
|-<br />
|London Midland<br />
|EJ<br />
|29<br />
|LM<br />
|-<br />
|London Overground<br />
|EK<br />
|30<br />
|LO<br />
|-<br />
|LUL Bakerloo Line<br />
|XC<br />
|91<br />
|LT<br />
|-<br />
|LUL District Line – Wimbledon<br />
|XB<br />
|90<br />
|LT<br />
|-<br />
|LUL District Line – Richmond<br />
|XE<br />
|93<br />
|LT<br />
|-<br />
|Merseyrail<br />
|HE<br />
|64<br />
|ME<br />
|-<br />
|Greater Anglia<br />
|EB<br />
|21<br />
|LE<br />
|-<br />
|Nexus (Tyne & Wear Metro)<br />
|PG<br />
|56<br />
|TW<br />
|-<br />
|North Yorkshire Moors Railway<br />
|PR<br />
|51<br />
|NY<br />
|-<br />
|Northern Rail<br />
|ED<br />
|23<br />
|NT<br />
|-<br />
|South West Trains<br />
|HY<br />
|84<br />
|SW<br />
|-<br />
|Southeastern<br />
|HU<br />
|80<br />
|SE<br />
|-<br />
|Southern<br />
|HW<br />
|82<br />
|SN<br />
|-<br />
|Virgin Trains<br />
|HF<br />
|65<br />
|VT<br />
|-<br />
|West Coast Railway Co.<br />
|PA<br />
|50<br />
|WR<br />
|-<br />
|}</div>Nathan Johnson 2https://wiki.openraildata.com//index.php?title=User:Nathan_Johnson_2&diff=303User:Nathan Johnson 22013-01-17T22:33:17Z<p>Nathan Johnson 2: Undo revision 302 by Nathan Johnson 2 (talk)</p>
<hr />
<div>British-American currently attending university in New York, studying Education, Mathematics, and Computer Science. Born in Bristol and raised in South Gloucestershire, Birmingham, Dumfries, and Cumbria. Interests include teaching, philosophy, travel, programming, topology, and combinatorics. Currently writing software to make sense of the British rail system with the intent of informing and empowering regular rail passengers.</div>Nathan Johnson 2https://wiki.openraildata.com//index.php?title=User:Nathan_Johnson_2&diff=302User:Nathan Johnson 22013-01-17T22:32:37Z<p>Nathan Johnson 2: </p>
<hr />
<div>British-American currently attending university in New York, studying Education, Mathematics, and Computer Science. Born in Bristol and raised in South Gloucestershire, Birmingham, Dumfries, and Cumbria. Interests include teaching, philosophy, travel, programming, topology, and combinatorics. Currently writing software to make sense of the British rail system with the intent of informing and empowering regular rail passengers...</div>Nathan Johnson 2