Thursday 31 January 2013

The colour of London's commute

Today saw the release of detailed Census data on, among other things, the mode of transport those in work use to get to work. One interesting aspect of this is the rising level of cycling in London, as described here by Cyclists in the City. I'll probably be looking at that later in the week, but first here is a map which attempts to summarise the transport mix across all of London in a single image.

(Click to embiggen, and higher-quality PDF here)

What the map shows is the mix of transport to work of residents living in each part of London*, using ONS data at Middle Super Output Area (MSOA) level. Each MSOA is given an RGB colour determined by the modal share, with red colours representing travel by car, taxi or motorbike, blue travel by public transport and green cycling or walking.

The result is a fairly simple pattern, with motor vehicles predominating on London's fringes, public transport in the inner suburbs and cycling and walking in the very centre. Those tendrils of blue reaching out presumably represent major public transport links.

A few details about the mapping technique for anyone who's interested: I was inspired to use the RGB approach by James Cheshire's map of election results and after some trial and error found a fairly simple way to do it in R which I can provide more details of to anyone who asks. The data and boundaries are both from ONS, the former downloaded from Neighbourhood Statistics. The maps exclude those people of working age who are not in work, who work from home or who use some form of transport so strange that ONS only describe it as 'other'.

* Edited this to make it clear that the map is based on place of residence, following @santacreu34's helpful comment.

Sunday 27 January 2013

Seasonality of road casualties

The other day a few people were discussing on Twitter whether cycling was statistically more dangerous, in terms of casualties per mile, during winter than during summer. This is something I tend to wonder while cycling home in the dark, so I thought I'd try and investigate.

I used DfT's data on reported road casualties in 2011,  the most recent year available. Using just one year's data means the patterns observed may be affected by unusual weather patterns in that year, so you should treat the results as fairly provisional. Another issue with the data is unreporting, so I have focused on fatal or serious injuries which we assume are less likely to be unreported.

Most of the data cleaning and analysis was done with R, and I've copied my code at the bottom of the post. I'm no expert at R so I'm sure the code could be improved, but if anybody wants to use it then feel free.

The DfT data includes all kinds of roads casualties including those suffered while atop horses or tractors, but to keep things simple I've restricted the analysis to pedestrians, cyclists and car occupants (excluding taxis and private hire vehicles). The chart below shows the total number of fatal and serious casualties in England and Wales by road user type and month in 2011:

You can see the different patterns for each mode more clearly if you split them out:

What you see are very clear seasonal patterns for pedestrians and cyclists, with pedestrian casualties rising as winter draws in and then reaching a trough in summer, and cyclist casualties following more or less an opposite trend. There doesn't seem to be much of a pattern for car occupants, although the number of casualties is highest in December and January.

Here's the same chart for London:

The raw numbers shift around a lot because London's mode share is so different, with a lot more pedestrians and cyclists and less car traffic than in the rest of the country. But the seasonal patterns look a little different too. In particular there is a much bigger increase in pedestrian casualties towards the end of the year, and December has nearly twice as many as January.

For cyclists the obvious explanation for higher casualties in summer months is that more people cycle at that time of year. For pedestrians the logic is less clear. It doesn't seem likely that there is much more walking done in the winter months than in the summer. So the winter months, particularly December, just seem to be more risky. Nationally, the worst days for fatal or serious pedestrian casualties in 2011 were the 9th, 12th and 16th of December. There was plenty of snow that month but I wonder whether there is also some sort of 'Christmas party effect' at work here, on both pedestrians and drivers (by the way, in the US the deadliest day for pedestrians is apparently New Year's Day - see also this).

To calculate a casualty rate you divide casualties by some measure of traffic or trips. For pedestrians there's no such data that I know of. But TfL count cars and bikes passing various points on the London road network, and they have made the cycling data available via FOI in the form of this big Excel spreadsheet. This data is patchy for some count points but you can fill in the gaps with estimates based on the ones with complete data.

The other option for estimating monthly cycle trips is to use TfL's counts of cycle hires. The chart below compares monthly trends in fatal/serious bike casualties, TfL cycle counts and cycle hires, by expressing each month's figure as a ratio of the average.

Now, you probably shouldn't read too much into this comparison as it's comparing one imperfect data source with another two imperfect ones gathered at different spatial scales. But it does look like there is a bigger increase in casualties between January and June than there is in either of the trip indicators. This suggests, again very provisionally given the limitations of the data, that the number of casualties per cycling trip may be lower in the first few months of the year than in summer.

We really need a more comprehensive analysis to establish if this really is the case, but if it was what would explain it? Perhaps people who cycle all year may be more careful or skilled than those who only take to their bikes in summer. Maybe drivers may look out for cyclists more in winter. At this stage, we just don't know.

Wednesday 23 January 2013

A better map of population density

If you want to produce a map of population density the usual way to go about it is to get some Census data on density in different zones (wards, Census tracts, etc) and plot it like the map below, which shows 2011 population density in London at Middle Super Output Area (MSOA) level (darker colours represent higher density).

This approach has the virtues of being quick and a fairly standard approach, but there are serious drawbacks too. The most serious one is that this map doesn't really show you the distribution of population, because it hides the fact that across large swathes of London there are no people whatsoever. Much of London's area comprises water (only partially represented in the map above in the shape of the Thames), parkland, transport, industrial or commercial property, or some other non-residential use.

Not only do choropleth maps of this kind not show these variations in land use, but by analogy the calculation of population density across the whole area of each zone will greatly understate the 'real' density of population in zones with little residential land. Look at the very centre of the map, for example. That white blob is the City of London, and this map is telling us that it has very low population density, similar to London's semi-rural outskirts. In the sense of 'population per hectare of all land', that's true, because most of the City comprises commercial property with nobody living there. But there are some residential areas in the City and in these areas people live at fairly high densities. So in terms of 'population per hectare of residential land' the map is quite misleading.

We may get a more realistic picture from a dasymetric map. This type of map combines the same kind of population data with separate data on land use, so that only the relevant areas are highlighted. For our purposes we are interested in residential land, and for that I went to the European Environment Agency's Urban Atlas maps of urban land use based on 2006 satellite data. Using R I extracted from the London map the area covered by continuous or discontinuous 'urban fabric' and also any construction sites, as most of these will be for housing. While 'urban fabric' sounds a bit general there are categories for industrial, commercial, transport, water, green, forest, leisure and other land uses so I was fairly confident that it represented residential land reasonably accurately.

Using QGIS I joined this residential land layer to the same data on population at MSOA level from the Census, recalculated population density in each MSOA on the basis of the residential land only, linked the results back onto the residential layer, and mapped it:

Click on the image for a bigger version (or find the full size 7mb behemoth here).

What we end up with is, I think, a much better map of London's population density, because it shows only the residential areas (or a close approximation) and it doesn't artificially reduce density in mostly non-residential areas like the City or indeed Bromley or neighbourhoods bordering the Lea valley.

Using this approach also changes the ranking of boroughs in terms of population density. Measured in gross terms (that is, across all land), Islington had the highest population density of any London borough in 2011 at 139 people per hectare. But looking only at residential land Islington's net population density was 181 people per hectare - higher, but not nearly as high as Tower Hamlets at 256. And this makes sense - Tower Hamlets has large areas of non-residential land (much of Canary Wharf, for example), but what residential land it does have tends to be pretty densely occupied.

I should say that this map is far from a perfect representation of reality. It has a number of flaws, such as the combination of land use data from 2006 with population data from 2011, so that it undoubtedly misses out some residential areas created in the interim. It divides the entire range of population densities into only four categories which are then treated as internally identical. And similarly, like all spatially aggregated data it hides variation within each zone, in this case MSOAs. I could have used the smaller Output Area geography, but it would have taken more time and more computing power than I wanted.

Update, 1 Feb: Here's a scrollable, zoomable version of the full-size map for you to explore:

Thursday 17 January 2013

Bike lanes, livability and displacement

The fact that the Evening Standard's property section is now running features about "good-value homes within cycling distance of the office" is good news for cycling as a cause, but perhaps not so good if you're just a normal self-interested cyclist.

Back in the good old days when cycling in London was a freakishly unusual thing to do, whether some place was within cycling distance of the City or not didn't affect its valuation much because there weren't enough cyclists for it to matter. So if you happened to be one of that small number of cyclists you enjoyed a quick commute without having to pay a price premium for it.

But now that cycling has become popular enough in Inner London for even estate agents to notice, "within cycling distance" has become a saleable feature and accordingly comes with a price tag. Given enough cyclists, things like infrastructure quality will start affecting prices too: if someone builds a great bike lane from your flat to the City then more people will want to move there to avail of it, overall market demand will go up and so will the property value.

Now, if you use the bike lane enough you might think the higher price is still worth it. And if you already own a flat in the area you might be pleased too, even if you don't use the bike lane, because your property value just went up. But tenants who don't cycle will be worst off as they'll see their rent go up for no benefit.

This kind of concern is why people sometimes campaign against what others see as entirely benign neighbourhood improvements, and it's what motivates polemics like this one against "livability" defined in terms of supposedly ephemeral amenities like bike lanes rather than the more 'real' livability concerns of jobs, transport and housing.

Campaigns against bike lanes can seem fairly insane, and to be honest sometimes they are, but sometimes they are part of a wider struggle over processes of neighbourhood change, gentrification and displacement. Advocates of livability improvements generally don't intend to displace anyone, but in my view it is irresponsible to not at least consider these price effects and the likely social consequences.

Displacement is not inevitable, though. Higher housing demand can be offset by higher housing supply, moderating or even eliminating the price impact while enabling more people to enjoy these new amenities. Of course, people tend to be hostile to new housing supply in their area so campaigners usually choose to avoid the topic, but there's really no getting away from the market dynamics. If you make a place more attractive without making it possible for more people to live there, prices will go up and people will get displaced. Is that really what you want?

Sunday 13 January 2013

Surveys about cycling

Just a quick post about a couple of interesting surveys of people's attitudes to different types of cycling infrastructure. First, via Ian Walker on Twitter, is a survey in the Vancouver region which found:
The best route types to encourage cycling were:
- paved off-street bike paths
- residential streets with traffic calming
- cycle paths next to major streets, but separated from motor vehicles by a curb or other barrier (also known as "cycle tracks")
The findings include this chart showing how regular, occasional and 'potential' cyclists all feel about different types of route and infrastructure.

16 Route Types, Average Likelihood of Choosing by Cyclist Type
Second, a survey in Bristol which is interesting because it asked non-cyclists their views on cycling provision:
When asked to assess their cycle route to work, only 10% of non-cyclists were happy with their commute's cycling potential (indicated by a rating of 'excellent', 'very good' or 'good'). 21% said it was OK, and 35% said it was poor or very poor, with the other third of respondents unsure. 
72% indicated that their major reason for not cycling to work was because it would be 'unsafe/stressful' to do so. This was the stand-out response. Reinforcing this response, almost exactly the same number (71%) of non-cyclists agreed that they would consider cycling more frequently if safe, well-connected, physically segregated cycle ways were provided for the majority of their commute.

Tuesday 1 January 2013

People in London go out of their way to avoid cycling on busy roads

Transport for London's latest annual Travel in London report is, as usual, full of interesting information. I found this paragraph from p. 122 on attitudes to cycling particularly striking:
Cyclists generally feel safer on quieter roads. A survey of Londoners found that cyclists consider quiet roads to be safer than busy roads. Four-fifths consider quiet roads to be safe, compared with 49 per cent (regular cyclists) or 28 per cent (occasional cyclists) for busy roads. A recent study of current cyclists in London found that cyclists were willing to increase their journey time to travel on better, safer routes. Current London cyclists are prepared to travel further to cycle in cycle lanes, bus lanes, on residential roads and would travel three times further to cycle on off-road routes. Around half of all cyclists would change their route to travel through parks and green spaces, or to travel on a dedicated on-road cycle lane. And around 40 per cent said they would change their route in order to use a Cycle Superhighway.
The key fact is that only 28% of occasional cyclists in London think busy roads are safe, compared to a majority who think quiet roads are safe. That may sound obvious to some, but to me it shows illustrates two important points:

  • Most people don't think cycling itself is unsafe, just cycling in heavy traffic.
  • Busy roads are more likely to have cycling 'infrastructure' such as advisory cycle lanes, but they don't seem to have much impact on safety perceptions. This suggests we need better infrastructure, a la the Netherlands.
The research about how far out of their way people are willing to go for a safe cycle route is also important. Choosing a slower but safer route is a form of 'avertive' behaviour, just like people moving away from a polluted road. It lowers the observed costs in the form of road accidents (or respiratory disease from the polluted road) but it increases the hidden costs borne by people in the form of higher expenditure of time or money to avoid the problem. Avertive behaviour prompted by unsafe cycling conditions ranges from finding a slower but safer route to spending loads of money on luminous clothing to not cycling at all. These costs are very large but to my knowledge are not well accounted for in current transport assessment methods.