An SVG-based tool to visualize public transport journeys retrieved from a HAFAS system

Overview

Time-Space Train Planner

An SVG-based tool to visualize public transport journeys retrieved from a HAFAS system, in order to see all possible connections and possibly find faster connections.

Example Diagram

Often, the HAFAS routing system will not show the fastest routes, because it deems the transfer times too short or because there are just too many possibilities. This tool will display all direct connections between a given set of stations and will help you find the fastest connection and any backup connections that might be good to know about. You can click on individual connections to show the shortest route to the destination from that connection (with a minimum transfer time of zero minutes).

TSTP is currently in an early alpha stage. I.e. it is unstable, does very little error handling and is not very user-friendly yet.

Running TSTP

The server-side part is written in Go, there is also a small client-side JavaScript part. You will have to run your own server to use this software.

TSTP relies on an adapted HAFAS API provided by hafas-client, more specifically, db-rest. You need to run your own instance of this API adapter separately from TSTP, or use a publicly available one (e.g. https://v5.db.transport.rest/).

In addition, you should run an aggressive HTTP cache in between TSTP and this API, because TSTP itself is stateless and will repeatedly issue identical requests for the same resources while gathering data. In deployments/nginx-cache.example.conf, you find an example of how to configure Nginx as an HTTP cache. Please note that this configuration will cache for a very long time. You will not be able to get updated live information for a particular request.

The steps to run TSTP itself are:

  1. Copy deployments/conf.example.env to deployments/conf.env and fill in the host name of your HTTP cache (API_CACHE_HOST) and, if your setup is not exactly mirroring db-rest, the path prefix (HAFAS_API_CACHE_PREFIX). If you run the cache locally (e.g. in another Docker container), you probably want to adjust the API_CACHE_SCHEME to http. The DB Open API and thus the respective environment variables are currently not used anymore.
  2. Copy res/conf.example.js to res/conf.js and fill in the complete URL to the /stations endpoint of your db-rest instance (preferably cached as well). Obviously, since this will be used by the browser for autocompletion, this URL needs to be accessible from the outside (i.e. no Docker hostname).
  3. Start TSTP using the docker-compose.yaml (add a port mapping if you need to) or, if you have installed all Go dependencies, without Docker using start.sh. The default port is 3000.
  4. You should now be able to access TSTP at your selected port under /tstp in your browser.
  5. If something goes wrong, consider looking into TSTP's stdout logs.
Issues
  • FeatureRequest nginx in docker-compose

    FeatureRequest nginx in docker-compose

    Hello nice project.

    I have a suggestion is it possible to add another docker compose file with a nginx container as cache so that the setup is easier? Or just add the nginx to the default compose file.

    Kind regards, Finn

    opened by FinnHuelsbusch 2
  • Getting started

    Getting started

    Hi,

    thanks for your tool. It looks amazing and should be exactly what I need.

    I just wanted to try it out, but can't get it to run. I built the Docker Image and started the Container with Port Forwarding of the Port 3000. Unfortunately nothing is served on the / endpoint.

    So my questions are:

    • Do I have to set configuration variables? (I saw the deployments/conf.example.env. Can you explain the different entries in there?)
    • On which endpoint is the frontend application served?

    Thanks already in advance! ~ Moritz

    opened by MoritzWeber0 2
Owner
Traines
Traines
Ltree Visualizer - A golang library to visualize postgres ltree type data using DOT language and Graphviz

Ltree Visualizer A golang library to visualize postgres ltree type data using DOT language and Graphviz What is Ltree? Ltree is a data type which is u

Vasubabu Jinagam 8 Jun 12, 2022
Plot 3D math equation z=f(x, y) with SVG format.

plot-function-svg Plot 3D math equation z=f(x, y) with SVG format. Some codes are referred from https://github.com/adonovan/gopl.io licensed under a C

HansenH 0 Dec 30, 2021
Create beautiful system diagrams with Go

Go-Diagrams Fast and easy application diagrams Go-Diagrams is a loose port of diagrams. Contents Features Usage Features Turn this: d, err := diagram.

null 3.6k Jun 29, 2022
Gfx - Golang file system extension library

gfx Golang文件操作扩展库,包含工作和生活中关于文件操作的各种有用的使用方法,包括 更友好的API 文件创建 文件删除 文件复制 一切皆可配置 文件名

张川 0 Mar 10, 2022
Tool that can parse Go files into an abstract syntax tree and translate it to several programming languages.

GoDMT GoDMT, the one and only Go Data Model Translator. The goal of this project is to provide a tool that can parse Go files that include var, const,

Josep Jesus Bigorra Algaba 42 Jan 29, 2022
gosivy - Another visualization tool for Go process metrics

gosivy Another visualization tool for Go process metrics. Gosivy tracks Go process's metrics and plot their evolution over time right into your termin

Ryo Nakao 442 Jun 16, 2022
Interactive dependency graph visualization tool for golang

Interactive dependency graph visualization tool for golang using the awesome cytoscape graph visualizer.

Armin Becher 5 Nov 1, 2021
Helm : a tool for managing Charts

Helm is a tool for managing Charts. Charts are packages of pre-configured Kubernetes resources.

邓杰 0 Nov 19, 2021
Real-time Map displays real-time positions of public transport vehicles in Helsinki

Real-time Map Real-time Map displays real-time positions of public transport vehicles in Helsinki. It's a showcase for Proto.Actor - an ultra-fast dis

ASYNKRON 27 Jun 8, 2022
depth is tool to retrieve and visualize Go source code dependency trees.

depth is tool to retrieve and visualize Go source code dependency trees. Install Download the appropriate binary for your platform from the Rele

Kyle Banks 759 Jun 22, 2022
Tool to visualize the graph of embedded structs in Go projects

Visualize a hierarchy of embedded Go structs This tool scans a directory of Go source code files to create a visualization of struct embedding in the

David Schlachter 194 Jun 21, 2022
A command-line tool to visualize a JWT token's content, written in Go

jat A command-line tool to visualize a JWT token's content, written in Go. Usage jat <some-jwt> Install Navigate to the Releases page; Download the co

Matheus Calegaro 1 Jan 6, 2022
Goimportcycle - a tool to visualize Go imports resolved to the file level

Go Import Cycle goimportcycle is a tool to visualize Go imports resolved to the

Sam L 28 Apr 24, 2022
Sixmap - Tool to visualize the SIX (Seattle Internet Exchange) route server coverage

Mapping the SIX route server This program generates an IPv4 map. In particular,

Brad Fitzpatrick 15 Apr 12, 2022
A simple API written in Go that creates badges in SVG format, based on the requested route.

A simple API written in Go that creates badges in SVG format, based on the requested route. Those graphics can be used to style README.md files, or to add tags to webpages.

Toby 3 Jul 2, 2021
Parse and demux MPEG Transport Streams (.ts) natively in GO

This is a Golang library to natively parse and demux MPEG Transport Streams (ts) in GO. WARNING: this library is not yet production ready. Use at your

Quentin Renard 423 Jun 17, 2022
UDP Transport: compress, encrypt and send any data reliably over unreliable UDP connections

udpt UDP Transport Compresses, encrypts and transfers data between a sender and receiver using UDP protocol. Features and Design Aims: Avoid the overh

Ali Bala 40 Nov 9, 2021
NATS HTTP Round Tripper - This is a Golang http.RoundTripper that uses NATS as a transport.

This is a Golang http.RoundTripper that uses NATS as a transport. Included is a http.RoundTripper for clients, a server that uses normal HTTP Handlers and any existing http handler mux and a Caddy Server transport.

R.I.Pienaar 75 Jun 14, 2022
OCI transport plugin for apt-get (i.e., apt-get over ghcr.io)

apt-transport-oci: OCI transport plugin for apt-get (i.e., apt-get over ghcr.io) apt-transport-oci is an apt-get plugin to support distributing *.deb

Akihiro Suda 85 Apr 18, 2022
Transport to allow go-libp2p applications to natively use i2p for communication

I2P Transport for go-libp2p This library can be used to build go-libp2p applications using the i2p network. Look at transport_test.go for example usag

null 2 Jun 15, 2022
meek is a blocking-resistant pluggable transport for Tor.

meek is a blocking-resistant pluggable transport for Tor. It encodes a data stream as a sequence of HTTPS requests and responses. Requests are reflect

Clair de Lune 1 Nov 9, 2021
Diffie Hellman Exchange - A Generic Transport Upgrader Implementation

Diffie Hellman Exchange A simple but fastidious attempt to write a diffie-hellman key exchange utility that could be used as transport upgraders in di

null 0 Jan 16, 2022
Golang Microservice making use of protobuf and gRPC as the underlying transport protocol.

Go-Microservices Golang Microservice making use of protobuf and gRPC as the underlying transport protocol. I will be building a generic microservice,

Kathurima Kimathi 0 Jan 5, 2022
Visualize call graph of a Go program using Graphviz

go-callvis go-callvis is a development tool to help visualize call graph of a Go program using interactive view. Introduction The purpose of this tool

Ondrej Fabry 4.2k Jun 29, 2022
Visualize call graph of a Go program using Graphviz

go-callvis go-callvis is a development tool to help visualize call graph of a Go program using interactive view. Introduction The purpose of this tool

Ondrej Fabry 4.1k Jun 22, 2022
The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.

The open-source platform for monitoring and observability. Grafana allows you to query, visualize, alert on and understand your metrics no matter wher

Grafana Labs 49.7k Jun 27, 2022
Visualize how a projects source code is distributed among its files and folders

Source Code Visualizer Visualize the code distribution in a project. Applications Applications include: Visualizing code distribution for more educate

Guy Levin 79 Jun 13, 2022
Visualize your Go data structures using graphviz

memviz How would you rather debug a data structure? "Pretty" printed Visual graph (*test.fib)(0xc04204a5a0)({ index: (int) 5, prev: (*test.fib)(0xc0

Bradley Kemp 1.3k Jun 15, 2022
Visualize plant growth over time with Go, WebDAV and WASM; @pojntfx's entry for #growlab.

Growlapse Visualize plant growth over time with Go, WebDAV and WASM; @pojntfx's entry for #growlab. Installation Containerized You can get the Docker

Felix Pojtinger 7 Feb 21, 2022