Skip to content

Instantly share code, notes, and snippets.

@ceteri
Created May 31, 2020 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ceteri/e7687a61a2f659bf152a8903c2f0d670 to your computer and use it in GitHub Desktop.
Save ceteri/e7687a61a2f659bf152a8903c2f0d670 to your computer and use it in GitHub Desktop.
melbourne = gpd.read_file(gplt.datasets.get_path("melbourne"))
df = gpd.read_file(gplt.datasets.get_path("melbourne_schools"))
melbourne_primary_schools = df.query('School_Type == "Primary"')
ax = gplt.voronoi(
melbourne_primary_schools,
clip=melbourne,
linewidth=0.5,
edgecolor="white",
projection=gcrs.Mercator()
)
gplt.polyplot(
melbourne,
edgecolor="None",
facecolor="lightgray",
ax=ax
)
gplt.pointplot(
melbourne_primary_schools,
color="black",
ax=ax,
s=1,
extent=melbourne.total_bounds
)
plt.title("Primary Schools in Greater Melbourne, 2018")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment