Book Image

Geospatial Analysis with SQL

By : Bonny P McClain
Book Image

Geospatial Analysis with SQL

By: Bonny P McClain

Overview of this book

Geospatial analysis is industry agnostic and a powerful tool for answering location questions. Combined with the power of SQL, developers and analysts worldwide rely on database integration to solve real-world spatial problems. This book introduces skills to help you detect and quantify patterns in datasets through data exploration, visualization, data engineering, and the application of analysis and spatial techniques. You will begin by exploring the fundamentals of geospatial analysis where you’ll learn about the importance of geospatial analysis and how location information enhances data exploration. Walter Tobler’s second law of geography states, “the phenomenon external to a geographic area of interest affects what goes on inside.” This quote will be the framework of the geospatial questions we will explore. You’ll then observe the framework of geospatial analysis using SQL while learning to create spatial databases and SQL queries and functions. By the end of this book, you will have an expanded toolbox of analytic skills such as PostGIS and QGIS to explore data questions and analysis of spatial information.
Table of Contents (13 chapters)
Free Chapter
Section 1: Getting Started with Geospatial Analytics
Section 2: SQL for Spatial Analytics

Renaming table columns – US census

In Figure 4.8, we are changing the column headings of the data that we will need. The ALTER TABLE function will make the requested changes and you can customize as many columns as you would like.

Figure 4.8 – Renaming the census tables for clarity

Figure 4.8 – Renaming the census tables for clarity

One of the most challenging aspects of working with census data is solved by the ability to create column headings that are clear and descriptive.

What do the census table codes mean?

The data you will use is redistricting data from the 2020 decennial release. Census Reporter simplifies the task so that you can focus on learning how to write SQL queries but let me give you a quick overview.

The documentation for the decennial release can be found here:

The files accessed in this chapter...