d3js-visualization
Skill1 starsChanged 5 months agoMITView on GitHub
Creates data visualizations with D3.js including custom charts, network diagrams, geographic maps, and publication-quality interactive graphics.
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 7
Create sophisticated, interactive data visualizations using D3.js.
- Very specific: line 201
Use canvas for 1000+ elements
- Very specific: line 203
Use .join() instead of enter/update/exit pattern
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
D3.js Data Visualization
Create sophisticated, interactive data visualizations using D3.js.
When to Use D3.js
- Custom visualizations requiring unique layouts
- Complex interactions (brushing, zooming, linking)
- Network diagrams and force-directed graphs
- Geographic visualizations
- Publication-quality graphics with precise control
Core Workflow
1. Import D3
// ES modules
import * as d3 from 'd3';
// CDN
<script src="https://d3js.org/d3.v7.min.js"></script>2. Basic Structure
// Set dimensions
const margin = { top: 20, right: 30, bottom: 40, left: 50 };
const width = 800 - margin.left - margin.right;
const height = 400 - margin.top - margin.bottom;
// Create SVG
const svg = d3.select('#chart')
.append('svg')
.attr('width', width + margin.left + margin.right)
.attr('height', height + margin.top + margin.bottom)
.append('g')
.attr('transform', `translate(${margin.left},${margin.top})`);
// Create scales
const xScale = d3.scaleLinear()
.domain([0, d3.max(data, d => d.x)])
.range([0, width]);
const yScale = d3.scaleLinear()
.domain([0, d3.max(data, d => d.y)])
.range([height, 0]);
// Add axes
svg.append('g')
.attr('transform', `translate(0,${height})`)
.call(d3.axisBottom(xScale));
svg.append('g')
.call(d3.axisLeft(yScale));Common Chart Patterns
Bar Chart
svg.selectAll('rect')
.data(data)
.join('rect')
.attr('x', d => xScale(d.category))
.attr('y', d => yScale(d.value))
.attr('width', xScale.bandwidth())
.attr('height', d => height - yScale(d.value))
.attr('fill', 'steelblue');Line Chart
const line = d3.line()
.x(d => xScale(d.date))
.y(d => yScale(d.value));
svg.append('path')
.datum(data)
.attr('fill', 'none')
.attr('stroke', 'steelblue')
.attr('stroke-width', 2)
.attr('d', line);Scatter Plot
svg.selectAll('circle')
.data(data)
.join('circle')
.attr('cx', d => xScale(d.x))
.attr('cy', d => yScale(d.y))
.attr('r', 5)
.attr('fill', d => colorScale(d.category));Force-Directed Network
const simulation = d3.forceSimulation(nodes)
.force('link', d3.forceLink(links).id(d => d.id))
.force('charge', d3.forceManyBody().strength(-100))
.force('center', d3.forceCenter(width / 2, height / 2));
const link = svg.selectAll('line')
.data(links)
.join('line')
.attr('stroke', '#999');
const node = svg.selectAll('circle')
.data(nodes)
.join('circle')
.attr('r', 10)
.attr('fill', d => colorScale(d.group));
simulation.on('tick', () => {
link
.attr('x1', d => d.source.x)
.attr('y1', d => d.source.y)
.attr('x2', d => d.target.x)
.attr('y2', d => d.target.y);
node
.attr('cx', d => d.x)
.attr('cy', d => d.y);
});Interactivity
Tooltips
const tooltip = d3.select('body')
.append('div')
.attr('class', 'tooltip')
.style('opacity', 0);
svg.selectAll('circle')
.on('mouseover', (event, d) => {
tooltip.transition().duration(200).style('opacity', .9);
tooltip.html(`Value: ${d.value}`)
.style('left', (event.pageX + 10) + 'px')
.style('top', (event.pageY - 28) + 'px');
})
.on('mouseout', () => {
tooltip.transition().duration(500).style('opacity', 0);
});Zoom & Pan
const zoom = d3.zoom()
.scaleExtent([0.5, 10])
.on('zoom', (event) => {
svg.attr('transform', event.transform);
});
d3.select('svg').call(zoom);Transitions
svg.selectAll('rect')
.data(newData)
.transition()
.duration(750)
.attr('y', d => yScale(d.value))
.attr('height', d => height - yScale(d.value));Responsive Sizing
function resize() {
const container = document.getElementById('chart');
const width = container.clientWidth;
svg.attr('width', width);
xScale.range([0, width - margin.left - margin.right]);
// Update elements
svg.selectAll('rect').attr('width', xScale.bandwidth());
}
window.addEventListener('resize', resize);Performance Tips
- Use
canvasfor 1000+ elements - Validate data before visualization
- Use
.join()instead of enter/update/exit pattern - Minimize DOM manipulation in animation loops
Accessibility
svg.attr('role', 'img')
.attr('aria-label', 'Chart showing sales over time');
svg.selectAll('rect')
.attr('role', 'listitem')
.attr('aria-label', d => `${d.category}: ${d.value}`);Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- Bbeierle12/Skill-MCP-Claude★ 912% same
Wrote their own version · 2
- AutumnsGrove/ClaudeSkills★ 30same name
- allanninal/claude-code-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository54 other files it gives its agents.
- AGENTS.mdAGENTS.md
- skills/deep-recon/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- adversarial-researchSkill
- algorithmic-artSkill
- api-integrationSkill
- breakdownSkill
- c4-architectSkill
- canvas-designSkill
- coding-agentsSkill
- compound-engineeringSkill
- context-budgetSkill
- counterfactualSkill
- critiqueSkill
- data-analyst-agentSkill
- database-migrationsSkill
- deep-reconSkill
- design-tasteSkill
- doc-coauthoringSkill
- e2b-sandboxSkill
- ecosystem-auditSkill
- excalidraw-diagramSkill
- executing-plansSkill
- frontend-designSkill
- fullstack-agentSkill
- grillSkill
- kickoffSkill
- mcp-builderSkill
- model-migrationSkill
- naming-the-machineSkill
- full-output-enforcementSkill
- package-researchSkill
- pdf-generationSkill
- pp2pSkill
- pp3pSkill
- prompt-engineerSkill
- prompt-groundingSkill
- redesignSkill
- requesting-code-reviewSkill
- reverse-engineer-to-learnSkill
- review-changesSkill
- scratchpadSkill
- shipSkill
- slack-gif-creatorSkill
- sprint-architectSkill
- techdebtSkill
- test-and-fixSkill
- threat-modelSkill
- verification-before-completionSkill
- visual-verdictSkill
- webapp-testingSkill
- web-asset-generatorSkill
- whatdidimissSkill
- writing-plansSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

