Transforms GTFS into a JSON-LD stream of arrival/departures.
This project is written in PHP and uses doctrine to load the GTFS files into a MySQL database.
Explanation of the data model of arrival and departure objects can be found here.
* Composer
* MySQL
* PHP 5.4+
We use the PHP package manager Composer. Make sure it's installed and then run from this directory:
composer install
Fill in your MySQL credentials inside db-config.php
.
scripts/init.sh path-to-gtfs.zip
php scripts/create_arrivals_and_departures.php [startDate] [endDate]
The format of date parameters must be 'YYYY-MM-DD'.
Note: optional parameters startDate
and endDate
only work when there are no calendars.
You can find arrivals-[agency_id].jsonldstream and departures-[agency_id].jsonldstream in dist
folder.