Session Ready
Exercise

Visualize node centrality

A useful visualization technique is to make the most important nodes and edges more prominent in the network plot.

In Chapter 1, you saw how to make important edges more eye-catching by mapping the transparency to the weight. In this exercise, you will also make the node size proportional to its centrality (either degree or strength). That is, the central ("important") nodes in the network appear bigger.

The network g is already loaded in the workspace.

Instructions 1/2
undefined XP
  • 1
    • Plot the network.
      • Use the Kamada-Kawai layout.
      • Add an edge link geometry, mapping the transparency, alpha, to the edge weight.
      • Add a node point geometry, mapping the node size to degree.
    • 2

      Update the plot to set node size proportional to strength.