Homework8
This example presents a Sankey diagram visualizing the relationships between categorical attributes of cars, using the classic car evaluation dataset. The diagram shows how each attribute value (such as "buying=vhigh" or "safety=low") connects to other attribute values, with link thickness representing the conditional probability of one attribute value given another. The visualization uses the `d3.sankey` plugin to compute and render the node-link layout, while `d3.csvParse` processes the raw CSV data. Each node is colored using a `d3.scaleOrdinal` with the `schemeCategory20` palette, and rendering is done as an SVG element. The code manually constructs nodes and links, calculating link values through data filtering, and displays the resulting flow diagram with interactive hover tooltips.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.