
Ok, perhaps that was a slightly misleading title for a short blog about bridge height restrictions in London; how else was I going to make you read this?
I happened across an interesting Transport for London (TFL) data set entitled "Bridge height restrictions" here:
According to that site, there are on average 2 bridge strikes a month across London. To put that in context, there are 877 structures within the Greater London boundary/M25 comprising of low bridges, tunnels and road barriers. A cursory analysis of the data shows that the most common type of bridge restriction is one which is between 4.6m and 5.1m:

Exploratory Data Analysis
This part is why I needed to borrow a Big Lebowski quote to get your attention; the TFL data set could yield far more insights, but some data cleaning was necessary. Feel free to skip ahead to the next section.
At this stage, it is worth highlighting that the analysis in this blog would not be possible without OSMNX; it is a package I have worked with in passing before and I have returned to it because of the many possibilities it held in the context of this data set. Read the docs here:
And these are the few lines of code to clean up the dataset (which had quite a lot of repetitive information):
Distribution of Restrictions by Borough
With the cleaned data set, we can construct an interactive map inviting the user to hover and click across London’s various boroughs to visually inspect what the distribution of height restrictions are per borough. When the user hovers over each category of height restrictions for each borough, the "count" parameter gives the frequency of that category occurring in that borough. And of course, the entire dataset is divided depending on whether a particular borough is north (or south) of the river.
Where are all these height restrictions?
Using an interactive folium cluster map, we can see where all the height restrictions are in Greater London. Hovering and clicking on each marker should yield further information about the type of restriction and information about the road name or road number (if any) where that restriction is in effect.
Are there any restrictions along my route?
It’s not every day we get behind the wheel of a double decker or a heavy goods vehicle, but if we did, we would pay more attention to bridge height restrictions than we currently do on a daily basis. As part of this analysis, we wrote a simple function that plots the shortest driving route between two points in Greater London which also marks out all height restrictions which may be relevant to a HGV driver. The code looks like this:
Now that we have this function, we take it on a drive along three routes picked at random; one that is along the north of the river, one that is south of the river and lastly, one that traverses (just) the river. The actual route is in red while the markers set out where there may be applicable restrictions. Certain navigation systems geared towards HGV drivers may already have this functionality, so this was interesting (to me, at least) to build from scratch with the data available.
Conclusions
It’s easy to forget that the dataset is about bridge height restrictions and not about the locations of bridges. While the presence of restrictions is a reasonable proxy for the presence of a bridge, this is not always the case.
If you will recall, the highest level of clearance recorded in the dataset were in relation to restrictions for vehicles between 4.6m and 5.1m; the dataset does not actually have any restrictions for any clearances that are potentially higher than 5.1m. That is why, in the third route between Haggerston and London Bridge, the train tunnels of London Bridge (for you Londoners, that section immediately before one arrives at Borough Market, having just crossed the Thames) barely register at all. This is because they are incredibly high, probably in excess of 5.1m (I haven’t yet checked, I will the next time I pass by).
This is an (interesting) limitation of the data – it plots restrictions and not actual bridges. These might have some interesting ramifications if one were at the wheel of a vehicle more than 5.1m high; but any vehicle beyond that height deserves a blog all of its own.