# Choropleth plot with geopandas?

**URL:** <https://community.plotly.com/t/choropleth-plot-with-geopandas/2801>\
**Category:** 📊 Plotly Python\
**Created:** [November 30, 2016, 10:35pm UTC](https://community.plotly.com/t/choropleth-plot-with-geopandas/2801 "2016-11-30T22:35:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gvallverdu](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/gvallverdu/32/548_2.png) [@gvallverdu](https://community.plotly.com/u/gvallverdu)\
**Post date:** [November 30, 2016, 10:35pm UTC](https://community.plotly.com/t/choropleth-plot-with-geopandas/2801/1 "2016-11-30T22:35:17Z")

</div>

Hello,

I would like to do a choropleth plot such as these ones : [https://plot.ly/python/choropleth-maps/](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

---

<div class="post-metadata">

**Author:** ![chriddyp](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/chriddyp/32/16855_2.png) [@chriddyp](https://community.plotly.com/u/chriddyp)\
**Post date:** [December 1, 2016, 6:31pm UTC](https://community.plotly.com/t/choropleth-plot-with-geopandas/2801/2 "2016-12-01T18:31:50Z")

</div>

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/](https://plot.ly/python/county-level-choropleth/)

---

<div class="post-metadata">

**Author:** ![jack](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jack/32/11_2.png) [@jack](https://community.plotly.com/u/jack)\
**Post date:** [December 14, 2017, 12:23pm UTC](https://community.plotly.com/t/choropleth-plot-with-geopandas/2801/3 "2017-12-14T12:23:55Z")

</div>

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

> **[Plotting D3.js county choropleth maps in | jackp | Plotly](https://plot.ly/~jackp/18273.embed)**
>
> 'Plotting D3.js county choropleth maps in' is a Jupyter Notebook created by jackp on Plotly.

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

[http://county-choropleth.getforge.io/](http://county-choropleth.getforge.io/)  
[http://county-choropleth-2.getforge.io/](http://county-choropleth-2.getforge.io/)  
[http://us-counties-contour-map.getforge.io](http://us-counties-contour-map.getforge.io)

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/e/e4c3dfabcb704f1e5fcc81f03f361144a0b9c8eb.jpg)

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/0/08b66284a1a68914f0f6a97c2bf6025f3e096920.jpg)

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/c/cbbb56097c5169eee68e8393b0b62ac7f9f38882.jpg)

---

<div class="post-metadata">

**Author:** ![jack](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jack/32/11_2.png) [@jack](https://community.plotly.com/u/jack)\
**Post date:** [December 14, 2017, 11:15pm UTC](https://community.plotly.com/t/choropleth-plot-with-geopandas/2801/4 "2017-12-14T23:15:38Z")

</div>

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](https://plot.ly/~jackp/18292.embed)

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/7/7a71303896f4aa55232c5f39c75a9da48aa7ab3f.jpg)

 ![image](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/6/6f5b976929fc8bdf9bec474d13751e5c5a71c411.jpg)

---

<div class="post-metadata">

**Author:** ![kroms](https://avatars.discourse-cdn.com/v4/letter/k/eada6e/32.png) [@kroms](https://community.plotly.com/u/kroms)\
**Post date:** [February 9, 2023, 3:36pm UTC](https://community.plotly.com/t/choropleth-plot-with-geopandas/2801/5 "2023-02-09T15:36:01Z")

</div>

Hi ! any solution for maps in Europe ?
