Hussein-Mahfouz / drt-potential

3 stars 0 forks source link

Rail data in GTFS format #7

Closed Hussein-Mahfouz closed 8 months ago

Hussein-Mahfouz commented 10 months ago

Sources of rail data

Light Rail

Traveline (light rail) - link

Heavy Rail

ATOC (heavy rail) - link

Network Rail - link

Hussein-Mahfouz commented 10 months ago

Data shared by Malcolm

  1. ATOC: UK2GTFS/ATOC/GTFS/2023-05-03.zip (I thought ATOC was last updated in 2011?)
  2. Network Rail: UK2GTFS/Network Rail Schedule/toc-full.CIF
  3. TransXchange: UK2GTFS/TransXchange/GTFS/GTFS_2023_05_03

Questions for Malcolm

Hi @mem48, could you help me with this issue please?

mem48 commented 10 months ago

Transxchange is for bus and light rail, the ATOC data is still updated regularly

mem48 commented 10 months ago

1 and 3 are different, but I periodically grab all data sources so tend to be on same/similar dates

mem48 commented 10 months ago

I believe BODS now has light rail, but you would have to check. For heavy rail ATOC is the best source

mem48 commented 10 months ago

See https://itsleeds.github.io/UK2GTFS/articles/ATOC.html

Hussein-Mahfouz commented 10 months ago

Thanks @mem48!

TODO:

Hussein-Mahfouz commented 10 months ago

Are some agencies missing from ATOC data?

I managed to download the data from ATOC and convert it using UK2GTFS::atoc2gtfs. I then clipped it to the study area (west yorkshire) using gtfstools::filter_by_sf(). The function has a keep argument which keeps any route as long as one of its stops is in the geometry you are clipping by.

After checking the agencies in the filtered gtfs, they are only 5 (down from 71). This makes sense except LNER is no longer available (LNER is in the agency file of the unfiltered feed: agency_name = "London North Eastern Railway", agency_id = "HB". These are the agencies remaining in the filtered feed:

image

I thought it was a bug in filter_by_sf(), but when I checked the routes table in the unfiltered feed, there are no LNER routes (routes with agency_id == "HB")

I tried another GTFS feed from Malcolm's onedrive UK2GTFS/ATOC/GTFS/2023-05-03.zip, but the same problem exists: LNER is in the agency table, but not in the routes table

@mem48 have you come across this issue before with atoc data?

mem48 commented 10 months ago

Could they be in some other agency ID?

mem48 commented 10 months ago

The raw data does not have the agency ID values they are added by UK2GTFS

mem48 commented 10 months ago

Perhaps GR, East Coast? This may be a bug in UK2GTFS as East Coast was the old operator before LNER

Hussein-Mahfouz commented 10 months ago

@mem48 yes they are all under GR, East Coast (131 different entries in the routes table of the unfiltered feed, 18 entries in the filtered feed - see screenshot). Thanks! Is this worth opening an issue in UK2GTFS for?

image