Due to its supposed comprehensiveness, the census remains very widely used in understanding travel patterns. This is despite many obvious limitations, such as travel being reduced to a self-reported description of “main mode of travel to work”. However, even if the world were that simple, any serious analyst needs to carry a lot of context in their head when interpreting such data. This short post demonstrates how a simple adjustment for context can transform understanding of travel choices.
Figure 1 shows a standard choropleth map of the proportion of commuters in each workplace Middle Layer Census Super Output Area (MSOA) who reported that their main mode of travel was a bicycle.

One slightly surprising finding is that this map does not appear to be dominated by cities, an outcome readily investigated further using appropriate tabulations. However, the main feature of this map which stands out is that there appears to be much more reporting of cycling on the East Coast. Apart from containing East Yorkshire which is obviously wonderful in every respect, these eastern areas are known to be flatter. This work is to conduct an initial exploration of the extent to which accounting for hilliness might explain the pattern seen in this map.
Deriving a Hilliness Index
Using the Ordnance Survey 50m Digital Elevation Model (DEM) simple analysis with a Geographic Information System (GIS) can create a metric (a ‘hilliness index’) which attempts to capture the amount of hilliness in any given MSOA. Figure 2 shows a plot of this metric.

Although there appears to be concordant patterns, it is notoriously difficult to compare the patterns in choropleth maps. It is therefore useful to produce a heat map to compare the number of cyclists and the proportion of cyclists in relation to the hilliness index and distance travelled.


Figure 3a & 3b show that the numerically greatest number of cyclists are associated with a hilliness index of 5 and a distance of perhaps 3,000 metres commute. However, this is partly a feature of the number of MSOAs which have a hilliness index in that range. Standardising the number of cyclists by the number of all commuters shows that the proportion of cyclists is higher in lower hilliness index areas.
“Levelling the playing field”
A standard way of levelling the playing field involves the use of some form of regression model. This allows us to see what the effect of individual features would be, were it possible to fix all the other features at some constant value. We therefore fit a so-called Generalised Linear Model. The number of cyclists who reported commuting by bicycle in a given MSOA is a count, denoted by $y_i$, with the index $i$ denoting a specific MSOA. It is common to assume that these are realisations of Poisson random variables $Y_i$. It is computationally convenient to work with a rate; the number of respondents who did report cycling as their main mode of travel to work divided by the expected number of cycle commuters in a given MSOA $\frac{y_i}{e_i}$. This “expected number of cycle commuters”, $e_i$ is found by taking the proportion of all workers who live in a particular MSOA and multiplying that proportion by the total number of cycle commuters. These Poisson random variables are assumed to have an MSOA specific rate parameter $λ_i$. We can develop a linear model for this rate parameter.
In formal terms, this model is as follows: $Y_i \sim \textrm{Poisson}(e_i \lambda_i)$
This tells us that $Y_i$ is distributed as a Poisson random variable, with a mean value given by the rate parameter $\lambda_i$, for that MSOA and multiplied by the expected number of self-reported cycle commuters in that MSOA $e_i$. The next step is to specify a linear model for $\ln(\lambda_i)$, the natural logarithm of this “relative rate” of cycle commuting parameter for each MSOA. Given a metric $x_i$ that can summarise the average hilliness of an MSOA, then the following model was fitted.
Model 1:
$\ln (\lambda_i) = \ln(e_i) + \beta_0 + \beta_1 x_i$
Fitting this model gave the following parameter estimates:
$\hat{\beta}_0 = 0.399 (0.002)$ $\hat{\beta}_1 = -0.211 (0.001)$
The key value here is the estimate -0.211 for $\hat{\beta}_1$ which tells us about the relationship between hilliness and cycle commuting. It is negative, so as hilliness increases, cycling decreases. The standard error (in brackets) is very small, far less than half the absolute value of the parameter estimate which conventional statistics tells us is the threshold for claiming statistical significance. As the model has been built in terms of modelling $\ln (\lambda_i)$ a more interpretable scale to use is exp(-0.211) = 0.81. For every unit increase in the hilliness index the rate of commuting by cycle will be reduced to 81% of the rate seen at the lower hilliness index. The hilliness index ranges from 0 to 16 giving some idea that this is predicting a considerable variation in the average amount of self-reporting cycling to work in any given MSOA.
Alternatives
It is also possible to fit additive models to these data with tensor smooths.This is somewhat like a two-dimensional gravity model fitted to hilliness as well as distance, but where the cost function is estimated in a non-parametric way.
Model 2:
$\ln (\lambda_i) = \ln(e_i) + \beta_0 + \mbox{tensor}(x_{i1}, x_{i2})$
The results of such a model fit are best shown as images, rather than parameter estimates. Figure 4 shows estimates of the tensor terms fitted to a model for cyclist count and to cyclist proportion. These seem to be in reasonable agreement with the raw data plots shown in Figure 3a & 3b. Figure 3b for example shows that the proportion of cyclists is greatest for shorter trips in less hilly areas.


When the playing field is level
Figure 5 below shows a plot, based on Model 1, of the predicted values for cycling levels assuming all areas had an average hilliness of 10. Effectively, the model predictions for a hilliness of 10 have been added to the original residuals (the difference between the data and the model predictions based on the actual hilliness).
Some people might claim this is what Figure 1 could look like were electric bikes more widely available and hilliness were no concern. Minimising the effects of hilliness, through the promotion of electric bikes could be a viable strategy to increase cycling rates in areas with a higher hilliness index. It is important to note that there is research to suggest that there are still health benefits to be gained from riding an e-bike. Indeed, there are suggestions that e-bikes are competitors to cars and ownership is negatively correlated with existing bike ownership.

Looking at cycling rates on a level playing field can help us pinpoint areas where lower-than-average cycling rates cannot be explained by the hilliness index. What is immediately apparent with the level playing field scenario is that both Manchester and Birmingham report very low levels of cycling. It’s impossible to say what vehicle is preferred by “Essex Man”, but it doesn’t look like it is the bicycle. However, it’s important to consider ways in which this may be a data source artefact. It may be that in large metropolitan areas multimodal trips are more common, but these are not captured in the census. It may be that these cities see greater variation in working location or travel modes, neither of which are well covered by the census. On the other hand, it is also apparent, even allowing for their notable flatness, that York and Cambridge still have relatively larger numbers of self-reported cycle commuters.
Most importantly, it should be noted that this simple observational model does not “prove” causality. It could be that historically, companies and councils in flatter areas have chosen to invest more in cycling infrastructure believing it to be a more viable commuting option. One anecdote would counter that train of thought. City Science is based within the Oxygen House family of companies. Oxygen House has 14% of females and 30% of males cycling to work in the east of Exeter, an outcome which massively bucks the national average in terms of the number of cycle commuters, and this happens in a city of above average hilliness. It may be that Oxygen House facilities (secure parking, showers, onsite training, green travel allowance) tend to be less common in hillier areas. The only point that can be made is to emphasise the importance of being cautious when claiming causation from observational data and extending the analysis to take account of other important factors.
Extensions
Such Generalised Linear Models offer a very flexible framework. This model could be readily extended to include other confounding factors. The most obvious predictor variables to include in a subsequent modelling stage would be gender and age band. These are both known to be related to cycle commuting rates and some tabulations are available from within the census. Likewise, climate may have an association with cycling rates. There is certainly evidence of higher levels of regular outdoor sports participation in areas of England associated with lower average rainfall levels. Ultimately, some would argue that because of the innate limitations of the census it does not warrant an excessively detailed investigation. The future of travel planning will rely on using models with a variety of fused data sets. Models such as these provide the basic building blocks for the fusion as well as for the interpretation.
Author
Paul Hewson PhD, Senior Data Scientist


