scripts to clean up CARTA's GTFS data feed
Required: Node.js
From a command line, run:
npm install -g jden/chatt-gtfs-cleanup
You can now run chatt-gtfs-cleanup
as a command to execute this script:
To upgrade to a new version of this script, run:
$ npm update -g jden/chatt-gtfs-cleanup
chatt-gtfs-cleanup --input <directory> --output <directory>
Examples:
node cli --input c:/gtfs --output c:/gtfs_clean Runs the clean up scripts on data in c:/gtfs.
New files will be written to c:/gtfs_bak
Options:
-i, --input Specify the input directory [required]
-o, --output Specify the output directory [required]
This script attempts to automatically correct some validation errors in the GTFS files generated by BusTools.
Removes duplicated information in routes.txt
Fixes improperly formatted values in shapes.txt
Removes duplicated information in trips.txt
If there are no corrections made, nothing will print in the script output. Check the files in the destination directory; they should be present & valid.
The script only copies over files which it knows how to clean up. You can copy over the rest of the files which make up a GTFS feed from the input directory unchanged.
Jason Denizac jden@codeforamerica.org