Build GTFS files using data extracted from PATCO's PDF schedule.
Clone or download
Pull request Compare This branch is even with flibbertigibbet:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gtfs_files
shapes
.gitignore
.travis.yml
LICENSE
README.md
bike_ban_times.csv
eastbound_friday.csv
eastbound_monday_wednesday.csv
eastbound_saturday_sunday.csv
eastbound_sept4.csv
eastbound_sept7.csv
eastbound_thursday.csv
express_notes.txt
fares.txt
fares_to_rev.txt
holiday_sched.txt
make_calendar_dates.py
make_fare_rules.py
make_trips_stops.py
use_holidays.txt
validate_feed.py
westbound_friday.csv
westbound_monday_wednesday.csv
westbound_saturday_sunday.csv
westbound_sept4.csv
westbound_sept7.csv
westbound_thursday.csv

README.md

patco-gtfs

Build GTFS files using data extracted from PATCO's PDF schedule.

I've been uploading the results of the process to the GTFS Data Exchange: http://www.gtfs-data-exchange.com/agency/patco/

Build status:

To use:

  1. Extract data from each table in the schedule PDF into the corresponding direction_weekday.csv file.

    Tabula helps with this, but the result may need some fixing.

  2. Edit bike ban times by modifying bike_ban_times.csv. If the file is missing or has only the header row, bikes will be allowed at all times. Fields are:

    • direction_id -> 0 for trips to Lindenwold, 1 for trips into Philadelphia
    • service_id -> integer from calendar.txt indicating which days of the week
    • start_time -> time of day when ban starts, in 24-hour format for hours and minutes (HH:MM)
    • end_time -> time of day when ban ends, in 24-hour format for hours and minutes (HH:MM)
  3. Write the new trips.txt and stop_times.txt by running make_trips_stops.py:
    python make_trips_stops.py

  4. Modify calendar.txt in the gtfs_files directory to set the schedule's effective date.

  5. Run make_calendar_dates.py, first modifying use_holidays.txt if the holidays in range have changed. Be sure to update calendar.txt first, as holidays will be scheduled within the effective date range.
    python make_calendar_dates.py

  6. If the fare prices need updating, modify the fare_attributes.txt file directly in the gtfs_files directory.

  7. Zip the contents of the gtfs_files directory, and validate the results with Google's GTFS validator.