Geospatial Analysis with GeoPandas
Numbers tell you what happened. Geospatial data tells you where it happened. And in the world of logistics and food delivery, 'where' is often more important than 'what'.
In this post, I explore a real-world dataset of 5,000 food delivery orders in Bhopal, using GeoPandas and Folium to uncover spatial trends that raw spreadsheets obscure.
Choropleth Mapping with Folium
Visualising order density across different localities reveals stark economic and demographic divides. A spatial join between the order coordinates and municipal boundary polygons allows us to aggregate demand efficiently.
import geopandas as gpd
import folium
# Load data
gdf = gpd.read_file('bhopal_orders.geojson')
# Create a base map
m = folium.Map(location=[23.2599, 77.4126], zoom_start=12)
# Add density mapping
folium.Choropleth(
geo_data=wards_geojson,
name='choropleth',
data=order_counts,
columns=['ward_id', 'order_volume'],
key_on='feature.properties.ward_id',
fill_color='YlOrRd'
).add_to(m)
Conclusions
The analysis revealed concentrated delivery hotspots around educational hubs and commercial zones, strongly correlated with the time of day. Spatial data science transforms abstract coordinates into actionable business intelligence.