Peartree is a library for converting GTFS to directed graphs.
Project description
===========
Peartree 🍐🌳
===========
.. image:: https://img.shields.io/travis/kuanb/peartree.svg
:target: https://travis-ci.org/kuanb/peartree
Peartree is a library for converting `GTFS <https://developers.google.com/transit/gtfs/>`__ feed schedules into a representative directed network graph. The tool uses `Partridge <https://github.com/remix/partridge>`__ to convert the target operator schedule data into `Pandas <https://github.com/pandas-dev/pandas>`__ dataframes and then `NetworkX <https://networkx.github.io/>`__ to hold the manipulated schedule data as a directed multigraph.
.. figure:: examples/example.gif
:alt: graph loader animation
Above, an example of multiple Bay Area transit operators being incrementally loaded into Peartree.
Usage
-----
.. code:: 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)
Installation
------------
Coming shortly...
.. code:: console
pip install peartree
Peartree 🍐🌳
===========
.. image:: https://img.shields.io/travis/kuanb/peartree.svg
:target: https://travis-ci.org/kuanb/peartree
Peartree is a library for converting `GTFS <https://developers.google.com/transit/gtfs/>`__ feed schedules into a representative directed network graph. The tool uses `Partridge <https://github.com/remix/partridge>`__ to convert the target operator schedule data into `Pandas <https://github.com/pandas-dev/pandas>`__ dataframes and then `NetworkX <https://networkx.github.io/>`__ to hold the manipulated schedule data as a directed multigraph.
.. figure:: examples/example.gif
:alt: graph loader animation
Above, an example of multiple Bay Area transit operators being incrementally loaded into Peartree.
Usage
-----
.. code:: 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)
Installation
------------
Coming shortly...
.. code:: console
pip install peartree
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
peartree-0.1.0.tar.gz
(8.4 kB
view hashes)
Built Distribution
Close
Hashes for peartree-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc34f2908e40259a4f5431bf1389f6b0f9c140d31bb3b51ebd10f8df985e4b02 |
|
MD5 | 06b422a85abaaaacc26b18d93fe98612 |
|
BLAKE2b-256 | 4fa7f9573777c475c7b4bb0c511bd40390243c60a6a04f16ad709235953148db |