An application to calculate on-time performance using GTFS-realtime data that has been archived using the gtfsrdb tool.
For more about what this tool does, please see the chapter "Producing On-time Performance from GTFS-realtime Data" in this final report.
The On-time Performance Calculator is written in Java. Maven is the build management tool for this project.
Following are the requirements to get the project up and running:
- JDK 6 or higher
- Apache Maven
- (Optional) Git to clone the Github repository
Note that you can also use an integrated development environment (IDE) such as Netbeans or IntelliJ to build the project, which usually includes integrated support for Maven and Git.
You'll also need data:
- GTFS data - A zip file containing GTFS data from the same time period as the archived GTFS-realtime data. Check out Transitland (and in particular the feed_versions API), TransitFeeds.com or GTFS Data Exchange (Deprecated) to find archived GTFS data.
- Archived GTFS-realtime data - Data in a relational database (e.g., MS SQL Server) that has been archived using the gtfsrdb tool (or another tool that uses the same database schema). See TransitFeeds.com for a list of publicly-available GTFS-realtime feeds.
The following instructions are for building the project from the command line using Maven.
The source files are needed in order to build the jar file. You can obtain them by downloading the files directly or by cloning the Git repository (recommended).
-
Download zipped version of the repository
Download the current snapshot of the project to your local machine using the "Download Zip" link on the project home page. (https://github.com/CUTR-at-USF/ontime-performance-calculator)
-
Clone this repository to your local machine.
With git installed on the system clone the repository to your local machine.
git clone https://github.com/CUTR-at-USF/ontime-performance-calculator.git
From the command-line:
mvn install
The above step will generate an executable file in the target/
directory with all the dependencies needed to run the application.
Before running the application, create an info.txt
file in project's src/main/resources
folder. This file should contain information needed to connect to Microsoft SQL Server database:
info.txt
file should have the following information. Each line contains a tag and it's value separated by:
server : name of the server to connect to
username : name of the user
password : user password
database : name of the database to connect to
Finally, to run the application execute a command in the format:
java -jar target/ontime-performance-calculator.jar <path/to/GTFS_file.zip> <arrival_time OR departure_time> [number of records to fetch]
- The application takes three arguments
- Path to static GTFS zip file
arrival_time
ordeparture_time
- This argument tells the application whether to calculate schedule_deviation using arrival_time or departure_time at each stop- Specify number of records to fetch from database table - This argument is optional. If it’s not provided, we retrieve all records from the table
Example command:
java -jar target/ontime-performance-calculator.jar gtfs.zip arrival_time
The above command assumes that the gtfs.zip
file is in the same directory you're executing the java
command from.
Note that this project is currently configured to connect to a SQL Server database, but other relational databases are also supported.