Mining the Best Cycling Roads around Bucharest with Strava

This year I tried to do a little more cycling during the week. I have a road bike, so I’m interested in quality roads – good tarmac, no potholes, enough shoulder to allow trucks to overtake me and live to talk about it. But I don’t know all roads around Bucharest. Best roads for biking are the smaller ones, with little traffic, that lead nowhere important. How can I find them?

I’ve worked on Strava data before and I saw here an opportunity to do it again. Using this simple script, I downloaded (over the course of several days) a total of 6 GB of GPS tracks. I started with the major Strava bike clubs in Bucharest, took all their members, then fetched all rides between April and the middle of June. Starting from 9 clubs, I looked over 1414 users. Only 674 have biked during the analyzed period. The average number of rides for those two and a half months was 25, with the [10, 25, 50, 75, 90]-percentile values of [2, 6, 17, 36, 64]. These are reasonable values, considering there are people that are commuting by bike (even over 20 km per day).

Ok, how can you determine the road quality from 6 GB of data? Simplest solution: take the speed every second (you already have that from Strava) and put it on a map. I did this by converting (lat, lng) pairs to (x, y) coordinates on an image. Each pixel was essentially a bucket, holding a list of speed values.

Let’s check out the area around Bucharest (high res version available here):


In this chart, bright green lines signal roads where there are many riders going over 35 kmph (technically speaking, the 80th percentile is at 35). On the opposite side, red roads are those where you’ll be lucky going with 25 kmph. The color intensity signals how popular a route is, with rarely used roads being barely visible. I already knew the good roads north of Bucharest, with Moara Vlasiei, Dascalu, Snagov and Izvorani. I saw on Strava that the SE ride to Galbinasi is popular, but I’ve never ridden it. From this analysis, I can see there are many good roads to the south and a couple of segments to the west. Unfortunately for me, for anything that’s not in the north I have to cross Bucharest, which is a buzzkill. Also notice the course from Prima Evadare (the jagged red line in the north) and the MTB trails in Cernica, Baneasa and Comana.

Let’s zoom in a little and see how the city looks like:


For this chart, I relaxed the colors a little, with 35 kmph for green and only 20 kmph for red. Things to notice:

  • the RedBull MoonTimeBike course in Tineretului (in red); notice that the whole of Tineretului or Herastrau are red; it means you can’t (and shouldn’t) bike fast in parks; please don’t bike fast in parks, it’s unpleasant (and dangerous) for bikers and pedestrians alike
  • the abandoned road circuit in Baneasa (in bright green)
  • National Arena in green
  • the two slopes around The People’s Palace in green (from how it’s built, all slopes will be green, which is not a problem, since Bucharest is pretty much flat)

Full code available here.

7 thoughts on “Mining the Best Cycling Roads around Bucharest with Strava

  1. Salut Andrei 🙂

    Great job with this! This is by far the most useful analysis of cycle traffic in Bucharest I’ve seen in a while. City planners might get very good pointers from this, combined with the classic Strava maps aggregating the number of trips on each road.

    A couple more things to take into consideration:

    – some roads are prefered by experienced cyclists or commuters while others are prefered by occasional cyclists; this does not necesarily mean that the former are of better quality: take Calea Victoriei and Lascar+Magheru+Balcescu for example, both rutes of about 2 km link Piata Victoriei to Universitate, they both have red and green traffic on your map and both have a bottoleneck in the middle (Piata Revolutiei and Piata Romana respectively), however in practice Calea Victoriei is a lot slower (30% slower in my field measurements – 35 mins on Calea Victoriei abiding by all traffic lights, compared to 25 mins on Lascar+Magheru+Balcescu, both directions alike).

    – while this data might have some genuine meaning regarding road surface quality and crossing times, you have to also consider the safety factor: some green routes are horribly dangerous for cyclists (and some even for pedestrians – take Soseaua Bucuresti-Ploiesti at Miorita, very fast (80 km/h) and highly accident-proned at the Miorita crossing and the subsequent stretch of road all the way up to the Herastrau Bridge); in this light, what might be considered fast/confortable for fast cyclists might not be fast/confortable or even acceptable for slow cyclists.

    Also surprising is the amount of red traffic on your map on Bulevardul Unirii, especially between Unirii Square and Piata Constitutiei. But you might find an explanation in the fact that experienced cyclists take the road while many many beginners and families with children living in the area ride on the (crappy) sidewalks.

    • Salut Tiberiu,

      I think you’re right distinguishing between experienced cyclists and occasional ones. I would go further and split experienced cyclists into commuters and road cyclists. For example, when I’m commuting there’s a lot of traffic around (rush hour) and I go slow, both to be cautious and to not sweat a lot in work clothes. When I’m road cycling, it’s past rush hour and I’m usually in a group, so we tend to occupy one lane and go pretty fast (~40 kmph). By the way I’ve filtered the data, I tried to build that map to show how fast you will be allowed to go if you’re road cycling. Therefore I don’t think it’s correct to use it to analyze bike traffic in general. But the data I crawled from Strava could be used to analyze bike traffic. Let me know if you want to explore some ideas.


    • Salut Bogdan,

      Tricky. In Python nu poti, din cate stiu, sa incarci GMaps. Cea mai simpla varianta la care m-am gandit a fost sa export imaginea ca png tranparent si s-o suprapun in Photoshop peste un screenshot cu o harta. Variante mai avansate ar implica un API in Python si un client in JS.

      • You can use Google Maps API, although I suspect the volume of data would require some form of a premium account for input alone, let alone viewing / public access.

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha * Time limit is exhausted. Please reload the CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.