Network chart
A Network diagram (or chart, or graph) show interconnections between a set of entities. Each entity is represented by a node (or vertices). Connection between nodes are represented through links (or edges). This section mainly focuses on NetworkX, probably the best library for this kind of chart with python.
Network diagram with the NetworkX library
NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks..
The examples below will guide you through a migration dataset already discussed in data-to-viz.com. It starts by describing the input dataset and the basic usage of the Chord() function.
Most basic network chart with Python and NetworkX
Custom network appearance: color, shape, size, links
Control the layout used for the node location
Manage directed and undirected networks by adding arrows
Control the background color of a network chart
Bundles network edges together to reduce the figure visual clutter
A common need when dealing with network charts is to map a numeric or categorical variable to the nodes or edges appearance. This is totally doable and adds some insight to the figure.
Network chart from similarity matrix
Another commin task is to build a network chart from a correlation matrix. Let's say you have several numeric variables describing some items in a dataset. You can compute a similarity matrix and display it as a network chart. This process is described in the post #327 below.
Network diagram with graph-tool
The graph tool library is a python library implemented in C++. It makes it highly efficient to draw networks containing many nodes. Graphics to come.
Official docRelated chart types
💡 Out of dataviz inspiration?
I have spent years collecting the most beautiful data visualizations out there. Get the list of my top 300 dataviz projects, hand-picked, for free.
I respect your privacy. Unsubscribe anytime.