Skip to main content
100%

Simple Books Document

✓ Published0🌍 Public
CCliffordAnderson
Last edited Oct 30, 2015
Created on Oct 30, 2015

This example visualizes a small set of books from an XML data source, grouping them by their `class` attribute (fiction or nonfiction). It first shows the hierarchical document structure as a simple indented list, then renders each book as a colored node in a force-directed graph. The visualization uses D3.js’s `d3.hierarchy` and `d3.tree` to lay out the XML tree, while `d3.forceSimulation` positions the book nodes, with the `class` value driving node color and tooltip text. The raw XML is loaded via `d3.xml`, and the document’s structure is directly mirrored in the layout, making the data’s grouping and classification immediately visible.

AI-generated description

Similar vizzes