https://ift.tt/3oA71ZC Rush hour in Stockholm, Gemma Evans, Unsplash I measure and rank the cycling infrastructure of European cities b...
I measure and rank the cycling infrastructure of European cities by using crowdsourced data from OpenStreetMap. The cities included have either a population above 400K people or are EU capitals.
Motivation
I’ve been adhering this year to a personal challenge to cycle as my main mode of inner-city transport. This coincided with a period of massive resurgence in cycling popularity across Europe, as cities like Paris or Berlin have made significant investments to boost the modal share of cycling after the lockdowns. Even in my home city of Tallinn, where supposedly only 1% of trips are by bike, it became a dominant topic in this year’s local election. As in any politicised debate there is a tendency to revert from facts to suitable narratives, I started wondering if there’s an objective view based on data that would help to evaluate and rank the efforts of different cities in making their environments more bike-friendly. After all, every city probably looks up to Copenhagen or Amsterdam in this respect, but how well are the others doing? OpenStreetMap, the world’s largest open-source geographic database might provide some of these answers.
Similar projects
There already are a few similar rankings that I could find. For example, the Copenhagenize Index gives subjective scores to a variety of areas such as streetscape, culture and ambition. The city list comprises 600 cities with 600 000 inhabitants worldwide. Another one is the Bicycle Cities Index by digital insurance company Coya. The city list selection is arbitrary, but the measurement is done on a number of objective indicators sourced across the internet such as road infrastructure, bicycle usage, number of fatalities etc.
The reasons for developing yet another one:
- Copenhagenize Index and Bicycle Cities Index were last updated in 2019
- We want to treat fairly both the city selection (based on population size) and the metric measurement, refraining from subjective expert-assigned scores or manual lookup of data from different sources
- Using a standardised methodology based on OpenStreetMap will allow to repeat the experiment at a different time and scale it to an arbitrary number of cities, with little manual additional effort
Methodology
To measure the cyclability of cities, I calculate the share of road infrastructure that has been marked explicitly as cycling-friendly (either a bike lane or bike road) on OpenStreetMap (OSM). The entire navigable length is considered, thus a one-way road has half the length of a two-way. OSM has been deemed a fairly reliable data source both overall and for cycling.
The motivation behind measuring cycling path length is twofold: firstly, it has been shown to be correlated to the popularity of cycling and secondly, the presence of dedicated bike lanes is correlated with increased safety, which should have a further reinforcement effect on cycling popularity. While building many cycling lanes alone is not enough to facilitate a transition to widespread cycling, it is probably a necessary condition.
To qualify as a cycling road, an OpenStreetMap way has to either:
- have lanes dedicated to cyclists or shared with buses (counted as lanes)
- have a sidewalk that explicitly allows cycling (counted as lanes)
- be a separate track for cyclists, a cycle street (mostly Belgium/Netherlands) or a bicycle road (mostly Germany)
- be a path or footway that has been designated to cyclists by signs
It is worth noting that this definition of cycling road is far more restrictive than what a router such as OSRM or Google Maps would use. That’s because for high connectivity and actually calculating sensible routes between any points A and B, routers often guide through ordinary, potentially unsafe streets. As a matter of fact, the part of the road network considered in this study is only roughly 10% of all considered cyclable in OSRM.
Caveats
As splitting between cycle lanes and cycle tracks (including segregated ones) is the only distinction we make from OpenStreetMap data, it’s not possible to quantify all the nuances of these roads. For example, a bike lane could be very well designed: having narrower nearby car lanes, using speed limits or other speed reduction methods, penalising parking on the lane etc. But it could also just be some red paint on a sidewalk that runs into lightning poles and bus stops. Even if some of these fine-grained details could be captured from OSM, it’s doubtful that they would be logged with similar quality across Europe. In addition, cultural factors which are not included in the OSM data model, but affect both the road network and cycling convenience probably exist.
Spatial weighting
A possible caveat of the above approach is the topology of the city. Theoretically, there could be many recreational bike roads near the outskirts of the city where space is abundant, but nothing in the city centre. This would not facilitate cycling as a viable mean of transportation. For this reason, I apply exponential decay weights to the road lengths, where the weights are a function of the road’s distance from the city centre. More precisely, the formula for weighting is:
exp(decay_coef * min(max(distance_from_centre - t_min), t_max))
where the t_min = 10th percentile of road distances from the centre and t_max = max(90th percentile of distances from the centre, 15km). I calibrate the decay coefficient so that the above formula equals to 0.1 at t_max and 1.0 at t_min. This guarantees two things:
- A road in the city centre has 10 times higher weight than a road on the 90th percentile of distance from city centre.
- Censoring t_max at 15km makes sure we do not put weight on faraway roads, in case the city polygon is very large.
Some sample cycling paths with their weights are visualised below on the example of Tallinn, where the circle around the centroid with a radius of 8km (the 90th percentile) denotes the distance at which a road has 10 times less weight than a road in the city centre.
Additional metrics
While the main ranking is based on the above, I also calculate a few auxiliary metrics:
- The share of segregated cycling tracks (a subset of all tracks). This should be the gold standard of a cycling road.
- The share of cycling lanes (as opposed to tracks).
- The number of parking spots per km2.
While these are presented in the full results, they’re excluded from the ranking calculation due to two reasons:
- There are some regional idiosyncrasies between how bike infra is built and logged to OpenStreetMap. While the overall navigable bike road share seems a fairly universal metric, the others yielded unintuitive rankings of the cities.
- I’m not qualified to weigh different types of roads — what’s the value of a bike lane vs a segregated track?
Software used
- OpenStreetMap to download the country maps from Geofabrik
- Osmium tool to extract the city maps from country files and parse map elements
- polygons.openstreetmap.fr to fetch GeoJSON boundaries for cities
- Nominatim to look up city boundary IDs
- Pyrosm and mplleaflet to visualise OSM elements in a notebook
- CyclOSM was used as a sanity check visualisation tool
The base map files were downloaded between September 19 and October 5, 2021.
Results
Copenhagen’s neighbour Malmö takes the top spot this time, 17.3% of the entire navigable road network (16.2% weighted) being explicitly for bikes. Most of the other cities on the list — from The Netherlands, Belgium and Scandinavia — are not surprising either. I was not familiar with cycling in Germany, but this source for Hanover claims that Hanover, Bremen and Munich as having the highest bike modal split, all make the top. Out of larger cities, Paris was already mentioned above. Thus it seems the ranking is capturing what we’d expect it to.
Top 30
Full results can be found here, including the auxiliary metrics.
Discussion
Here point size is proportional to the cycling road share. The map shows that at least bad weather seems to have little (or even inverse) correlation to cycling infrastructure :)
A more convincing case could be made for the relationship with population size. Indeed, most of the top cycling cities seem to be smaller cities. Using the populations of European cities from Wikipedia and plotting against our metric shows that the largest city above 12% (weighted) share has a population of just ~exp(13.8)=1 million. However, over the whole dataset there seems to be no relationship between population and cycle road share (dashed line is the best linear fit). Even if there are some natural scaling factors that reduce the proportion of bike roads in the few very largest cities, there are clearly many smaller cities with few bike roads that could still better realise their potential.
To see whether the ranking is capturing the intended concepts, it is useful to visualise the cycling infrastructure on a map and compare it to our quantitative measurements. I use CyclOSM, which seems to be the best such tool.
Copenhagen vs Sofia
Firstly, comparing a top-ranking city with a bottom one (in CyclOSM maps, the more blue the better) shows that indeed, the overall level of infrastructure is captured:
Nantes and Lyon vs Barcelona
Nantes is an interesting outlier — it makes the top overall, but almost half of that comes from bike lanes. Indeed, it visibly has predominantly cycling lanes (marked by the dashed line), rather than separate cycleways also in CyclOSM.
The same city planning model seems to be used in Lyon.
Contrasting Nantes is Barcelona — anyone who’s cycled there knows the convenience of their designated cycleways that have little overlap with car traffic. While Barcelona does not do too well in the overall ranking, it is at the top when measured by segregated cycling tracks.
Milan vs Zaragoza
Finally, to visualise the benefit of the spatial weighting of roads, we can look at examples of cities that would gain or lose the most in the ranking if we did not do any weighting. For example, Milan would gain 29 places (from 86 to 57) and visibly this is because central Milan has almost no bike roads.
Meanwhile, Zaragoza only has bike roads in the very centre, and would lose 35 places (from 57 to 92) if there was no weighting.
Originally published at https://mlumiste.com on November 6, 2021.
Ranking Cyclability in Europe with OpenStreetMap was originally published in Towards Data Science on Medium, where people are continuing the conversation by highlighting and responding to this story.
from Towards Data Science - Medium https://ift.tt/3FnBCk5
via RiYo Analytics
No comments