Book Image

Applied Geospatial Data Science with Python

By : David S. Jordan
3 (1)
Book Image

Applied Geospatial Data Science with Python

3 (1)
By: David S. Jordan

Overview of this book

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.
Table of Contents (17 chapters)
1
Part 1:The Essentials of Geospatial Data Science
Free Chapter
2
Chapter 1: Introducing Geographic Information Systems and Geospatial Data Science
6
Part 2: Exploratory Spatial Data Analysis
10
Part 3: Geospatial Modeling Case Studies

Engineering summary spatial features

In Chapter 6, Hypothesis Testing and Spatial Randomness, we introduced you to a dataset of store locations. This dataset contains the store locations for Dollar General, a low-price retailer that operates across the United States. The store locations were queried using the OpenStreetMap API. To walk you through how this data was queried, a supplemental notebook called OSM POI Data Pulls is included in the GitHub repo. This data is available under the Open Data License, and you can find out more by visiting https://www.openstreetmap.org/copyright. For this section, we’ll continue to work with this data to begin our hands-on coding activity to create summary spatial features. Let’s first import the data:

# Reading in the data from the path
locs_pdf = pd.read_csv(data_path + 'OSM_DollarGeneralLocs.csv')
# Converting the pandas dataframe into a geopandas geodataframe
locs_gdf = gpd.GeoDataFrame(
    locs_pdf...