transbigdata.metro_network

transbigdata.metro_network(line, stop, transfertime=5, nxgraph=True)

Inputting the metro station data and outputting the network topology model. The graph generated relies on NetworkX. The travel time is consist of: operation time between stations + stop time at each station + transfer time

Parameters:
  • line (GeoDataFrame) – Lines. Should have line column to store line name speed column to store metro speed and stoptime column to store stop time at each station.

  • stop (GeoDataFrame) – Bus/metro stations

  • transfertime (number) – Travel time per transfer

  • nxgraph (bool) – Default True, if True then output the network G constructed by NetworkX, if False then output the edges1(line section), edge2(station transfer), and the node of the network

Returns:

  • When the nxgraph parameter is True

  • ================================================================

  • G (networkx.classes.graph.Graph) – Network G built by networkx.

  • When the nxgraph parameter is False (This is for detail design of the network)

  • ================================================================

  • edge1 (DataFrame) – Network edge for line section.

  • edge2 (DataFrame) – Network edge for transfering.

  • node (List) – Network nodes.