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.
-
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.
-
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 Philadelphiaservice_id
-> integer from calendar.txt indicating which days of the weekstart_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)
-
Write the new trips.txt and stop_times.txt by running make_trips_stops.py:
python make_trips_stops.py
-
Modify calendar.txt in the gtfs_files directory to set the schedule's effective date.
-
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
-
If the fare prices need updating, modify the fare_attributes.txt file directly in the gtfs_files directory.
-
Zip the contents of the gtfs_files directory, and validate the results with Google's GTFS validator.