Choropleth plot with geopandas?

Hello,

I would like to do a choropleth plot such as these ones : https://plot.ly/python/choropleth-maps/

I download a shape file from government data web sites (for france) and read it using geopandas. This module provides a data frame with a geometry column which contains polygons of several community levels. I wonder if there is a way to use this in plotly ?

Thanks

Germain

Hey Germain –
Great question. There isn’t a way to do this with the Choropleth or geoscatter chart types yet. However, you can add custom shape files to the scattermapbox chart type under layout.mapbox.layers. here is an example: https://plot.ly/python/county-level-choropleth/

Here’s a short Jupyter notebook tutorial for creating US county-level choropleth maps in Python with D3.js:

A few examples of the output can be found here (take a few seconds to load):

http://county-choropleth.getforge.io/
http://county-choropleth-2.getforge.io/
http://us-counties-contour-map.getforge.io

1 Like

Cleaned things up a bit so that the maps load faster and the rough edges on weather map are trimmed:

https://plot.ly/~jackp/18292.embed

1 Like

Hi ! any solution for maps in Europe ?