mirror of
https://github.com/wassname/geopandas.git
synced 2026-09-23 13:20:36 +08:00
4.1 KiB
4.1 KiB
In [ ]:
import geopandasIn [ ]:
df = geopandas.read_file(geopandas.datasets.get_path('nybb'))
ax = df.plot(figsize=(10, 10), alpha=0.5, edgecolor='k')In [ ]:
df = df.to_crs(epsg=3857)In [ ]:
import contextily as ctxIn [ ]:
ax = df.plot(figsize=(10, 10), alpha=0.5, edgecolor='k')
ctx.add_basemap(ax)In [ ]:
ax = df.plot(figsize=(10, 10), alpha=0.5, edgecolor='k')
ctx.add_basemap(ax, zoom=12)In [ ]:
ax = df.plot(figsize=(10, 10), alpha=0.5, edgecolor='k')
ctx.add_basemap(ax, url=ctx.providers.Stamen.TonerLite)
ax.set_axis_off()