Gimme, gimme, gimme a bus after midnight

It is 1:00am. I am waiting at the bus stop for, you guessed it, the bus. The public transport in Dresden is so good (some would say excellent) that you can catch a bus even after midnight without any problems. Standing there, staring in the black night sky, I get the feeling that some areas with less population have fewer stops than others which sometimes results in longer-than-expected walks to the next stop. But why are there such areas and how can you find them? To answer those questions, let’s have look at what started out to be a daydream at night and take a look at some aspects of public transport from high above. My analysis will be based on bus and tram stops. I will focus on the public transport in Dresden.

Is this the way to open data? [Parental Advisory – Explicit Lyrics]

First of all, we need to gather data. This is more complicated than it sounds. The topic open data gives you a Seinfeld reaction at most in some of Dresden’s administrative branches. Sometimes this is escalated to the press, but still. You will notice the tone of this section is spiked with a nail-biting upset. So, collecting and integrating data is great fun. Like the fun you are experiencing when you have to transport a bag of aggressive cats or drive your car into a brick wall.

Let’s start our journey down to data hell paradise. We need maps. Open Street Map usually gives a good point of entry. In this case, I have downloaded the shapefiles for the maps from geofabrik.de and did some manual work with JOSM. To my knowledge, a central storage for machine readable map data for Dresden is not available. You could always scrape the data from OSM, but you need a stack of additional tools to extract the data. All this is a pain in the a**. Creating interesting maps would be easier if there was repository with shapefiles to use.
Additionally, we need the positions of the public transport stops. Here I can rely on a github repo with all DVB/VVO stops. This gives me a list of stops with latitude and longitude coordinates.
For further analysis, we need the population density of each district in Dresden. Luckily, this is available online. Nevertheless, this is Germany, so there is no time for rejoicing. The data is only available as pdf (Argh, why?). After some brain-surgery-like manual transformation, I have managed to transform the populous data to csv. It should be noted that the names of the districts are edited, so that they fit the description in the map data.

After some fiddly work including the following features: aggressive swearing, facepalms, and hitting the table with the forehead, we now have everything we need to analyze our data. Dresden now looks like this. You can see the city border in orange, the district borders in gray, and the stops in blue. raw Dresden

Stop! In the name of equally distributed points

The first thing, we are going to analyze, is the distribution of stops over the city. Therefore, we estimate a Gaussian kernel density (with a bandwidth of 0.08) over all stops and their positions on a 2D grid with 1000 times 1000 grid points. Sounds complicated, but it looks just like a contour map. Areas with more stops are in a darker blue compared to areas with a lower density which are lighter.
Note: The areas around Dresden also have stops, so this leads to the blue spots outside the city limits. The stops in this part of the map are not rendered. distances Dresden One can clearly see the darker, therefore denser, areas in the city center, but there are also some brighter ‘holes’. These are three things: the Dresdner Heide in the upper right corner, the Großer Garten in the middle of Dresden (both are parks) and Friedrichstadt in the western center, a district with a lot of industry and the Dresden expo. Of course, there is a lower density on the city borders. On the other hand, there are four spatial consolidations. These are: the city center, the districts Gorbitz (with its beautiful late-romantic GDR architecture) and Löbtau in the southwest, the district Strehlen south of the Großer Garten, and the district Striesen in the eastern center.

Just a quick break for you to let everything sink in. We still need to find a correlation between the density of stops and other information to find any dependencies. For this, I have chosen the population density distribution of Dresden. Let’s put the population density per district right next to our stop distribution.

One can clearly see a pattern here. Areas with a higher population density have more stops. This is not surprising, as this is a general concept in city planning. The astonishing thing is how the distributions match each other. The density distribution in both cases has its highs and lows in nearly the same areas. This perfect match makes me think that somebody did a good job planning Dresden’s public transport network. This also answers our initial questions. Population density influences the positioning of stops. Areas with more people generate a higher demand in transportation. Therefore, denser population creates a denser network of stops.

One last interesting point: If one takes the average number of available connections per stop, one can find interchange centers. For this, we counted the connections per stop and classified them into two categories. The ones with 4 or fewer connections are labeled in gray and the ones with more than 4 connections are labeled in blue. centers Dresden The map shows the stops where there could be a high interchange activity. These are called hubs. If you squint your eyes, you can see the typical Dresden star scheme where all major tram routes go along the beams of a star located in the city center. This is a beneficial structure because it connects the outer regions with the city center along major axes of a city. Not only getting to the city center gets faster, but also traversing the city along the star beams is easier.

Relax! (Don’t not do it!)

This is what the network planning director at DVB is probably doing right now feeling relieved. The analysis shows some good qualities in the planning of the network. For one last time, let us review what you just read.

  1. The density of stops correlates with the population density,
  2. The number of connections per stops can be an indicator for local hubs in a public transport network.

This is by far not the end of map-based analysis. A next step would be to make the maps more interactive or take a look at a route-based solution.

This blog post should be an argument for making data available to the public. This enables a lot of interesting research which is beneficial to a lot of people. Insights do not need to be generated by internal employees, but can be made by a broad spectrum of experts. This yields a high return on investment for the institution making their data public. With these words, back to ABBA, Tony Christie, The Supremes and Frankie Goes To Hollywood because I am still waiting for the bus, but now I have a tune stuck in my head.

Map data from OSM. Built with Jupyter Notebooks and Basemap.