/CTAGTFS

Shell scripts to import a GTFS dataset into a basic MySQL database.

Primary LanguageShell

GTFS MySQL IMPORT SCRIPT
Author: Andy Dyrcz (adyrcz@gmail.com)

This is a simple set of scripts that will import a GTFS dataset into
a lightweight MySQL database.  

The work was originally based on Washington, DC's WMATA GTFS dataset and scripts were written in python.
Original Author: Tom Lee (thomas.j.lee@gmail.com)
It has been updated to work specifically on Chicago's CTA GTFS datasets. Also the python scripts have been converted to Bash shell scripts and the SQL has been updated to build the database according to the dataset provided by the CTA.

In addition to the GTFS scripts, there are several other tools included in this project. ex. Converting string-based date/time values to Unix friendly timestamp-style second counts.

DEAD-SIMPLE USAGE:

1. Create a database, ex. CREATE DATABASE gtfs

2. Run table creation scripts against the database:

	cat sql/*.sql | mysql -p -u USERNAME -h HOST -D gtfs
	
3. Run the import script:

	load_gtfs.sh
	
4. Run the time index creation script:

	build_indices.sh
	
5. Use the database you've just setup to create something useful!!!

Please provide feedback on what you're using the GTFS database for!