Hui Jeong(Hailyee) Ha

Human Mobility, Transportation & Spatial Data Science

All Geocomputation lectures

Lecture 9 · Regionalization

When should a cluster become a region?

We’ll compare three ways to group neighbourhoods by heat and cooling access, including a rule that keeps each region connected.

Upcoming ·

From the lecture slides

Rook and queen neighbours · Slide 36
Rook and queen neighbours · Slide 36
A procedure for making connected regions · Slide 49
A procedure for making connected regions · Slide 49
Heat and rook neighbours · Slide 70
Heat and rook neighbours · Slide 70

In the next lecture we’ll put the clusters on a map. Suppose two neighbourhoods are both hot and far from a cool place. Would you put them in the same service area if they were on opposite sides of the city? We’ll try a few ways to make the groups and compare what happens.

Follow the shared edges

Start with Slide 36. Rook neighbours share an edge. Queen neighbours can also share a corner. Slide 49 shows how we start with one region per cell and only join groups that share an edge.

Read the region as well as the average

A region that looks fairly cool on average can still include an especially hot neighbourhood. We’ll compare all the solutions using the same data on the same scale and count how many connected pieces each has. We’ll also look at Moran’s I when the question is how similar a value is to values in nearby places.

In R

Load the lecture grid and use the regionalize() helper defined in the Lecture 9 R demo.

grid <- read.csv("Data/neighbourhoods.csv")
features <- c("canopy_pct", "heat_c", "cooling_walk_min")
z <- scale(grid[features])
adj <- as.matrix(dist(grid[c("x", "y")],
                      method = "manhattan")) == 1
region <- regionalize(z, adj, k = 4)
aggregate(grid[features], list(region = region), mean)

The distance rule applies to a unit-spaced square grid. For real polygons, define adjacency from their geometry before running a constrained procedure.

Key takeaways

  • Decide early whether the regions have to be connected, and define what counts as a neighbour.
  • Check the variation inside each region before relying on its average.