Skip to content

junosuarez/chatt-gtfs-cleanup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chatt-gtfs-cleanup

scripts to clean up CARTA's GTFS data feed

Installation

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:

Upgrading

To upgrade to a new version of this script, run:

$ npm update -g jden/chatt-gtfs-cleanup

Usage

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]

What it does

This script attempts to automatically correct some validation errors in the GTFS files generated by BusTools.

Route Short Name Is Contained In Long Name

Removes duplicated information in routes.txt

Invalid values in shape_pt_sequence

Fixes improperly formatted values in shapes.txt

Trip Headsign Contains Route Short Name

Trip Headsign Contains Route Long Name

Removes duplicated information in trips.txt

Troubleshooting

No output is displayed

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.

Files missing in output directory

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.

Contact

Jason Denizac jden@codeforamerica.org

About

scripts for cleaning up carta gtfs data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published