Choropleth map

logo of a chart:Choropleth

A choropleth map displays divided geographical areas or regions that are coloured in relation to a numeric variable. This section explains how to build static choropleth with geopandas and geoplot, and interactive versions with tools like folium and plotly.

Folium for google maps style choropleth maps

Folium is a wrapper of the Leaflet.js javascript library. It brings the power of javascript for data visualization, but still allows to do some data wrangling with Python. Building a choropleth with Folium is quite straightforward thanks to thechoropleth() function.

Plotly for interactive choropleth maps

Plotly is a powerful library for interactive data visualization. It allows to build choropleth maps with thechoropleth() function.

Try to hover the map below to see the value of each country. You can also zoom in and out, and move the map around.

Matplotlib for static choropleth maps

Matplotlib allows to build static choropleth maps with the geopandas library. The below example shows how to build a choropleth map of European countries with geopandasand matplotlib.

Contact


👋 This document is a work by Yan Holtz. You can contribute on github, send me a feedback on twitter or subscribe to the newsletter to know when new examples are published! 🔥