peartree是一个将gtfs转换为有向图的库。

peartree的Python项目详细描述


https://img.shields.io/gitter/room/nwjs/nw.js.svghttps://img.shields.io/pypi/v/peartree.svghttps://img.shields.io/travis/kuanb/peartree.svg?branch=masterhttps://codecov.io/gh/kuanb/peartree/branch/master/graph/badge.svg

peartree是一个库,用于将GTFSfeed计划转换为具有代表性的有向网络图。该工具使用Partridge将目标运算符计划数据转换为Pandas数据帧,然后NetworkX将操作的计划数据保存为有向多重图。

https://raw.githubusercontent.com/kuanb/peartree/master/examples/example.gif

以上是将多个湾区运输运营商增量加载到PearTree中的示例。

安装

pip install peartree

用法

请参阅this gist上的完整笔记本,以查看一个简单的、逐步的ipython笔记本,它会拉入ac transit gtfs提要并将其转换为networkx图形。

importpeartreeasptpath='path/to/actransit_gtfs.zip'# Automatically identify the busiest day and# read that in as a Partidge feedfeed=pt.get_representative_feed(path)# Set a target time period to# use to summarize impedancestart=7*60*60# 7:00 AMend=10*60*60# 10:00 AM# Converts feed subset into a directed# network multigraphG=pt.load_feed_as_graph(feed,start,end)

示例

我还没有为这个库制作一个完整的操作指南,但是我将开始用我或其他人制作的任何博客文章或笔记本来填充这个部分,其中包括使用peartree的工作流。

Calculating betweeness centrality with Brooklyn bus network

Combining a peartree transit network and an OpenStreetMap walk network

Generating comparative acyclic route graphs

Coalescing transit network graphs and spectral clustering methods

Exploratory graph analysis with betweenness and load centrality

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java GWT:禁用某些小部件上的所有事件   java Sbt run命令警告未解析的依赖项   班getSimpleName()与用java硬编码类名?   如何设置客户端本地端点Java RMI   java在tensorflow中沿轴选择随机数目的点   java在使用随机生成器的数组中查找缺失的数字   我在游戏中的线索丢失(java)   JavaNIO文件通道。从转移0开始转移?   Storm DRPC中的java更新与RequestReply   REST服务中的java返回XML响应   java如何在Eclipse中使用CXF使用Web服务   java Appengine通道Api存在\u ah/通道/连接不工作   RSA加密Javascript和解密Java   HTTPS站点的java路由HTTP映像   导入JCC时发生java错误。找不到libjava。所以   java下拉选项,可选择更改月份   java在向jasper报告传递日期参数时如何解决ClassCastException?   gradle插件中使用的第三方库的java控件日志记录输出   java是一个单一的logback。用于多个应用程序的xml文件是一种良好的做法?