Visualization

d3 purposefully steers away from providing concrete visualizations. There is no single function you can call to get a bar chart or a scatter plot. Instead, it provides tools around creating the visualizations; these tools in turn provide a high degree of flexibility and empowers the creation of unique visualizations. One of the more powerful tools is the layout mechanism. Layouts provide some of the boilerplate code that would have to be written to achieve a certain sort of visualization.

We're going to make use of the Force-directed graph layout. Force-directed graphs provide a way of visualizing data that is interconnected. The strength of the bonds between nodes is frequently a function of how closely related the nodes are.

Get Data Visualization: Representing Information on Modern Web now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.