BristolBathGraph: Postcode Sectors in South-West England as an igraph Object

Description Usage Format Source Examples

Description

An undirected graph ('igraph' object) containing Postcode Sectors of the Bristol (BS) and Bath (BA) area in South-West England of the United Kingdom. Vertexes represent postcode sectors while edges indicate transportation linkage between adjacent postcode sectors.

Usage

1

Format

A 'igraph' object with 245 vertexes and 650 edges.

Vertex attributes:

name

UK postcode sector (e.g. 'BS1 1', 'BS6 5')

population

Usual resident population, provided by UK Census 2011

long

Longitude of the postcode sector

lat

Latitude of the postcode sector

Edge attributes:

distance

Road distance between the incident vertexes, in metres

duration

Travel time between the incident vertexes, in seconds

Source

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Create a subgraph using the top 15 vertexes and plot it.
library(igraph)
library(sp)
set.seed(1000)
plot(induced_subgraph(BristolBathGraph, 1:15))

# Create a histogram showing the distribution of travel time
hist(edge_attr(BristolBathGraph, "duration"))

# Scatterplot showing distance and duration between postcode sectors 
plot(edge_attr(BristolBathGraph, "distance"),
     edge_attr(BristolBathGraph, "duration"),
     xlab = "Distance (m)",
     ylab = "Duration (seconds)")

timothywong731/GeosptNet documentation built on Dec. 23, 2021, 10:57 a.m.