Skip to content

ducminh-phan/Public-Transit-Data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Public Transit Data

Information extracted from GTFS transit feeds to use with RAPTOR algorithm.

Each folder corresponding to the public transport data of a location, and consists of the following files:

All the files are in gzip format, each line of the decompressed files can be considered as a row of a table, consisting of the same number of columns, with the following differences:

  • *.csv.gz files: the elements in each row are separated by a comma, and each file has a header,
  • *.gr.gz files: the elements in each row are separated by a space, and there is no header.

stop_routes.csv.gz

Header: stop_id,route_id

This file contains the information about the routes serving a stop in the timetable. The rows s,r indicate that the stop s is served by the route r.

trips.csv.gz

Header: route_id,trip_id

This file contains the information about the trips belong to a route. The rows r,t indicate that the trip t belongs to the route r. Every trip of a route has the same stop sequence, which can be found using stop_times.csv.gz.

Moreover, the rows are sorted by the id of the routes. And in each group of trips belong to the same route, the trips are sorted so that the departure times at each stop of a trip is after that of the previous trip at the same stop. For example, if we organize the departure times of a route into a table as below, where s[0], s[1], s[2] are the stops, t[0], t[1], t[2] are the trips after being ordered, dep[i, j] is the departure time of the trip t[i] at stop s[j], then dep[i+1, j] >= dep[i, j] for all i, j.

s[0] s[1] s[2]
t[0] dep[0, 0] dep[0, 1] dep[0, 2]
t[1] dep[1, 0] dep[1, 1] dep[1, 2]
t[2] dep[2, 0] dep[2, 1] dep[2, 2]

stop_times.csv.gz

Header: trip_id,arrival_time,departure_time,stop_id,stop_sequence

  • trip_id/stop_id: The id of the trip/stop to which the event represented by a row belongs.
  • arrival_time/departure_time: The arrival/departure times at the stop stop_id for the trip trip_id. The unit is second, counted from midnight.
  • stop_sequence: The stop_sequence field identifies the order of the stops for a particular trip. The values for stop_sequence are non-negative integers, and increasing along the trip.

transfers.csv.gz

Header: from_stop_id,to_stop_id,min_transfer_time

  • from_stop_id: The from_stop_id field contains a stop ID that identifies a stop where a connection between routes begins.
  • to_stop_id: The to_stop_id field contains a stop ID that identifies a stop where a connection between routes ends.
  • min_transfer_time: The min_transfer_time field defines the amount of time in seconds to transfer in a connection.

walking_graph.gr.gz

This file represents the unrestricted walking graph for each location. The graph is directed and weighted. Each arc of the graph is represented by a line in the decompressed file.

The format of each line is s t d, where s/t are the id of the source/target. d is the walking time from s to t, which is an integer with the unit of 1 second.

in_hubs.gr.gz

This file contains the information about the in-hubs of each stop in the timetable.

The format of each line is h s d, where h is the id of the in-hub, which is a node in the walking graph. h is an in-hub of the stop s, and s is the shortest-path distance from h to s.

out_hubs.gr.gz

This file contains the information about the out-hubs of each stop in the timetable.

The format of each line is s h d, where h is the id of the out-hub, which is a node in the walking graph. h is an out-hub of the stop s, and s is the shortest-path distance from s to h.

Covering property

The in-hubs and out-hubs satisfy the following covering property:

where H⁺(u) is the set of out-hubs of u and H⁻(v) is the set of in-hubs of v.

Statistics

London Paris Switzerland
routes 1622 1973 13930
trips 122047 78757 369744
stops 19746 23519 25427
events 4695285 1915253 4740869
transfers 64756 338772 12838
nodes 280765 531720 604230
edges 857516 1666740 1876947
avg in hubs 69.56 118.98 78.87
avg out hubs 68.99 117.79 78.87

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published