Session Ready
Exercise

Visualizing connection patterns

We use a raster plot to visualize the ties between nodes in a network. The idea is to draw a point in the plot at position (x, y) if there is a tie that connects the nodes x and y. We use different colors for the points to distinguish the connection weights.

The resulting visualization is useful to detect similar connection patterns. If two rows (or columns) of the plot are similar, then the two corresponding nodes have similar tie patterns to other nodes in the network.

The ties data frame is already loaded in the workspace.

Instructions 1/3
undefined XP
  • 1
  • 2
  • 3

Mutate the ties data frame by swapping the variables from and to (use a temporary variable temp) and assign the result to ties_swapped.