The curious incident of the dog in the night-time
✓ Published0🌍 Public
CCliffordAnderson
Last edited May 26, 2014
Created on May 26, 2014
This example shows the distribution of prices for a single book listing, encoded as a force-directed network of XML nodes. The visualization maps the document hierarchy onto a physics simulation, with parent-child relationships represented as links in a `d3.forceSimulation`. Each element and text node becomes a circle, with size and color encoding the price field’s presence and the node type. The code uses `d3.forceLink` for edges, `d3.forceCollide` for spacing, and renders with SVG `circle` and `line` elements. Data comes from an embedded `book-relaxng.xml` string, parsed via `DOMParser`, and the layout animates on each tick to reveal the structural nesting of the price attribute.
AI-generated description