[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KKXT2E9F0GH45GPR3TQPM1":3,"skill-same:01M6KKXT2E9F0GH45GPR3TQPM1":59},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":42,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M6KKXT2E9F0GH45GPR3TQPM1","d3-force-bubble-chart",null,"How to create a force-directed bubble chart in D3.js (v6+). Use this skill whenever the user asks to build a bubble chart, cluster bubbles by category, or use d3.forceSimulation to position SVG circles without overlap.","cxcscmu\u002FSkillLearnBench","cxcscmu","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142838272?v=4","01M6KCQDFQWPDSN0MKZY96MSQP","01M6KCQDM7G70TKJ28NTSQC0RZ",93,"MIT","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fb4-skill-creator-gemini-3.1-pro-preview\u002Fstock-data-visualization\u002Fd3-force-bubble-chart\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31],"chart","d3","d3 force bubble chart","d3 force bubble","create","how","js","user","use","build","SVG","how to","position","cluster","2026-11-10 10:12:30",false,"---\nname: d3-force-bubble-chart\ndescription: How to create a force-directed bubble chart in D3.js (v6+). Use this skill whenever the user asks to build a bubble chart, cluster bubbles by category, or use d3.forceSimulation to position SVG circles without overlap.\n---\n\n# d3-force-bubble-chart\n\nThis skill explains how to build a bubble chart using D3.js force simulations (`d3.forceSimulation`), size bubbles by data, color them by category, group them into clusters, and prevent overlap.\n\n## Setting Up the Simulation\n\nTo arrange bubbles by a categorical group (like \"sector\" or \"industry\") while avoiding overlap, use a composite of forces:\n1. `d3.forceX(d => ...)`: Pulls nodes toward a specific horizontal position.\n2. `d3.forceY(d => ...)`: Pulls nodes toward a specific vertical position.\n3. `d3.forceCollide(d => ...)`: Prevents nodes from overlapping based on their radius.\n\n### Example\n\n```javascript\n\u002F\u002F 1. Create scales\nconst sizeScale = d3.scaleSqrt()\n  .domain([d3.min(data, d => d.value), d3.max(data, d => d.value)])\n  .range([minRadius, maxRadius]); \u002F\u002F e.g., [5, 40]\n\nconst colorScale = d3.scaleOrdinal(d3.schemeCategory10)\n  .domain(categories);\n\n\u002F\u002F 2. Define cluster centers\n\u002F\u002F e.g., mapping category -> {x, y} coordinate\nconst categoryCenters = {\n  \"Category A\": { x: 200, y: 300 },\n  \"Category B\": { x: 400, y: 300 },\n  \"Category C\": { x: 600, y: 300 }\n};\n\n\u002F\u002F 3. Initialize nodes\n\u002F\u002F If using existing data, add radius property to help collision\nconst nodes = data.map(d => ({\n  ...d,\n  radius: sizeScale(d.value) || defaultRadius \u002F\u002F Fallback for null values\n}));\n\n\u002F\u002F 4. Create the SVG circles\nconst bubbles = svg.append(\"g\")\n  .selectAll(\"circle\")\n  .data(nodes)\n  .join(\"circle\")\n  .attr(\"r\", d => d.radius)\n  .attr(\"fill\", d => colorScale(d.category));\n\n\u002F\u002F 5. Create labels (optional)\nconst labels = svg.append(\"g\")\n  .selectAll(\"text\")\n  .data(nodes)\n  .join(\"text\")\n  .text(d => d.name)\n  .attr(\"text-anchor\", \"middle\")\n  .attr(\"dominant-baseline\", \"central\");\n\n\u002F\u002F 6. Set up and run simulation\nconst simulation = d3.forceSimulation(nodes)\n  \u002F\u002F Cluster nodes horizontally\u002Fvertically based on category\n  .force(\"x\", d3.forceX(d => categoryCenters[d.category].x).strength(0.1))\n  .force(\"y\", d3.forceY(d => categoryCenters[d.category].y).strength(0.1))\n  \u002F\u002F Prevent overlap, adding padding\n  .force(\"collide\", d3.forceCollide(d => d.radius + 1).iterations(2))\n  \u002F\u002F Add a slight charge to push things apart, optional\n  .force(\"charge\", d3.forceManyBody().strength(-2));\n\n\u002F\u002F Update positions on each tick\nsimulation.on(\"tick\", () => {\n  bubbles\n    .attr(\"cx\", d => d.x)\n    .attr(\"cy\", d => d.y);\n    \n  labels\n    .attr(\"x\", d => d.x)\n    .attr(\"y\", d => d.y);\n});\n```\n\n## Tips for Force Bubble Charts\n\n- **Determinism:** If you need deterministic (reproducible) positions instead of animation, call `simulation.tick(300)` synchronously in a loop and stop the simulation, rather than relying on the animated `\"tick\"` event.\n- **Null values:** Handle missing numerical data carefully. If a value is missing, give it a default radius (e.g., ETFs without market cap should have a constant size).\n- **Tooltips:** Refer to the D3.js visualization skill for adding tooltips on hover.\n","# d3-force-bubble-chart\n\nThis skill explains how to build a bubble chart using D3.js force simulations (`d3.forceSimulation`), size bubbles by data, color them by category, group them into clusters, and prevent overlap.\n\n## Setting Up the Simulation\n\nTo arrange bubbles by a categorical group (like \"sector\" or \"industry\") while avoiding overlap, use a composite of forces:\n1. `d3.forceX(d => ...)`: Pulls nodes toward a specific horizontal position.\n2. `d3.forceY(d => ...)`: Pulls nodes toward a specific vertical position.\n3. `d3.forceCollide(d => ...)`: Prevents nodes from overlapping based on their radius.\n\n### Example\n\n```javascript\n\u002F\u002F 1. Create scales\nconst sizeScale = d3.scaleSqrt()\n  .domain([d3.min(data, d => d.value), d3.max(data, d => d.value)])\n  .range([minRadius, maxRadius]); \u002F\u002F e.g., [5, 40]\n\nconst colorScale = d3.scaleOrdinal(d3.schemeCategory10)\n  .domain(categories);\n\n\u002F\u002F 2. Define cluster centers\n\u002F\u002F e.g., mapping category -> {x, y} coordinate\nconst categoryCenters = {\n  \"Category A\": { x: 200, y: 300 },\n  \"Category B\": { x: 400, y: 300 },\n  \"Category C\": { x: 600, y: 300 }\n};\n\n\u002F\u002F 3. Initialize nodes\n\u002F\u002F If using existing data, add radius property to help collision\nconst nodes = data.map(d => ({\n  ...d,\n  radius: sizeScale(d.value) || defaultRadius \u002F\u002F Fallback for null values\n}));\n\n\u002F\u002F 4. Create the SVG circles\nconst bubbles = svg.append(\"g\")\n  .selectAll(\"circle\")\n  .data(nodes)\n  .join(\"circle\")\n  .attr(\"r\", d => d.radius)\n  .attr(\"fill\", d => colorScale(d.category));\n\n\u002F\u002F 5. Create labels (optional)\nconst labels = svg.append(\"g\")\n  .selectAll(\"text\")\n  .data(nodes)\n  .join(\"text\")\n  .text(d => d.name)\n  .attr(\"text-anchor\", \"middle\")\n  .attr(\"dominant-baseline\", \"central\");\n\n\u002F\u002F 6. Set up and run simulation\nconst simulation = d3.forceSimulation(nodes)\n  \u002F\u002F Cluster nodes horizontally\u002Fvertically based on category\n  .force(\"x\", d3.forceX(d => categoryCenters[d.category].x).strength(0.1))\n  .force(\"y\", d3.forceY(d => categoryCenters[d.category].y).strength(0.1))\n  \u002F\u002F Prevent overlap, adding padding\n  .force(\"collide\", d3.forceCollide(d => d.radius + 1).iterations(2))\n  \u002F\u002F Add a slight charge to push things apart, optional\n  .force(\"charge\", d3.forceManyBody().strength(-2));\n\n\u002F\u002F Update positions on each tick\nsimulation.on(\"tick\", () => {\n  bubbles\n    .attr(\"cx\", d => d.x)\n    .attr(\"cy\", d => d.y);\n    \n  labels\n    .attr(\"x\", d => d.x)\n    .attr(\"y\", d => d.y);\n});\n```\n\n## Tips for Force Bubble Charts\n\n- **Determinism:** If you need deterministic (reproducible) positions instead of animation, call `simulation.tick(300)` synchronously in a loop and stop the simulation, rather than relying on the animated `\"tick\"` event.\n- **Null values:** Handle missing numerical data carefully. If a value is missing, give it a default radius (e.g., ETFs without market cap should have a constant size).\n- **Tooltips:** Refer to the D3.js visualization skill for adding tooltips on hover.\n",{"name":5,"description":7},"main","726e1f79b96b0cb3d729d0e55a1c847e0b5353ae","skills\u002Fb4-skill-creator-gemini-3.1-pro-preview\u002Fstock-data-visualization\u002Fd3-force-bubble-chart",8,"https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench","https:\u002F\u002Fcxcscmu.github.io\u002FSkillLearnBench","https:\u002F\u002Fgithub.com\u002Fcxcscmu","2026-10-02 22:55:36",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add cxcscmu\u002FSkillLearnBench --skill d3-force-bubble-chart",{"tool":51,"command":52},"bunx","bunx skills add cxcscmu\u002FSkillLearnBench --skill d3-force-bubble-chart",{"tool":54,"command":55},"pnpm","pnpm dlx skills add cxcscmu\u002FSkillLearnBench --skill d3-force-bubble-chart","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fb4-skill-creator-gemini-3.1-pro-preview\u002Fstock-data-visualization\u002Fd3-force-bubble-chart\u002FSKILL.md",true,[],[60,73,94,112,132,143],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":32},"01M6KM5KH175P5ABP5JMX2SBDQ","object_counter","Count occurrences of an object in the image using computer vision algorithm.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Fvideo-object-counting\u002Fobject_counter\u002FSKILL.md",[],[67,68,69,70,71,72],"object counter","object","vision","computer","Computer Vision","image",{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":32},"01M6KM51TMVXG79MMPCS6Y8G86","travel-planning-workflow","Invoke this skill when performing travel planning. It defines a structured workflow for generating itineraries. Following this workflow is essential to ensure the final plan satisfies user requirements.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftravel-planning\u002Ftravel-planning-workflow\u002FSKILL.md",[],[80,81,82,83,84,85,86,87,88,89,25,90,91,92,93],"workflow","planning","planning workflow","travel","travel planning","travel planning workflow","structured","performing","plan","for","it","requirements","essential","itineraries",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":32},"01M6KM4DY820XHS9YTSK5QP5HD","bundled-dataset-search-tool","invoke this skill when you need to perform database search for travel planning. This skill provides some useful pre-packaged tools to look up accommodations, attractions, cities, driving distance, flights, and restaurants from the bundled dataset.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftravel-planning\u002Fbundled-dataset-search-tool\u002FSKILL.md",[],[101,102,103,104,105,106,107,83,108,109,84,110,89,111,81],"search","tool","dataset","bundled dataset search tool","restaurants","Tools","up","look","flights","you","database",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":32},"01M6KM465BB9PQ0B548HQSVAWZ","glm-output","Output-processing guidance for GLM tasks. Especially useful after glm-basics and glm-calibration when you need verifier-matching metrics from output.nc and a final \u002Froot\u002Fmetrics.json.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftemperature-simulation\u002Fglm-output\u002FSKILL.md",[],[119,120,121,89,122,123,124,125,126,127,128,129,110,130,131],"glm output","output","glm","tasks","metrics","json","basics","guidance","matching","verifier","processing","root","calibration",{"skillNo":133,"name":134,"nameZh":6,"description":135,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":32},"01M6KM40KY3QWDW5W97S39R2BC","glm-calibration","Calibration guidance for GLM tasks. Often most effective after glm-basics has clarified the setup; glm-output is the companion skill for exact final metric computation.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftemperature-simulation\u002Fglm-calibration\u002FSKILL.md",[],[139,131,121,120,126,125,122,140,141,89,142],"glm calibration","setup","companion","metric",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":32},"01M6KM3VHHVSGMGHJQB3PPT6YG","glm-basics","A good starting point for GLM calibration tasks. Use to inspect glm3.nml, confirm how GLM runs, and identify the relevant files before moving on to calibration and output evaluation.","https:\u002F\u002Fgithub.com\u002Fcxcscmu\u002FSkillLearnBench\u002Fblob\u002Fmain\u002Fskills\u002Fhuman_authored\u002Ftemperature-simulation\u002Fglm-basics\u002FSKILL.md",[],[150,121,125,151,139,131,89,120,152,153,154,26,23,155,122],"glm basics","inspect","relevant","files","good","Evaluation"]