liveBook · Manning

Visualization

As explained in D3.js in Action, Third Edition

Data visualization is the representation of data through graphical or visual forms to communicate patterns, relationships, or values.

Data visualization turns data into graphical forms that help people see patterns, relationships, and values. A useful chart does more than look striking: it gives its audience a story they can understand. When in doubt, choose a simpler form and ask people what they take from it. section 1.3

Choose a tool to fit the job. Point-and-click tools and chart libraries can be quicker for familiar charts or early exploration. D3.js is worth the extra implementation time when a web visualization needs custom shapes, rich interaction, or a layout tailored to its data and audience. section 1.1.2 section 1.1.1

A practical workflow is:

  • Gather data, then clean and explore it. Note which attributes are quantitative and which are qualitative; that choice helps determine how to show them. section 14.7
  • Sketch the layout and break the idea into visual elements. Build the page structure before rendering those elements. section 14.0
  • Load and measure the data. Bind records to graphical elements, then use scales when values need translating into positions, sizes, or colors. section 3.0
  • Add interactions that answer questions people are likely to ask. Explain the chart’s purpose and how to read its marks, axes, and controls. section 14.7 section 10.2.1

From records to a bar chart

Suppose each record supplies a category and a number. Bind the records to SVG rectangles, use a band scale to place the categories, and use a linear scale to size the bars. Add labels so readers can interpret the result. The same data-to-elements approach can support a layout that is not a conventional chart. section 3.0 section 1.1.2

Web visualizations combine D3 with JavaScript and the page’s DOM, usually drawing with SVG or Canvas and styling with CSS. Check the result at different screen sizes: responsive graphics can shrink axis text until it is difficult to read. Clear introductions, legends, and readable labels are part of the visualization, not finishing touches. section 1.2 section 10.2.1

How D3.js in Action, Third Edition covers it

How deep it goes
Develops a project workflow from gathering data through interactions and explains binding and scales; defers detailed data cleaning.
Examples
Builds a scaled bar chart and sketches a custom radial visualization of Vincent van Gogh’s work.
What it assumes
Introduces foundational SVG shapes while identifying JavaScript method chaining and arrays of objects as useful preparation for D3.
What you can do after
Build it from scratch by exploring data, sketching a layout, rendering visual elements, and planning meaningful interactions.
How it connects
Connects data binding and scales with SVG graphics, interaction, responsive design, and accessibility.

Also explained in

Compare how 16 books explain visualization →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of D3.js in Action, Third Edition. The section links point to the parts of the book it draws on.