transbigdata.get_shortest_path
- transbigdata.get_shortest_path(G, stop, ostation, dstation)
Obtain the travel path of shortest path from the metro nextwork
- Parameters:
G (networkx.classes.graph.Graph) – metro network
stop (DataFrame) – metro stop dataframe
ostation (str) – O station name
dstation (str) – D station name
- Returns:
path – travel path: list of station names
- Return type:
list