This GTFS Routes Visualiser was designed for end users to input a download url or upload a GTFS file from sites such as TransitFeeds, Transitland), or TPRN’s GTFS Catalogue by a recent date and some coordinates within the bounding box to receive a file name (e.g., http://115.146.86.165:7062/gtfs_catalogue_query_json?day=22&month=October&year=2021&lat=153.0260&lon=-27.4705) and then append the received file name to the end of the GTFS Catalogue’s download url and input the resultant url as the corresponding_download_url for the GTFS Routes Visualiser Service (e.g., http://115.146.86.165:7062/gtfs/nsw_trainlink_f-r6-nswtrainliyinterlinebus_20170803_20171101.zip).
Once everyone is content with the appearance, the rMarkdown chunks are already laid out like reactive components and so I can quickly translate this into a Shiny application script, and then drop this in my containerized Shiny Server on the AURIN VM and it will appear at this http://115.146.86.165:7061/
Step 1: running as though user provided this url https://transitfeeds.com/p/translink/21/latest/download
Fig 1. The minimal GTFS data model (blue) with derived fields (purple)
Fig 2. After flattening the GTFS data model
Step 2: The interactive calendar/slider will default to the midpoint that is 2021-11-27, which is a Saturday although I am running as thought user shifted the calendar/slider to: 2021-11-29, which is a Monday
Step 3: The user will receive tick boxes for all on this day routes although I am running the following 10 selected at random to simulate user input: 534-2049 619-1989 RPBR-2072 103-2143 P581-2085 BDBR-2072 614-1989 322-2143 263-2056 RPIP-2072
Step 4: Time slider will use the following range between 05:34:00 and 23:57:00 and intialise at the start for the animation button however I am running as though user shifted the time slider to 08:00:00 and selected a white marker background over the default basemap to simualate input
Fig 3. Static Mockup of the GTFS Routes Visualiser
| order | reactive | time | task |
|---|---|---|---|
| 1 | url | 43.5776191 | download and read the GTFS file from a user provided url |
| 2 | clean | 15.7754042 | clean the GTFS fields |
| 3 | data_model | 0.0814660 | create GTFS relational data model |
| 4 | flatten | 5.3106370 | flatten data model to trips and stop_times tables |
| 1 | date | 0.0960128 | filter tables by user selected date |
| 2 | route | 0.2955570 | filter the GTFS by 10 random user selected routes |
| 3 | time | 0.1040051 | filter the GTFS by user selected time |
| 4 | map | 0.6464481 | draw map from user provided palette and basemap |