### Install Peartree using pip Source: https://github.com/kuanb/peartree/blob/master/README.rst Use this command to install the peartree library. Ensure you have pip installed. ```console pip install peartree ``` -------------------------------- ### Load GTFS feed into a NetworkX graph Source: https://github.com/kuanb/peartree/blob/master/README.rst Reads a GTFS feed, identifies the busiest day, and converts it into a NetworkX directed multigraph for a specified time period. Requires the path to the GTFS zip file. ```python import peartree as pt path = 'path/to/actransit_gtfs.zip' # Automatically identify the busiest day and # read that in as a Partidge feed 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) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.