技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
skill-060【数据与研究】Create interactive data exploration tools using D3.js (v6), enabling users to filter and drill down into datasets for deeper insight.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
This skill allows you to build interactive dashboards and data exploration tools using D3.js. The goal is to facilitate user interaction with complex datasets, allowing them to filter, sort, and drill down into the data dynamically.
Activate this skill when the user asks for any of the following:
If the user requires static visualizations or reports, don’t use this skill—opt for the D3.js Visualization Skill instead.
*.csv, *.tsv, *.jsonIf details are missing, make reasonable defaults and document them in comments near the top of the output file.
Prefer producing all of the following when feasible:
dist/dashboard.html — standalone HTML that renders the interactive exploration tooldist/dashboard.js — JavaScript file containing the interactivity logic (modular and reusable)dist/dashboard.css — if the task specifies custom styling for the dashboardAlways keep outputs in a predictable folder (default: dist/), unless the task specifies paths.
To ensure a smooth user experience:
d3.json, d3.csv) to avoid blocking the UI.<!DOCTYPE html>
<html>
<head>
<title>Interactive Data Dashboard</title>
<link rel="stylesheet" href="dist/dashboard.css">
<script src="https://d3js.org/d3.v6.min.js"></script>
<script src="dist/dashboard.js"></script>
</head>
<body>
<div id="dashboard">
<h1>Data Exploration Dashboard</h1>
<div id="filters"></div>
<svg id="visualization"></svg>
</div>
</body>
</html>
This example demonstrates the basic structure of an HTML file that uses the interactive data exploration tool. Adjust the #filters and #visualization elements based on your dataset and requirements.