Closed Weiji-a closed 4 years ago
And the code is
import pandas as pd
import numpy as np
import networkx as nx
import peartree as pt
path = 'C:/Users/Administrator/Desktop/fr-idf_gtfs.zip'
feed = pt.get_representative_feed(path)
# Set a target time period to
# use to summarize impedance
start = 7*60*60 # 7:00 AM
end = 10*60*60 # 10:00 AM
# Converts feed subset into a directed
# network multigraph
G = pt.load_feed_as_graph(feed, start, end)
pt.generate_plot(G)
You probably need to install the osmnx package. It is an optional dependency of peartree: https://github.com/kuanb/peartree/blob/0c5073d8b62a49ea299e8e2c2df1369fc4dcb3ea/peartree/plot.py#L13-L20.
Thanks @invisiblefunnel
Hey, @invisiblefunnel it worked, but I found that the graph image I am getting has just 14 nodes. How do I resolve it to get the complete graph of the full network
Hello,
I am trying to using peartree to plot the GTFS data, but in the end I meet this error