Data analysis report development skill. Use when users need to develop data analysis reports, create analysis report projects, build static HTML analysis documents, or produce one-time analysis reports with visualization.
Provides data analysis report development capabilities, including creating analysis report projects, generating static HTML analysis reports, integrating visualization charts, and complete development workflows.
This document provides quick guidance and core tool descriptions. For details, refer to the following reference documents:
Python analysis scripts are executed via Shell tool (e.g., ).
<!--zh **重要提示**:在执行以下步骤前,建议先阅读对应的 reference 文档以了解详细规范: - 开始报告开发前 → 阅读 `reference/report-workflow.md` 了解完整开发流程和代码示例 - 配置图表时 → 阅读 `reference/report-echarts-v5.md` 了解 ECharts 5.6.0 使用规范 --> <!--zh **开发报告项目:创建报告工作目录并执行分析:** --> <!--zh **开发 HTML 报告:** --> <!--zh 1. **创建报告工作目录**:任务开始时**必须**创建专属目录,目录名必须体现分析内容(如"销售数据分析"),所有报告相关文件(analyze.py、data.json、index.html、README.md)均置于该目录内 2. **执行数据分析**:通过 Python 脚本获取准确的分析结果并输出 data.json 文件 3. **开发 HTML 报告**:创建 index.html 文件,包含 ECharts 可视化,数据通过内联 script 标签嵌入 4. **文档化**:编写 README.md 说明文档 5. **完成交付**:提供报告总结 --> <!--zh **目录命名**:必须体现分析内容和业务领域,根据用户偏好语言智能确定,例如: - 用户偏好语言为中文:"销售数据分析"、"2024年财务报告"、"用户行为分析" - 用户偏好语言为英文:"Sales Data Analysis"、"2024 Financial Report"、"User Behavior Analysis" **文件命名**:在目录内使用标准名称,例如: - HTML 报告:`index.html`(主报告文件) - 数据文件:`data.json`(分析结果数据) - 分析脚本:`analyze.py`(数据分析脚本) - 说明文档:`README.md`(项目说明) **完整示例**: - 中文项目:`销售数据分析/index.html`、`销售数据分析/data.json` - 英文项目:`Sales Data Analysis/index.html`、`Sales Data Analysis/data.json` --> <!--zh ### 静态化原则 - 单 HTML 文件,所有数据内联,零异步加载 - 数据通过 `<script data-type="report">` 标签嵌入:`var reportData = {...};` ### 技术约束 - 仅使用 ECharts 5.6.0 规范 - Python 脚本仅用于数据分析获取准确结果,不用于生成图片 - 图表必须用 ECharts,严禁 Python 生成图片 --> <!--zh 需要生成分析报告? ├─ 是 → 报告类型? │ ├─ 静态 HTML 单页报告 → 本技能 │ └─ 可交互 Dashboard → analyzing-data-dashboard 技能 └─ 否 → 仅需即时数值回答 → data-qa 技能 图表类型选择? ├─ 折线/柱状/饼图等 → ECharts 5.6.0 ├─ 纯表格 → HTML table └─ 混合展示 → ECharts + table --> <!--zh CDN 资源: --> <!--zh 详细用法请查阅 reference 目录: - `report-workflow.md` - 完整开发流程和代码示例 - `report-echarts-v5.md` - ECharts 5.6.0 使用规范 -->python analyze.pyImportant: Before executing the following steps, it's recommended to read the corresponding reference documents to understand detailed specifications:
reference/report-workflow.md for complete workflow and code examplesreference/report-echarts-v5.md for ECharts 5.6.0 usage specificationDevelop report project: Create report working directory and execute analysis:
# Step 1: 创建报告目录(目录名体现分析内容)/ Create report directory (name reflects analysis content)
import os
os.makedirs('销售数据分析', exist_ok=True) # or 'Sales Data Analysis' for English
# Step 2: 编写分析脚本 / Write analysis script
# 脚本读取数据源,执行分析,输出 data.json
Develop HTML report:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/5.6.0/echarts.min.js"></script>
</head>
<body>
<div id="chart" style="width:800px;height:400px;"></div>
<script data-type="report">
var reportData = {"total": 12345, "chart": [...]};
</script>
<script>
var chart = echarts.init(document.getElementById('chart'));
chart.setOption({...});
</script>
</body>
</html>
Directory Naming: Must reflect analysis content and business domain, intelligently determined by user preferred language, e.g.:
File Naming: Use standard names within directory, e.g.:
index.html (main report file)data.json (analysis result data)analyze.py (data analysis script)README.md (project documentation)Complete Examples:
销售数据分析/index.html, 销售数据分析/data.jsonSales Data Analysis/index.html, Sales Data Analysis/data.json<script data-type="report"> tag: var reportData = {...};Need analysis report? ├─ Yes → Report type? │ ├─ Static HTML single-page report → This skill │ └─ Interactive Dashboard → analyzing-data-dashboard skill └─ No → Only instant numeric answer → data-qa skill
Chart type? ├─ Line/Bar/Pie etc → ECharts 5.6.0 ├─ Table only → HTML table └─ Mixed → ECharts + table
CDN Resources:
For detailed usage, refer to the reference directory:
report-workflow.md - Complete workflow and code examplesreport-echarts-v5.md - ECharts 5.6.0 usage specification