3 Network analysis
Network analysis is a powerful technique for geospatial problems. In particular, network metrics and routing stand out as a go-to approach for urban and transport applications. Analyses relying on network metrics connect back to real-world phenomena. For example, network centrality measures like closeness and betweenness centralities have been shown to correlate with mixed use at the pedestrian scale [1]. Composite or novel network measures like the street network disconnectivity index (SNDi) have been show to correlated with new forms of disconnected urbanism (like gated communities) resulting in sprawl [2].
However, network metrics don’t focus on the citizen. Routing approaches addresses this disconnect. Routing intrinsically accounts for 2 of the 5C’s of walkability [3]: Connected and Convenient. Even a simple shortest path traversal of the relevant network can pick the best connected and convenient route.
A key advantage of network routing is that it can account for various aspects of real world routes through weighting or post-routing transformations. For example, steeper streets can be weighted to be less “comfortable” than flat ones. Depending on the available data, streets could also be weighted by their pedestrian infrastructure e.g. conspicuous footpaths and adequate lighting.
3.1 Tools, analysis and code
The walkability analyses in Chapter 3 and Chapter 4 were carried out in Python. They are described in detail in a series of blog posts [4] [5] [6] [7] and in Jupyter notebooks on Github [8].
Key Python packages for the analyses are osmnx
and pandana
. osmnx
not only facilitates data downloads from Openstreetmap but also converts streets to a network representation for network analysis / routing. pandana
is able to run many-to-many calculations of origin to nearest destination (and upto 10th nearest) within seconds - where every intersection node in the street network is the origin.
Analyses in Chapter 2 and Chapter 5 were carried out in R and relied on osmdata
, sf
, sfnetworks
[9], elevatr
[10] and slopes
[11]. It’s possible to convert the walkability analysis from Python to R but it’s likely that sfnetworks
will not be as performant as pandana
for many-to-many routing at the scale of a city. However, dodgr
[12] looks promising in this regard. One of the advantages of R (over Python) is the sophistication of packages for data visualisation and statistical modelling.
3.2 Converting distance to time
Distance is a good metric for planners as it is objective. However, citizens rarely think in distances while walking or planning trips. Travel times according to their own abilities is the rubric of choice. This can pose problems as people’s sense of time can be subjective and highly variable. The best way to address the variability is by fitting distance to travel time functions to data collected from travel surveys or fitness apps [13] [14] [15]. Unfortunately, collecting the relevant data for the area in question and fitting the appropriate functions is a research project in its own right so the simplest and most well-known approach, Tobler’s Hiking function [16], has been used in this study.
Tobler’s hiking function for speed, , is a shifted exponential with three parameters , and which give the fastest speed, speed retardation due to gradient and shift from zero respectively. Note that in the equation is a dimensionless quantity: (or, rise / run). Terminology-wise, , is equivalent to gradient and inclination. Speed is given in in km/h and can be converted to a travel time in minutes with a multiplicative factor of 60/1000.
Figure 3.1 shows two versions of the same functional form but with different coefficients. Brunsdon’s form has coefficients fitted with Strava data [15]. This shows that real-world data can markedly affect the conversion factor from distance to speed and travel time.
Figure 3.2 shows how speed by hill gradient converts to travel time by hill gradient. Flat curves for 3km/h and 5km/h are shown for reference. Both Tobler’s and Brundon’s curves are skewed - with the highest speeds for negative gradients (i.e. while walking downhill). Tobler’s parameters correspond to a 5km/h speed at zero gradient.