Giter Site home page Giter Site logo

transitnetwork's Introduction

transitNetwork

Python script for transforming GTFS data to node-edge graph data.

This script attempts to transform the transit data from a General Transit Feed Specification (GTFS) folder into a JSON object with nodes as stops and edges as the routes between them.

Usage

python convert.py <data folder> <output file>
python convert.py ./mta_gtfs/ ./mta.json

Examples

The /sample/ folder contains several JSON files assembled from real GTFS data as well as a very basic graph visualization to view them. The visualization allows toggling between force-directed and geographic views.

Notes

  • The GTFS format does not contain a simple data structure for what one would commonly consider the stops along each route (i.e., the map). The network assembled by this script may contain unmaplike edges between nodes, especially where express trips are made between stops.
  • Some GTFS files contain very large stop_times.txt files, for instance the file for the Brooklyn bus stop times is ~320MB. Running the script on such a file should work, but will take a long time to execute.

transitnetwork's People

Contributors

edwardclementlee avatar

Watchers

James Cloos avatar Peyman Noursalehi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.