Python for Geospatial Data Analysis: Theory, Tools, and Practice for Location Intelligence

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

In spatial data science, things in closer proximity to one another likely have more in common than things that are farther apart. With this practical book, geospatial professionals, data scientists, business analysts, geographers, geologists, and others familiar with data analysis and visualization will learn the fundamentals of spatial data analysis to gain a deeper understanding of their data questions. Author Bonny P. McClain demonstrates why detecting and quantifying patterns in geospatial data is vital. Both proprietary and open source platforms allow you to process and visualize spatial information. This book is for people familiar with data analysis or visualization who are eager to explore geospatial integration with Python. This book helps you Understand the importance of applying spatial relationships in data science Select and apply data layering of both raster and vector graphics Apply location data to leverage spatial analytics Design informative and accurate maps Automate geographic data with Python scripts Explore Python packages for additional functionality Work with atypical data types such as polygons, shape files, and projections Understand the graphical syntax of spatial data science to stimulate curiosity

Author(s): Bonny P. McClain
Publisher: O’Reilly Media, Inc.
Year: 2022

Language: English
Pages: 279

Cover
Copyright
Table of Contents
Preface
Why Python?
How This Book Works
Who Is This Book For?
A Few Tips on Tooling
Finding Your Way
Conventions Used in This Book
Using Code Examples
O’Reilly Online Learning
How to Contact Us
Acknowledgments
Chapter 1. Introduction to Geospatial Analytics
Democratizing Data
Asking Data Questions
A Conceptual Framework for Spatial Data Science
Map Projections
Vector Data: Places as Objects
Raster Data: Understanding Spatial Relationships
Evaluating and Selecting Datasets
Summary
Chapter 2. Essential Facilities for Spatial Analysis
Exploring Spatial Data in QGIS
Installing QGIS
Adding Basemaps to QGIS
Exploring Data Resources
Visualizing Environmental Complaints in New York City
Uploading Data to QGIS
Setting the Project CRS
Using the Query Editor to Filter Data
Visualizing Population Data
The QGIS Python Console
Loading a Raster Layer
Redlining: Mapping Inequalities
Summary
Chapter 3. QGIS: Exploring PyQGIS and Native Algorithms for Spatial Analytics
Exploring the QGIS Workspace: Tree Cover and Inequality in San Francisco
The Python Plug-in
Accessing the Data
Working with Layer Panels
Addressing the Research Question
Web Feature Service: Identifying Environmental Threats in Massachusetts
Accessing the Data
Discovering Attributes
Working with Iterators
Layer Styling
Using Processing Algorithms in the Python Console
Working with Algorithms
Extract by Expression
Buffer
Extract by Location
Summary
Chapter 4. Geospatial Analytics in the Cloud: Google Earth Engine and Other Tools
Google Earth Engine Setup
Using the GEE Console and geemap
Creating a Conda Environment
Opening the Jupyter Notebook
Installing geemap and Other Packages
Navigating geemap
Layers and Tools
Basemaps
Exploring the Landsat 9 Image Collection
Working with Spectral Bands
The National Land Cover Database Basemap
Accessing the Data
Building a Custom Legend
Leafmap: An Alternative to Google Earth Engine
Summary
Chapter 5. OpenStreetMap: Accessing Geospatial Data with OSMnx
A Conceptual Model of OpenStreetMap
Tags
Multidigraphs
Installing OSMnx
Choosing a Location
Understanding Arguments and Parameters
Calculating Travel Times
Basic Statistical Measures in OSMnx
Circuity
Network Analysis: Circuity in Paris, France
Betweenness Centrality
Network Types
Customizing Your Neighborhood Maps
Geometries from Place
Geometries from Address
Working with QuickOSM in QGIS
Summary
Chapter 6. The ArcGIS Python API
Setup
Modules Available in the ArcGIS Python API
Installing ArcGIS Pro
Setting Up Your Environment
Installing Packages
Connecting to the ArcGIS Python API
Connecting to ArcGIS Online as an Anonymous User
Connecting to an ArcGIS User Account with Credentials
Exploring Imagery Layers: Urban Heat Island Maps
Raster Functions
Exploring Image Attributes
Improving Images
Comparing a Location over Multiple Points in Time
Filtering Layers
Summary
Chapter 7. GeoPandas and Spatial Statistics
Installing GeoPandas
Working with GeoJSON files
Creating a GeoDataFrame
Working with US Census Data: Los Angeles Population Density Map
Accessing Tract and Population Data Through the Census API and FTP
Accessing Data from the Census API in Your Browser
Using Data Profiles
Creating the Map
Summary
Chapter 8. Data Cleaning
Checking for Missing Data
Uploading to Colab
Nulls and Non-Nulls
Data Types
Metadata
Summary Statistics
Replacing Missing Values
Visualizing Data with Missingno
Mapping Patterns
Latitude and Longitude
Shapefiles
Summary
Chapter 9. Exploring the Geospatial Data Abstraction Library (GDAL)
Setting Up GDAL
Installing Spyder
Installing GDAL
Working with GDAL at the Command Line
Editing Your Data with GDAL
The Warp Function
Capturing Input Raster Bands
Working with the GDAL Library in Python
Getting Oriented in Spyder
Exploring Your Data in Spyder
Transforming Files in GDAL
Using the Binmask in GDAL
The Complete Script
Exploring Open Source Raster Files
USGS EarthExplorer
Copernicus Open Access Hub
Google Earth Engine
Summary
Chapter 10. Using Python to Measure Climate Data
Example 1: Examining Climate Prediction with Precipitation Data
Goals
Downloading Your Data
Working in Xarray
Combining Your 2015 and 2021 Datasets
Generating the Images
More Exploration
Example 2: Deforestation and Carbon Emissions in the Amazon Rain Forest Using WTSS Series
Setup
Creating Your Map
Analysis
Refinements
Example 3: Modeling and Forecasting Deforestation in Guadeloupe with Forest at Risk
Setup
Plotting the Data
Sampling the Data
Correlation Plots
Modeling the Probability of Deforestation with the iCAR Model
The MCMC Distance Matrix
Modeling Deforestation Probability with predict_raster_binomial_iCAR
Carbon Emissions
Analysis
Summary
Appendix. Additional Resources
Python Libraries for Geospatial Analysis
Resources for Further Exploration
Bibliography
Index
About the Author
Colophon