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...