Maps, GIS, Geospatial, Dataviz, Python.
compute the number of unique stops and stoppings in each hexagon gdf_stops = gpd.sjoin(gdf_stop_times, hexagons_gdf) nunique = gdf_stops.groupby(by = 'hex_id').nunique().to_dict()['stop_id'] total = gdf_stops.groupby(by = 'hex_id').count().to_dict()['stop_id'] hexagons_gdf['nunique'] =