Applied Geospatial Data Science with Python

Book description

Intelligently connect data points and gain a deeper understanding of environmental problems through hands-on Geospatial Data Science case studies written in Python The book includes colored images of important concepts

Key Features

  • Learn how to integrate spatial data and spatial thinking into traditional data science workflows
  • Develop a spatial perspective and learn to avoid common pitfalls along the way
  • Gain expertise through practical case studies applicable in a variety of industries with code samples that can be reproduced and expanded

Book Description

Data scientists, when presented with a myriad of data, can often lose sight of how to present geospatial analyses in a meaningful way so that it makes sense to everyone. Using Python to visualize data helps stakeholders in less technical roles to understand the problem and seek solutions. The goal of this book is to help data scientists and GIS professionals learn and implement geospatial data science workflows using Python.

Throughout this book, you’ll uncover numerous geospatial Python libraries with which you can develop end-to-end spatial data science workflows. You’ll learn how to read, process, and manipulate spatial data effectively. With data in hand, you’ll move on to crafting spatial data visualizations to better understand and tell the story of your data through static and dynamic mapping applications. As you progress through the book, you’ll find yourself developing geospatial AI and ML models focused on clustering, regression, and optimization. The use cases can be leveraged as building blocks for more advanced work in a variety of industries.

By the end of the book, you’ll be able to tackle random data, find meaningful correlations, and make geospatial data models.

What you will learn

  • Understand the fundamentals needed to work with geospatial data
  • Transition from tabular to geo-enabled data in your workflows
  • Develop an introductory portfolio of spatial data science work using Python
  • Gain hands-on skills with case studies relevant to different industries
  • Discover best practices focusing on geospatial data to bring a positive change in your environment
  • Explore solving use cases, such as traveling salesperson and vehicle routing problems

Who this book is for

This book is for you if you are a data scientist seeking to incorporate geospatial thinking into your workflows or a GIS professional seeking to incorporate data science methods into yours. You’ll need to have a foundational knowledge of Python for data analysis and/or data science.

Table of contents

  1. Applied Geospatial Data Science with Python
  2. Acknowledgments
  3. Contributors
  4. About the author
  5. About the reviewer
  6. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
    5. Download the color images
    6. Conventions used
    7. Get in touch
    8. Share Your Thoughts
    9. Download a free PDF copy of this book
  7. Part 1:The Essentials of Geospatial Data Science
  8. Chapter 1: Introducing Geographic Information Systems and Geospatial Data Science
    1. What is GIS?
    2. What is data science?
      1. Mathematics
      2. Computer science
      3. Industry and domain knowledge
      4. Soft skills
    3. What is geospatial data science?
    4. Summary
  9. Chapter 2: What Is Geospatial Data and Where Can I Find It?
    1. Static and dynamic geospatial data
    2. Geospatial file formats
      1. Vector data
      2. Raster data
    3. Introducing geospatial databases and storage
      1. PostgreSQL and PostGIS
      2. ArcGIS geodatabase
    4. Exploring open geospatial data assets
      1. Human geography
      2. Physical geography
      3. Country- and area-specific data
    5. Summary
  10. Chapter 3: Working with Geographic and Projected Coordinate Systems
    1. Technical requirements
    2. Exploring geographic coordinate systems
      1. Understanding GCS versions
    3. Understanding projected coordinate systems
      1. Common types of projected coordinate systems
    4. Working with GCS and PCS in Python
      1. PyProj
      2. GeoPandas
    5. Summary
  11. Chapter 4: Exploring Geospatial Data Science Packages
    1. Technical requirements
    2. Packages for working with geospatial data
      1. GeoPandas
      2. GDAL
      3. Shapely
      4. Fiona
      5. Rasterio
    3. Packages enabling spatial analysis and modeling
      1. PySAL
    4. Packages for producing production-quality spatial visualizations
      1. ipyLeaflet
      2. Folium
      3. geoplot
      4. GeoViews
      5. Datashader
    5. Reviewing foundational data science packages
      1. pandas
      2. scikit-learn
    6. Summary
  12. Part 2: Exploratory Spatial Data Analysis
  13. Chapter 5: Exploratory Data Visualization
    1. Technical requirements
    2. The fundamentals of ESDA
      1. Example – New York City Airbnb listings
    3. Conducting EDA
      1. ESDA
    4. Summary
  14. Chapter 6: Hypothesis Testing and Spatial Randomness
    1. Technical requirements
    2. Constructing a spatial hypothesis test
      1. Understanding spatial weights and spatial lags
      2. Global spatial autocorrelation
      3. Local spatial autocorrelation
    3. Point pattern analysis
      1. Ripley’s alphabet functions
    4. Summary
  15. Chapter 7: Spatial Feature Engineering
    1. Technical requirements
    2. Defining spatial feature engineering
      1. Performing a bit of geospatial magic
    3. Engineering summary spatial features
      1. Summary spatial features using one dataset
      2. Summary spatial features using two datasets
    4. Engineering proximity spatial features
      1. Proximity spatial features – NYC attractions
    5. Summary
  16. Part 3: Geospatial Modeling Case Studies
  17. Chapter 8: Spatial Clustering and Regionalization
    1. Technical requirements
    2. Collecting geodemographic data for modeling
      1. Extracting data using the Census API
      2. Cleaning the extracted data
      3. Conducting EDA and ESDA
    3. Developing geodemographic clusters
      1. K-means geodemographic clustering
      2. Agglomerative hierarchical geodemographic clustering
      3. Spatially constrained agglomerative hierarchical geodemographic clustering
    4. Measuring model performance
    5. Summary
  18. Chapter 9: Developing Spatial Regression Models
    1. Technical requirements
    2. A refresher on regression models
      1. Constructing an initial regression model
      2. Exploring unmodeled spatial relationships
    3. Teaching the model to think spatially
      1. Incorporating spatial fixed effects within the model
    4. Introduction to GWR models
      1. Fitting a GWR model to predict nightly Airbnb prices
      2. Introduction to Multiscale Geographically Weighted Regression
      3. Fitting an MGWR model to predict nightly Airbnb prices
    5. How do I choose between these models?
    6. Summary
  19. Chapter 10: Developing Solutions for Spatial Optimization Problems
    1. Technical requirements
    2. Exploring the Location Set Covering Problem (LSCP)
      1. Understanding the math behind the LSCP
      2. Solving LSCPs
    3. Exploring route-based combinatorial optimization problems
      1. Understanding the math behind the TSP
      2. Setting up the Google Maps API
      3. Solving the TSP
      4. Exploring a single-vehicle Vehicle Routing Problem (VRP)
      5. Exploring a Capacitated Vehicle Routing Problem (CVRP)
    4. Summary
  20. Chapter 11: Advanced Topics in Spatial Data Science
    1. Technical requirements
    2. Efficient operations with spatial indexing
      1. Implementing R-tree indexing in GeoPandas
      2. Introducing the H3 spatial index
    3. Estimating unknowns with spatial interpolation
      1. Applying Inverse Distance Weighted (IDW) interpolation
      2. Introduction to Kriging-based interpolation
    4. Ethical spatial data science
      1. Example 1 – Sharpiegate
      2. Example 2 – Human mobility: The New York Times investigative report
      3. Example 3 – COVID-19 contact tracing
      4. Example 4 – United States Census Bureau disclosure avoidance system
    5. Summary
  21. Index
    1. Why subscribe?
  22. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share Your Thoughts
    3. Download a free PDF copy of this book

Product information

  • Title: Applied Geospatial Data Science with Python
  • Author(s): David S. Jordan
  • Release date: February 2023
  • Publisher(s): Packt Publishing
  • ISBN: 9781803238128