Giter Site home page Giter Site logo

nyc-bus-gtfs's Introduction

NYC Bus GTFS downloader

This repo downloads NYC bus GTFS data and loads it into a MySQL database, tracking different versions of the data.

Requirements

  • MySQL
  • bash command line environment
  • csvkit

Install

sudo make install

Usage

(If using a ~/.my.cnf file, append MYSQLFLAGS= to all commands.)

make init DATABASE=name_of_your_database

The name_of_your_database defaults to nycbus.

Download the current GTFS dataset. This places the files in a folder named gtfs/YYYYMMDD. The assumption is that you may, in the future, download a newer version of the GTFS.

make gtfs

Load the downloaded GTFS into the MySQL database

make mysql DATABASE=name_of_your_database

If a day goes by, or you have older GTFS data to load, use the GTFSDATE variable:

make mysql GTFSDATE=20170319

Download from transitfeed

# download NYCT data and Bus Company data, which often have a different date
make TRANSITFEED=YES GTFSDATE=20151223 BUSCODATE=20151227 gtfs

The data will be put in the

Schema

The database will contain tables for each entry file in the GTFS schema. One additional column appears on each, feed_index, which is an integer keyed to the gtfs_feeds table. The gtfs_feeds contains a record of the feed_start_date, feed_end_date and feed_download_date.

nyc-bus-gtfs's People

Contributors

fitnr avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

anthonysu

nyc-bus-gtfs's Issues

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.