How do you know a road is quiet? Where cycling traffic data comes from
Also available in: DeutschFrançaisNederlands
Look at a map of any area you've never ridden and try to answer a simple question: which of these roads are quiet?
You can't. A thin yellow line on the map can be a lovely country lane, or it can be the road every truck in the region uses to skip the motorway toll. A road that looks "minor" can carry thousands of cars a day, and a road that looks important can be empty because a new bypass opened next to it ten years ago. The map shows where roads are. It doesn't show how it feels to ride them.
This is the single biggest problem I had riding in new places, and it's the main reason RouteCycle exists.
Why other planners don't solve it
Most route planners are built on the same idea as car navigation: find the shortest or fastest path between the points you clicked. They have cycling profiles, and those profiles do prefer cycle paths and avoid motorways. But in the end the algorithm still optimises for time and distance.
So if there is a 100 km route with traffic and a 150 km route on empty roads, a classic planner will pick the 100 km one almost every time. You can fight it by adding points in the middle to push the route away from a busy road, but you choose those points blind. If you don't know the area, you don't know which road you're pushing it onto.
RouteCycle asks a different question. Not "what's the fastest way?" but "what's a good ride?". A good ride can be longer. It usually is.
A road's class is not enough
The obvious first step is the road classification in the map data. In OpenStreetMap, every road has a type: motorway, trunk, primary, secondary, tertiary, unclassified, residential, service road, track and so on. As a rough rule, the higher the class, the more traffic.
It's a good start, and it's also where most of the problems hide:
- Classification is about the road network, not about traffic. Mappers tag a road "secondary" because of its role in connecting places. Two secondary roads in the same region can be completely different to ride.
- It varies by country. "Tertiary" in the Netherlands, in Cyprus and in rural France are three different things.
- It changes slowly. A road that lost most of its traffic to a new bypass often keeps its old classification for years.
- The small roads are the hardest. The difference between a pleasant lane and a rat run used by commuters is exactly the difference the classification can't show.
So road class is one input, not the answer.
Where traffic information comes from
To get closer to the real picture, RouteCycle combines several kinds of sources, and which ones are available depends a lot on the country:
- Official traffic counts. Many countries count vehicles on their roads and publish the numbers as open data. Where this data exists, it's the most direct signal there is: an actual number of cars per day.
- The road itself. Number of lanes, speed limit, road width, whether there's a separate cycle lane or cycle track, whether the road is a through route or a dead end. Each of these tells you something about how busy and how fast the traffic is.
- The shape of the network. A road that is the only connection between two towns behaves very differently from a road that runs parallel to a motorway. You can learn a lot about a road from where it sits in the network.
- Satellite images. A photo from above shows what the map often doesn't: how wide the road really is, how many lanes and markings it has, whether there's a shoulder, what's around it, and how many cars are actually on it. One image is just a snapshot, but cars counted across many images and many roads add up to a real picture of which roads are busy. A road between fields looks very different from one lined with warehouses and petrol stations.
- Machine learning. Where there are no counts, models can estimate traffic from everything above. They learn on the roads where real numbers exist and fill in the gaps elsewhere.
No single source is complete or perfect everywhere, which is why they are combined. The result is an estimate of how unpleasant each road is likely to be on a bike, not just how big it is on the map.
Turning "quiet" into a route
Once every road has an estimate, the routing part changes too. Instead of asking for the shortest path, the planner treats busy roads as expensive: riding 1 km on a busy road "costs" much more than 1 km on a quiet one. A detour through small lanes then wins even when it adds real distance.
There are a few rules I learned the hard way:
- Get out of the traffic fast. If you start in a town, the first kilometres matter a lot. Outside the city mode tries to leave town quickly and stay in the countryside.
- A short busy section can be fine; a long one rarely is. Crossing a main road, or riding a short stretch of it to reach the next lane, is normal. Riding a long way on it is not.
- Quiet beats short, but not at any price. A route that doubles the distance to avoid one junction isn't a good ride either. The balance is what most of the tuning is about.
The default ride, with no options turned on, should be something like the roads local cyclists ride every day: nothing special, but peaceful and solid. If you get a route that sends you along a busy road, that is a bug for me, not bad luck.
When it gets it wrong
It does get it wrong sometimes. Most often the reason is the map data in a particular area: a road with a missing or wrong tag, or a country where no traffic data is available, so the estimate leans more on road type. I wrote more about this in why some roads look wrong on the map.
Every route has a feedback button. If a route sends you somewhere you'd never ride, send it to me with a short note. That's honestly the most useful thing you can do for the project. I read every report and use them to fix the algorithm.
You can try it on your own area: open the route planner, pick a start point and a distance, and see which roads it chooses.