pkb contents > spatial analysis | just under 996 words | updated 05/21/2017

1. Spatial Analysis

1.1. Quantifying space and place

1.2. Categories of spatial analysis

1.2.1. Clusters, hotspots, heatmaps

Although both produce a smooth-ish gradient visualization from points data (darker=more dense, lighter=less), a hotspot map is different from a heat map. For a heat map, the density surface is created using a point density or kernel density approach. In either case, the resulting map is highly subjective because it depends on your choice of (1) how many input rasters per output raster AKA density unit; (2) length of bandwidth AKA search radius; (3) how points are counted (raw count, inverse-distance weighting, etc.). Here's a script for pretty heatmapping in Python.

A hotspot map defines densities AND includes statistical tests for whether high densities (clusters) are nonrandom. Two primary methods: Gi* and KDE.

Is it possible that the Getis-Ord Gi* (G-i-star) statistic is a recipe for how points are counted (3, above) and that it can be calculated on a point or kernel density basis?

How does this relate to clustering algorithms used outside of geography?

Textbook on spatial points analysis:

library(spdep)



library(spatstat)

# create ppp object
my.ppp <- ppp(x.coordinates, y.coordinates, x.range, y.range)

# use plot(as.ppp(my.ppp)) to truncate plot to specified range
plot(my.ppp) 

# create a density map
plot(density(my.ppp))

# plot Ripley's K, indicates if clustering is nonrandom
plot(Kest(my.ppp))

1.2.2. Spatial dependence

1.3. Resources

1.4. Install notes

1.4.1. Tips for troubleshooting R package installation problems

1.4.2. spdep

1.4.3. spatstat

2. Sources

2.1. References

2.2. Read

2.3. Unread