Spatial Data Operations

Content for Wednesday, September 24, 2025

Last class you learned a bit about joining attributes across tabular and spatial data. As you hopefully have learned, simply getting the attributes lined up doesn’t avoid the potential fallacies involved in spatial analysis. Doing that requires not just aligning who the data belongs to (i.e., via the attributes), but also ensuring that the scales of measurement align with our questions. Today, we’ll learn some of the spatial operations available in R that help us change the geometry of our data to better align the scales of measurement with the scales of our question.

Readings

Bigger Picture

Technical Details

  • The introductory vignette for the sf package has a lot of useful info on sf objects and conventions.

  • Section 2.2 on Vector Data and Sections 5.1-5.3 on Geographic Operations in Lovelace et al. (Lovelace et al. 2019) - for more details about vectors and geometric operations on vectors.

  • Section 3.1 and 3.2 of Spatial Data Science, a bookdown project by Edzer Pebesma and Roger Bivand (of the sf, sp, rgeos, and rgdal packages).

Objectives

By the end of today, you should be able to:

  • Describe the Modifiable Areal Unit Problem (MAUP).

  • Link the inferential problems of the ecological fallacy to the statistical problems of the MAUP.

  • Modify the geometries of spatial objects to explore the MAUP.

Slides

The slides for today’s lesson are available online as an HTML file. Use the buttons below to open the slides either as an interactive website or as a static PDF (for printing or storing for later). You can also click in the slides below and navigate through them with your left and right arrow keys.

View all slides in new window Download PDF of all slides

References

Lovelace, R., J. Nowosad, and J. Muenchow. 2019. Geocomputation with R. CRC Press.
Nelson, J. K., and C. A. Brewer. 2017. Evaluating data stability in aggregation structures across spatial scales: Revisiting the modifiable areal unit problem. Cartography and Geographic Information Science 44:35–50.
Robinson, W. 1950. Ecological correlations and the behavior of individuals. American Sociological Review 15:351–357.
Tuson, M., M. Yap, M. R. Kok, K. Murray, B. Turlach, and D. Whyatt. 2019. Incorporating geography into a new generalized theoretical and statistical framework addressing the modifiable areal unit problem. International journal of health geographics 18:6.