Install any skill in seconds. Free to start, no credit card required.
Get Started Free →brycewang-stanford/d3-visualization-guide
Guide to D3.js for building custom interactive data visualizations
Passed 20 of 23 test cases with the skill, and 18 of 23 without it.
2 fixed18 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
I am upgrading visual components to modern D3 standards. When binding an array of measurements to SVG circle elements in a container, should I chain enter and append methods or use join? Please provide a JavaScript code snippet showing how to bind a dataset to SVG circles.
| Checked | Without skill | With skill |
|---|---|---|
| Selection binding uses the join method | Passed | Passed |
| Circle x-coordinates are mapped via a D3 scale | Missed | Passed |
The instructions your model reads when the skill loads.
D3.js (Data-Driven Documents) is the most powerful and flexible JavaScript library for producing dynamic, interactive data visualizations in web browsers. With over 112K stars on GitHub, D3 has become the de facto standard for custom data visualization on the web. It uses HTML, SVG, and CSS to bring data to life, giving researchers full control over the final visual output.
Unlike higher-level charting libraries, D3 operates at the level of individual SVG elements and data bindings, which means researchers can create entirely bespoke visualizations tailored to their specific datasets and publication requirements. This makes it particularly valuable for academic work where standard chart types may not adequately represent complex research findings.
D3 provides a comprehensive ecosystem of modules covering everything from scales and axes to geographic projections, force-directed layouts, and hierarchical data structures. The library follows a functional, composable design that allows researchers to combine modules as needed for their specific visualization tasks.
D3 revolves around the concept of binding data to DOM elements and applying data-driven transformations. The key patterns every researcher should understand are selections, data joins, scales, and axes.
// Load research data from CSV
const data = await d3.csv("experiment_results.csv", d => ({
condition: d.condition,
measurement: +d.measurement,
error: +d.standard_error
}));
// Create an SVG container
const svg = d3.select("#chart")
.append("svg")
.attr("width", 800)
.attr("height", 500);
// Binddata to elements using the enter-update-exit pattern
svg.selectAll("circle")
.data(data)
.join("circle")
.attr("cx", d => xScale(d.condition))
.attr("cy", d => yScale(d.measurement))
.attr("r", 5)
.attr("fill", "#3B82F6");
test cases passed, vs 18 / 23 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.