All posts for the month November, 2022

The idea is simple:

The worse the condition of the cyclepath, the more the bicycle shakes while cycling.
The more the bicycle shakes, the more uncomfortable the cycling will be.

We can measure the shaking using accelerometer data.
We can track the paths cycled using geolocation data.
Both can be recorded using a smartphone.
Both can be associated by the timestamps in the data.

Proof of concept

In June 2021 I created a small proof-of-concept. Using the mobile application phyphox to record raw accelerometer data using my phone, which was mounted on my bicycles handlebar. At the same time I recorded a GPS trace. Merging those two datasets allowed me to create a visualization of how “smooth” my ride was on specific parts of the route (green means smooth, yellow to red means not so smooth).

My little set-up was very basic, most people already have a similar configuration when using their phone for navigation or the like.

The result can be seen here on a small example route I cycled in the east of Berlin:

A route I used to record data for my proof of concept in the Wuhletal (east of Berlin).

So, yes, it worked pretty well. The darker green points are some very smooth cycle/running paths, such as this one:

Smooth cyclepath in the Wuhletal, close to the train station of the same name. Picture taken using a GoPro during some pretty nice rain.

While the very heterogeneously colored points next to the U-Bahn/Metro station “Cottbusser Platz” is a cyclepath, which is in some pretty bad condition. Just have a look at this abomination of a cyclepath right next to that particular metro station, which literally eats up the pedestrian part of the way:

The slightly red bricks show the cyclepath. This picture is taken next to the metro/U-Bahn station “Cottbusser Platz” in Berlin and shows how bad the infrastructure for non-motorized participants of society can be.

The whole proof-of-concept is available as a Jupyter/Python notebook in this little repository on Github:

The visualization, however, only shows the relative smoothness, based on that particular route.

I would really love to expand on that, but I currently lack the time, so I wanted to put my thoughts in writing. Because there are some issues…


The app. Don’t get me wrong, phyphox is a really great app and it helped me to create the proof-of-concept. However, it was originally made for physics experiments and education and does not quite fit this use-case. For one, phyphox requires itself to be actively running in the foreground to record the accelerometer data, which makes it difficult to do on a regular basis and; Secondly, running phyphox to record such raw sensor data adds a significant drain to the battery, since the sampling rate of the sensors can be quite high.

Another big issue is that the accelerometer data depends on the specific set-up used, which makes comparing the data between different users and set-ups difficult. These factors include:

  • the phone model used,
  • the mount used to attach the phone to the bicycle,
  • the bicycle itself with all components between mount and wheels / point of contact to the ground,
  • the exact trace the wheels took (even a few centimeters can make a different between a smooth ride or feeling like riding on a mogul field)
  • and the traveling speed, as faster or lower speeds may conceal certain conditions of the cyclepath, which would otherwise be visible only by looking at accelerometer data.

But don’t despair, there are some ideas how to address these problems.


Creating a dedicated app that records accelerometer data while running in the background using a more suitable sampling rate will reduce battery drain and makes it more likely to be used on a regular basis.

This would also allow crowd-sourcing of such data. Unfortunately, merging the data is problematic, since it highly relative to the aforementioned factors. However, If cycling a very specific trace makes the difference between feeling like a milk-shake or a smooth ride, or if the bicycle configuration makes all the difference, because the phone mount may shake a little less, we could conclude that the overall experience of that cyclepath are not great. Therefore, if multiple people would cycle the same parts of a route, we could create some sort of average and create a more complete map.

Imagine the possibilities…

Addressing the issues may help to gather a large amount of data on cyclepath conditions. Such information can be used to annotate data on, for instance, OpenStreetMap. Think of route planning services for bicycle rides that use such annotations to not only suggest nice routes based on how the streets should be, but how they are in reality, based on empirical data collected by the users.

Information on the condition of a route could complement others already offered by route planning services, such as elevations and the routing itself. I would love that. Just quickly chose a route nearby for a comfortable relaxing cycle, when you’re in the mood for it 🚲