Analyzing the prices of the Deutsche Bahn (based on project juliuste/db-prices)
Small terminal application for the given API.
You need: npm package manager and pip installer
git clone git@github.com:frankzl/bahn-price-analyzer.git- run
setup.sh - enjoy! :)
This will setup aliases in your system, allowing you to use short commands:
bahnto run the user programbahn_info -f "Oldenburg (Oldb) Hbf" -t München Hbf -fd 2018-12-04 -td 2018-12-07to query
Not sure if this works on macOS.. maybe someone can try it out
git clone git@github.com:frankzl/bahn-price-analyzer.gitnpm installpip install -r db_console/requirements.txt- enjoy! :)
At the moment you can only specify the place by giving the exact station name, which can be found inside stations.csv. (still in progress, maybe we'll fix it with fuzzy matching)
python db_console/db_info.py -f "Oldenburg (Oldb) Hbf" -t "München Hbf" -fd 2018-12-15 -td 2018-12-24
python db_console/db_user_program.py

Use tab to run autocompletion and show suggestions
execute with node scrapper.js -f from_station -t to_station -s start_date -e end_date
will write data into file:
data.csv
column names: date, hour, departure_time, arrival_time, stops, price, ticket_type, train_type
departure and arrival format: '2017-06-05T08:53:00.000Z'

