Maps, GIS, Geospatial, Dataviz, Python.
function to split an admin polygon into a hexagon grid def split_admin_boundary_to_hexagons(admin_gdf, resolution): coords = list(admin_gdf.geometry.to_list()[0].exterior.coords) admin_geojson = {"type": "Polygon", "coordinates": [coords]} hexagons = h3.polyfill(admin_geojson, resolution,