agentsclimarketplace

D3 csv loading

Skill cxcscmu/SkillLearnBench/skills/b1-one-shot-claude-opus-4-6/stock-data-visualization/d3-csv-loading

Load and parse CSV data with D3.js v6 using d3.csv() and d3.autoType for local file serving.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill d3-csv-loading

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

0.9 KB, 203 tokens by cl100k_base, as published. Nobody here has run it

Loading CSV Data with D3.js v6

d3.csv()

const data = await d3.csv("data/stock-descriptions.csv", d3.autoType);
  • d3.autoType auto-converts numeric strings to numbers.
  • For local files, must be served via HTTP (use python3 -m http.server).

Handling CSV with Quoted Fields

D3's CSV parser handles RFC 4180 (quoted fields with commas inside). The stock-descriptions.csv has columns:

  • ,ticker,sector,full name,marketCap,fullTimeEmployees,longBusinessSummary,country,website,...
  • First column is an unnamed index column.

Key Pattern: Inline Data

When local file serving is not guaranteed, embed data as a JS variable:

const DATA = [...];  // pre-processed JSON array

This avoids CORS/fetch issues when opening HTML files directly with file://.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.