This repository is an attempt at visualising the 'debacle' that is the German railway system at the moment. Based on a recent report by the German Government as an answer to the conservative opposition party, a list of the status of several objects of the German railway system was provided.
The report is quite long (and preserved in the raw
folder) and
contains a lot of tables, making the parsing process quite hard. I wrote
some code to extract said tables and visualise them---please find the
results below.
Use pip
or poetry
(or any other tool you use to manage your Python
projects) to install the dependencies:
$ pip install . # For pip
$ poetry install # For poetry
Read on for some infos about the scripts.
├── extract.py
├── figures
│ ├── bridges_by_county.png
│ ├── bridges.png
│ ├── crossings_by_county.png
│ ├── crossings.png
│ ├── dbakel.jpg
│ ├── structures_by_county.png
│ ├── structures.png
│ ├── switches_by_county.png
│ ├── switches.png
│ ├── tracks_by_county.png
│ └── tracks.png
├── LICENSE.md
├── raw
│ └── 2010284.pdf
├── README.md
├── tables
│ ├── Bridges.csv
│ ├── Crossings.csv
│ ├── Structures.csv
│ ├── Switches.csv
│ └── Tracks.csv
└── visualise.py
-
extract.py
: run this to (re-)create the tables. All tables will be placed in thetables
directory. -
visualise.py
: create some visualisations. This is where you can get creative! To create some visualisations for a specific object, just call the script with the respective parameter. For instance, to visualise the condition of bridges, callpython visualise.py tables/Bridges.csv
. This will create the respective figures in thefigures
directory.
-
Notice that these visualisations only show a fraction of all objects, namely the ones that are not in the best condition any more. It is unclear what the total count should be. If you know where to find an assessment that contains all conditions, let me know.
-
I am unsure about the grading scale and followed the ordering in the original report. It seems that 'restrictive' is the lowest grade, indicating that maintenance of this part of the infrastructure will pose a restriction for additional parts of the network.
It's not looking good for Deutsche Bahn, in particular in North Rhine-Westphalia (NW) and Bavaria (BY). There's a lot of things to do now...
The code is licensed under a BSD 3-Clause License. This basically means you are allowed to do everything you want with it as long as you retain the license and copyright notice. Of course, there are no warranties or liabilities, so use it at your own risk.