Created
May 31, 2020 08:18
-
-
Save ceteri/e7687a61a2f659bf152a8903c2f0d670 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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