ITSLeeds / UK2GTFS

Convert UK transport data (TransXchange / ATOC CIF) to GTFS format in R
https://itsleeds.github.io/UK2GTFS/
GNU General Public License v3.0
37 stars 13 forks source link

Unknown Activity Codes #17

Closed tg137 closed 4 years ago

tg137 commented 4 years ago

When downloading the CIF file from the Network Rail Datafeeds (https://datafeeds.networkrail.co.uk/ntrod/login), the following activity codes are unknown:

Unknown Activity codes 'TFC' 'TFPR' 'TFOP' 'TFC -D' 'TFRMA' 'TFTS' 'T RRPR' 'T RMA PR' 'T RRA' 'TS TFC A' 'TFA' 'T KE' 'TFC -U' 'TFRR' 'TFT RM' 'U -UL' 'W U' 'W D' 'TFRM-U' 'TFT RM-D' 'TFOPRM' 'T RM-D K' 'T C -D' 'TFC A' 'TFA RM' 'TFRM-D' 'TFRMOP' 'T RMPR' 'TFC OP' 'TFA C' 'RM-D D' please report these codes as a GitHub Issue

There is also a further question here as the network rail datafeeds return a single file which is the daily schedule snapshot for all TOCs (see here for more detail).

UK2GTFS expects there to be 8 files (as with what is returned from the RDG). It would be worth investigating how to deal with the single file returned from the datafeeds.

mem48 commented 4 years ago

Hi @tg137 Thanks for reporting the codes, I'll issue an update to support them.

I'm surprised that UK2GTFS worked at all with data from a different source. Is it just a subset of the RDG data or a different format?

tg137 commented 4 years ago

No worries :) Thanks for writing this in the first place!

It's meant to represent the same data but it's all contained within the same file.

Interestingly, if you get the daily RDG data from their SFTP server, the following codes are unknown: Unknown Activity codes 'T RM-D K' 'T C -D' 'TFRM-D' 'TFT RM' 'U -UL' 'TFT RM-D' 'T OR L A' 'TFOP' 'RM-D D' 'TFRM-U'

They also format the files slightly differently which leads to some problems which I'll raise in a separate issue :)

mem48 commented 4 years ago

@tg137 I've pushed a new function nr2gtfs which shoulld support the network rail data feed. Also I've made some changes to atoc2gtfs it now returns the gtfs object to R, you can use gtfs_write to save it as a file.

I've made this change as it makes it easier to check or modify the gtfs before writing to disk