Choropleth map


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.

Choropleth map with Geopandas and GeoPlot

Geoplot is a python library for geospatial data visualization. It works pretty well with geopandas, another library made to deal with geospatial data objects.

Geoplot has a choropleth() function that allows to build a choropleth map easily as shown in the example below.

Choropleth map of US counties with Python, Geopandas and Geoplot

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

Seaborn is another great alternative to build an area chart with python. The below examples show how to start basic, apply usual customization, and use the small multiple technique for when you have several groups to compare.

Contact

👋 This document is a work by Yan Holtz. Any feedback is highly encouraged. You can fill an issue on Github, drop me a message onTwitter, or send an email pasting yan.holtz.data with gmail.com.

Violin

Density

Histogram

Boxplot

Ridgeline

Scatterplot

Heatmap

Correlogram

Bubble

Connected Scatter

2D Density

Barplot

Spider / Radar

Wordcloud

Parallel

Lollipop

Circular Barplot

Treemap

Venn Diagram

Donut

Pie Chart

Dendrogram

Circular Packing

Line chart

Area chart

Stacked Area

Streamgraph

Map

Choropleth

Hexbin

Cartogram

Connection

Bubble

Chord Diagram

Network

Sankey

Arc Diagram

Edge Bundling

Colors

Interactivity

Animation with python

Animation

Cheat sheets

Caveats

3D