12.6 Nodes
Nodes in geographic transport data are zero-dimensional features (points) among the predominantly one-dimensional features (lines) that comprise the network.There are two types of transport nodes:
- Nodes not directly on the network such as zone centroids — covered in the next section — or individual origins and destinations such as houses and workplaces.
- Nodes that are a part of transport networks, representing individual pathways, intersections between pathways (junctions) and points for entering or exiting a transport network such as bus stops and train stations.
Transport networks can be represented as graphs, in which each segment is connected (via edges representing geographic lines) to one or more other edges in the network.Nodes outside the network can be added with “centroid connectors”, new route segments to nearby nodes on the network (Hollander 2016).72Every node in the network is then connected by one or more ‘edges’ that represent individual segments on the network.We will see how transport networks can be represented as graphs in Section 12.7.
Public transport stops are particularly important nodes that can be represented as either type of node: a bus stop that is part of a road, or a large rail station that is represented by its pedestrian entry point hundreds of meters from railway tracks.We will use railway stations to illustrate public transport nodes, in relation to the research question of increasing cycling in Bristol.These stations are provided by spDataLarge in bristol_stations
.
A common barrier preventing people from switching away from cars for commuting to work is that the distance from home to work is too far to walk or cycle.Public transport can reduce this barrier by providing a fast and high-volume option for common routes into cities.From an active travel perspective, public transport ‘legs’ of longer journeys divide trips into three:
- The origin leg, typically from residential areas to public transport stations.
- The public transport leg, which typically goes from the station nearest a trip’s origin to the station nearest its destination.
- The destination leg, from the station of alighting to the destination.
Building on the analysis conducted in Section 12.4, public transport nodes can be used to construct three-part desire lines for trips that can be taken by bus and (the mode used in this example) rail.The first stage is to identify the desire lines with most public transport travel, which in our case is easy because our previously created datasetdesire_lines
already contains a variable describing the number of trips by train (the public transport potential could also be estimated using public transport routing services such as OpenTripPlanner).To make the approach easier to follow, we will select only the top three desire lines in terms of rails use:
desire_rail = top_n(desire_lines, n = 3, wt = train)
The challenge now is to ‘break-up’ each of these lines into three pieces, representing travel via public transport nodes.This can be done by converting a desire line into a multiline object consisting of three line geometries representing origin, public transport and destination legs of the trip.This operation can be divided into three stages: matrix creation (of origins, destinations and the ‘via’ points representing rail stations), identification of nearest neighbors and conversion to multilines.These are undertaken by line_via()
.This stplanr function takes input lines and points and returns a copy of the desire lines — see the Desire Lines Extended vignette on the geocompr.github.io website and ?line_via
for details on how this works.The output is the same as the input line, except it has new geometry columns representing the journey via public transport nodes, as demonstrated below:
ncol(desire_rail)
#> [1] 10
desire_rail = line_via(desire_rail, bristol_stations)
ncol(desire_rail)
#> [1] 13
As illustrated in Figure 12.4, the initial desire_rail
lines now have three additional geometry list columns representing travel from home to the origin station, from there to the destination, and finally from the destination station to the destination.In this case, the destination leg is very short (walking distance) but the origin legs may be sufficiently far to justify investment in cycling infrastructure to encourage people to cycle to the stations on the outward leg of peoples’ journey to work in the residential areas surrounding the three origin stations in Figure 12.4.
Figure 12.4: Station nodes (red dots) used as intermediary points that convert straight desire lines with high rail usage (black) into three legs: to the origin station (red) via public transport (gray) and to the destination (a very short blue line).