Skip to content

Instantly share code, notes, and snippets.

@joaofig
Created August 19, 2018 14:51
Show Gist options
  • Select an option

  • Save joaofig/c7b13f93f1a5a6358a5fe440a3dc7632 to your computer and use it in GitHub Desktop.

Select an option

Save joaofig/c7b13f93f1a5a6358a5fe440a3dc7632 to your computer and use it in GitHub Desktop.
Create GeoDataFrame
# Create the GeoDataFrame from the cluster numbers and blobs
data = { 'cluster': clusters, 'polygon': blobs, 'count': counts }
cluster_gdf = gpd.GeoDataFrame(pd.DataFrame(data), geometry='polygon')
cluster_gdf.crs = {'init': 'epsg:4326'}
ax = cluster_gdf.geometry.plot(linewidth=2.0, color='red', edgecolor='red')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment