Add geom_map geometry for plotting geographic maps
See original GitHub issueggplot2 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)
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
plotnine.geoms.geom_map
Create map by placing the features in layers in an order that limits obstraction. The GeoDataFrame.geometry.centroid property has the center coordinates of ...
Read more >Geospatial Map Visualizations in R - YouTube
If you are explaining data related to geography or just want to visualize by latitude / longitude location, you need to know #ggplot2...
Read more >6 Maps - ggplot2: Elegant Graphics for Data Analysis
6 Maps. Plotting geospatial data is a common visualisation task, and one that requires specialised tools. Typically the problem can be decomposed into...
Read more >Polygons from a reference map — geom_map • ggplot2
aes = TRUE (the default), it is combined with the default mapping at the top level of the plot. You must supply mapping...
Read more >Drawing beautiful maps programmatically with R, sf and ggplot2
To continue adding to the map, state data is directly plotted as an additional sf layer using geom_sf . In addition, state names...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
.@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.