plotnine
plotnine copied to clipboard
Add geom_map geometry for plotting geographic maps
ggplot2 has geom_map for plotting geography. I can imagine a nice interface with geopandas, which has gpd.GeoDataFrame.plot() through matplotlib. Here's a demo from the docs:
ggplot(crimesm, aes(map_id = state)) +
geom_map(aes(fill = value), map = states_map) +
expand_limits(x = states_map$long, y = states_map$lat) +
facet_wrap( ~ variable)

I am working on a mapping geom (geom_carto), with geopandas and cartopy. Using cartopy as the backend though feature rich (real cartographic projections), is not straight-forward and there are changes I would want in cartopy.
I hoped to have it for the next minor release, though if I cannot tame cartopy in time, I may in the meanwhile create an alternative projection-less mapping geom just like geom_map.
plotnine is so great! thanks to @has2k1 ~
+1
Hi. New user here. Very excited about this project.
Is there any update on the geom_carto feature @has2k1 ? Also, is there any interest in also supporting gridded geodata (I'm thinking xarray: https://github.com/pydata/xarray)? I think this would be an awesome match!
@cwerner
geom_carto depends on cartopy acquiring a standard way to add artists, e.g. GeomCollection as suggested.
I have not looked into xarray, so my imagination on how to use it as a datasource it is blank.