plotnine icon indicating copy to clipboard operation
plotnine copied to clipboard

Add geom_map geometry for plotting geographic maps

Open adamboche opened this issue 8 years ago • 5 comments

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)

geom_map-8

adamboche avatar Jun 15 '17 01:06 adamboche

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.

has2k1 avatar Jun 15 '17 02:06 has2k1

plotnine is so great! thanks to @has2k1 ~

liuzongquan avatar Jan 09 '18 11:01 liuzongquan

+1

jmccreight avatar Feb 28 '18 00:02 jmccreight

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 avatar Jun 01 '18 18:06 cwerner

@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.

has2k1 avatar Jun 04 '18 08:06 has2k1