Loads GTFS into MySQL and serves next departures and arrivals at a certain stop from The DataTank
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets
cookbooks/the_datatank
datasources
.gitignore
Berksfile
LICENSE
README.md
Vagrantfile

README.md

GTFS-TDT

Loads GTFS into MySQL and serves next departures and arrivals at a certain stop from The DataTank.

Requirements:

  • Virtualbox
  • Vagrant >= 1.7.0
  • vagrant-omnibus plugin
  • ChefDK

Installation:

Download and install VirtualBox

Download and install vagrant

Install vagrant-omnibus plugin

$ vagrant plugin install vagrant-omnibus

Download and install ChefDK

Clone this repository

Go to the repository folder and launch the box

$ cd [repo]
$ berks vendor
$ vagrant up

Add The Datatank-ip and -hostname to your hosts-file:

192.168.70.70 tdt.hub.dev

Load datasources:

Currently are De Lijn, MivbStib and TEC included. Datasources are located in the datasources-folder.

For this example we're going to add De Lijn-datasource. Same principle for TEC and MivbStib.

Acces server

vagrant ssh

Load data

Go to De Lijn datasources-folder: cd /vagrant/datasources/delijn

Execute init.sh: ./init.sh

Install resource into The DataTank

Go to tdt.hub.dev/api/admin in your favourite browser. Default credentials are: user: admin password: admin

Now let's create an API for De Lijn Departures: Picture of Adding Departure API for De Lijn

You will have to now construct the request towards the expected departures at a bus stop yourself. For example, for 2015-05-10T12:00, for Aalst Gentsestraat, you’ll have to construct: http://tdt.hub.dev/delijn/departures/Aalst%20Gentsestraat/2015/05/10/12/00.json