Circular Packing


A treemap displays hierarchical data as a set of nested rectangles. Each group is represented by a rectangle, which area is proportional to its value. In Python, the squarify library allows to compute the rectangle positions and plot it.

Matplotlib logoOne level of hierarchy

Circlify can work without a hierarchical structure, i.e. with just a set of numeric varialbles that will be each displayed as a bubble. Note that the package just compute the position and size of each bubble. Once tha"t's done, matplotlib is used to make the chart itself with usual functions.

Matplotlib logoSeveral levels of hierarchy

Circlify also works from a hierarchical structure. Bubbles representing the bottom of the hierarchy are encapsulated into higher hierarchy bubbles and so on. Note that the process is a bit more tedious here, but still doable thanks to matplotlib.

Circular packing with several levels of hierarchy with Python and the circlize library

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

Timeseries with python

Timeseries

Map

Choropleth

Hexbin

Cartogram

Connection

Bubble

Chord Diagram

Network

Sankey

Arc Diagram

Edge Bundling

Colors

Interactivity

Animation with python

Animation

Cheat sheets

Caveats

3D