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
------------
Note: Still a WIP. Current version on PyPI not good...
.. 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
------------
Note: Still a WIP. Current version on PyPI not good...
.. 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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for peartree-0.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9656fd4573ce4206b776577182b3bade14d30dd375ece9a9dfe775d3df73835 |
|
MD5 | be68194f5044c052e3602c2fb90215e8 |
|
BLAKE2b-256 | 5318f34bc3377a2d014d5e12ce87cdc4a2071430a22e2006290b608a13996591 |