Spatial Data
Overview
This week we will be focussing on the use of the geopandas library for spatial data analysis and management through a focus on spatial data and its distribution(s). Geopandas will help to clarify how Object-Oriented design and inheritance processes work, while also allowing to interrogate and map the assigned data set(s). A critical concept that should be emerging here is that spatial and numerical data analyses are, fundamentally, just two different views of the same data.
By the end of this week you should be able to:
- Create, reproject and map spatial data with GeoPandas.
- Use exploratory data analysis to identify distributions, outliers and spatial patterns.
- Choose a classification scheme and representation for a map, and justify the choice.
- Explain how spatial weights and spatial autocorrelation (Moran’s I, LISA) extend EDA into ESDA, building on CASA0005.
- Prepare your group’s draft answer to Question 1 (“Is Airbnb ‘out of control’ in London?”) so that you can present it if selected, and use the feedback to improve it.
- Watch the five pre-recorded lectures (≈ 60 min in total): Mapping (11 min + a short clip) · GeoPandas (13 min) · EDA (14 min) · Signal and Noise (15 min) · ESDA (7 min)
- Read Bunday (1963?), Lu and Henning (2013) (pp.67–69 only) and Arribas-Bel (2014), making notes against the study guide questions.
- Prepare your group’s draft answer to Question 1 (“Is Airbnb ‘out of control’ in London?”): groups are selected at random to present in class (see The Assessments).
- Bring your laptop with Podman running.
So we’re going to be looking at both how to work geo-data in Python and how to explore a real-world data set using Exploratory Data Analysis (EDA) and Exploratory Spatial Data Analysis (ESDA) approaches to mapping distributions, testing for NaNs, and so on.
Readings
Come to class prepared to discuss the following readings:
| Citation | Article |
|---|---|
| Bunday (1963?) | URL |
| Lu and Henning (2013) pp.67–69 | URL |
| Arribas-Bel (2014) | URL |
Study Guide
Thinking about Bunday (1963?):
- The professors in Bunday’s article seem to be searching for a data transformation that will reveal the “true” ranking of the students. How does this relate to the concept of a “data-generating process” discussed in Lu and Henning?
- Bunday’s tale suggests that any data transformation can be used to justify a particular conclusion. How does this relate to the choices you make about what to count in your own briefing? Are there specific examples that resonate?
Reflecting on Lu and Henning (2013):
- Lu and Henning use the example of retail cashier salaries to illustrate the limitations of traditional population-based thinking. How does their example help us to understand how the concept of a “population” is used and potentially misused?
- What are the implications of Lu and Henning’s argument for the use of data in policy-making, and for how you describe where your own numbers came from?
Reading Arribas-Bel (2014):
- The title calls new data sources “accidental, open and everywhere”. What does it mean for data to be ‘accidental’, and how does that affect the link between the data you have and the process you want to study?
- Which parts of the Inside Airbnb data would you describe as accidental, and what would you want to know about how they were generated before you use them to answer Question 1?
We’re focussing this week on the links between the data you’re working with and the process you’re trying to study! You might (quite reasonably) assume that these line up nicely, but in the era of big data that isn’t the case. ‘Accidental’ data (Arribas-Bel 2014) such as smartcard, mobile, web traffic, etc. are only ever partial accounts of messy human reality, so we want you to think about the gap between what you have and what you want to study.
Pre-Recorded Lectures
Come to class having watched:
| Session | Video | Presentation |
|---|---|---|
| Mapping | Video | Slides |
| GeoPandas | Video | Slides |
| EDA | Video | Slides |
| Signal and Noise | Video | Slides |
| ESDA | Video | Slides |
In-Person Lectures
In this week’s session we will ask whether you can prove anything with numbers, hear one group’s draft answer to Question 1, and look at where numbers come from.
| Session | Video | Presentation |
|---|---|---|
| Can You Prove Anything with Numbers? | In Class | After the session |
Practical
In the practical we will continue to work with the InsideAirbnb data, here focussing on the second ‘class’ of data in the data set: geography. We will see how to use GoePandas and PySAL for (geo)visualisation and analysis.
The practical focusses on:
- Creating/working with geo-data in Python.
- Making maps with Python.
- Exploring the data visually.
To access the practical: