Geographic objects are usually matched to what we called the geographic table. Rather, you can think of it as a preview that we will build on throughout the book to showcase much of what is possible with Python. A final note before we delve into the content of this book is in order: this is not a comprehensive account of everything that is possible with each of the data structures we present. We cover how one data in one structure can be effectively transferred to another, but also discuss why that might (or might not) be a good idea in some cases. Second, we explore combinations of different data structures that depart from the traditional data model/structure matchings discussed in Chapter 2. The first part looks at each of the three main data structures reviewed in Chapter 1 ( Geographic Thinking): geographic tables, surfaces and spatial graphs. We take full advantage of this feature here. Indeed, part of the benefit of Python (and other computing languages) is abstraction: the complexities, particularities and quirks associated with each file format are removed as Python represents all data in a few standard ways, regardless of provenance. File formats, while useful, are secondary to this purpose. We take this approach because these data structures are what we interact with during our data analysis: they our interface with the data. This is because the libraries we use will read any format into one of a few canonical data structures that we discuss in Chapter 1. This, then, unites the two concepts of open science and geographical thinking.įurther, we will spend most of the chapter discussing how Python represents data once read from a file or database, rather than focusing on specific file formats used to store data. This will happen alongside the code used to manipulate the data in a single computational laboratory notebook.
We also cover how to interact with these data structures.
We consider how data structures, and the data models they represent, are implemented in Python. This chapter grounds the ideas discussed in the previous two chapters into a practical context.