/patco-gtfs

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

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

patco-gtfs

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

Note that PATCO has started publishing official GTFS. I am no longer maintaining this feed.

The results of the process have been uploaded in the past to the GTFS Data Exchange: http://www.gtfs-data-exchange.com/agency/patco/

I'm not going to post my unofficial GTFS there any longer, as there is now an official source.

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.