← 返回 Skills 市场
pratyushchauhan

Data Chart Builder

作者 Pratyush Chauhan · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
52
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install data-chart-builder
功能描述
Create publication-ready charts from any data source (CSV, JSON, FRED API, or inline data). Supports line, bar, scatter, area-fill, indexed series, annotatio...
使用说明 (SKILL.md)

Data Chart Builder

Build publication-ready charts from CSV, JSON, FRED, or inline data.

Quick Start

python3 scripts/chart_builder.py --config chart.json

Workflow

1. Prepare data or identify source

Options:

  • CSV file: Local or URL
  • JSON: Inline in config or external file
  • FRED: Federal Reserve series ID
  • Inline: Direct data array in config

2. Write config JSON

{
  "title": "My Chart Title",
  "series": [
    {
      "csv": "/path/to/data.csv",
      "date_col": "date",
      "value_col": "price",
      "label": "Stock Price",
      "color": "#2E86AB",
      "index": true
    }
  ],
  "output": "/tmp/my_chart.png"
}

3. Generate

python3 scripts/chart_builder.py --config my_chart.json

Config Reference

Top-level fields

Field Type Description
title string Chart title
series array Data series to plot (required)
output string Output path (default: /tmp/chart.png)
figsize [w, h] Figure size in inches (default: [12, 7])
start_date / end_date string Filter range (YYYY-MM-DD)
index_all bool Index all series to 100
fill bool Shade between first two series
fill_color string Fill color (default: red)
fill_alpha float Fill opacity (default: 0.15)
hline number Draw horizontal reference line
grid bool Show grid (default: true)
ylim [min, max] Y-axis limits
annotations array Vertical event markers

Series fields

Field Type Description
label string Legend label (required)
csv string Path or URL to CSV
json string Path to JSON file
fred string FRED series ID
data array Inline data: [{"date": "...", "value": 100}, ...]
date_col string Date column name (default: date)
value_col string Value column name (default: value)
type string line, bar, scatter
color string Hex color
width number Line width
style string Line style: -, --, -., :
index bool Index this series to 100
base_date string Index base date (default: first observation)

Annotations

{
  "date": "2008-09-15",
  "label": "Lehman Bankruptcy",
  "position": "top",
  "y": 120,
  "fontsize": 9
}

Examples

Economic comparison (FRED)

{
  "title": "USA: GDP vs Wages (1959 = 100)",
  "series": [
    {"fred": "A939RX0Q048SBEA", "label": "GDP Per Capita", "color": "#2E86AB", "index": true},
    {"fred": "COMPRNFB", "label": "Compensation Per Hour", "color": "#F18F01", "index": true}
  ],
  "start_date": "1959-01-01",
  "end_date": "1985-12-31",
  "fill": true,
  "annotations": [
    {"date": "1971-08-15", "label": "Nixon Shock", "position": "top", "y": 140},
    {"date": "1973-10-01", "label": "Oil Crisis", "position": "bottom", "y": 90}
  ],
  "output": "gdp_wages.png"
}

Stock price vs volume

{
  "title": "AAPL Price vs Volume",
  "series": [
    {"csv": "aapl.csv", "label": "Price", "color": "#2E86AB", "type": "line"},
    {"csv": "aapl.csv", "label": "Volume", "color": "#F18F01", "type": "bar", "value_col": "volume"}
  ],
  "output": "aapl_chart.png"
}

Inline data

{
  "title": "Sales Q1-Q4",
  "series": [
    {
      "label": "Revenue",
      "data": [
        {"date": "2024-01-01", "value": 100},
        {"date": "2024-04-01", "value": 120},
        {"date": "2024-07-01", "value": 140},
        {"date": "2024-10-01", "value": 180}
      ],
      "color": "#2E86AB",
      "type": "bar"
    }
  ],
  "output": "sales.png"
}

Scatter plot

{
  "title": "Height vs Weight",
  "series": [
    {"csv": "patients.csv", "label": "Male", "color": "blue", "type": "scatter", "date_col": "height", "value_col": "weight"},
    {"csv": "patients.csv", "label": "Female", "color": "red", "type": "scatter", "date_col": "height", "value_col": "weight"}
  ]
}

Tips

  • Indexing: Use "index": true on each series or "index_all": true globally to compare growth rates on equal footing
  • Colors: Use contrasting hex codes. Good pairs: #2E86AB (blue) + #F18F01 (orange), or #C73E1D (red) + #3B1F2B (dark)
  • Annotations: Alternate position: "top" and "bottom" to avoid overlap
  • Date parsing: Ensure dates are ISO format (YYYY-MM-DD) for reliable parsing
  • FRED: Find series IDs at fred.stlouisfed.org

Data Source Flexibility

Source How to specify Best for
Local CSV "csv": "/path/to/file.csv" Custom datasets
URL CSV "csv": "https://example.com/data.csv" API endpoints
FRED "fred": "GDPC1" Economic time series
Inline "data": [...] Small static datasets
安全使用建议
Install only if you are comfortable with a charting helper that can read local data files, fetch CSV/FRED data from the network, and write image files to paths you configure. Treat configs from other people as untrusted, especially if they contain URLs or output paths.
能力评估
Purpose & Capability
The artifacts consistently describe and implement chart generation from CSV, inline data, and FRED series, then save a chart image to a configured output path.
Instruction Scope
The runtime instructions are limited to preparing a config and running the chart builder script; there are no role changes, hidden agent instructions, or unrelated commands.
Install Mechanism
No install hook, dependency installer, package manifest, or startup mechanism is present; the skill contains a markdown instruction file and one Python script.
Credentials
The script can fetch remote CSV URLs and FRED data using pandas, which is proportionate for a data visualization skill and is documented, but users should avoid untrusted URLs.
Persistence & Privilege
No persistence, privilege escalation, credential access, background worker, broad indexing, or destructive behavior was found; file writes are limited to the configured chart output.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install data-chart-builder
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /data-chart-builder 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
General-purpose chart builder supporting CSV, JSON, FRED, and inline data. Features: line/bar/scatter plots, series indexing, gap fill, annotations, multi-series overlays.
元数据
Slug data-chart-builder
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Data Chart Builder 是什么?

Create publication-ready charts from any data source (CSV, JSON, FRED API, or inline data). Supports line, bar, scatter, area-fill, indexed series, annotatio... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 52 次。

如何安装 Data Chart Builder?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install data-chart-builder」即可一键安装,无需额外配置。

Data Chart Builder 是免费的吗?

是的,Data Chart Builder 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Data Chart Builder 支持哪些平台?

Data Chart Builder 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Data Chart Builder?

由 Pratyush Chauhan(@pratyushchauhan)开发并维护,当前版本 v1.0.0。

💬 留言讨论