数据可视化

SKILL研究检索

原名 data-visualization

研究检索 联网访问 许可证不明确 CodexClaudeCursorGemini CLI
安装这个技能

用于辅助数据整理、表格处理、CSV/Excel 分析、指标计算和图表准备。它适合让 Agent 清洗字段、汇总数据、发现异常、生成统计口径或把分析结果转成可读说明。使用时需要确认数据来源、字段含义和时间范围,避免把样本数据当全量事实;涉及敏感数据、导出文件或批量写回时,应先确认权限和脱敏边界。

累计安装 129,360 本周 5,464
GitHub 星标 11,724 仓库 knowledge-work-plugins
下载量 45,320 技能市场下载数
权限级别 联网访问 安装前请确认风险范围
许可证 许可证不明确 unknown

安装

GitHub 仓库
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
npx skills add https://github.com/anthropics/knowledge-work-plugins --skill data-visualization

技能档案

研究检索
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方anthropics仓库 knowledge-work-plugins · 版本 未标注
宿主客户端Codex、Claude、Cursor、Gemini CLI技能可被这些客户端加载
安装方式GitHub 仓库安装包 anthropics/knowledge-work-plugins
权限级别联网访问安装前请确认风险范围
许可证unknown许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验2026-05-01上游最后核验时间 · 数据更新 未标注
正文体量10.5 KBSKILL.md 原文大小,越大说明说明书写得越细

能做什么

4 项能力
上游给出的能力概览与适用场景
  • 按任务关键词查找相关 Skills
  • 展示可复制的安装命令
  • 保留来源站点、仓库和原始说明,方便继续核验
  • 展示第三方安全扫描或审计结果
用户想查找某类 Agent Skill 时需要根据任务场景推荐可安装能力包时需要对比不同来源的安装命令和来源信息时

权限与风险

联网访问
装之前先读完这段

安装与使用指南

安装步骤

本站只展示命令,不托管安装包,也不自动执行。

怎么用

安装后应在对应宿主中按原始 README 的触发条件使用;当前草稿只做目录说明,具体调用方式由规则抽取,异常条目再复核。

SKILL.md 全文

10.5 KB
模型实际读到的说明书原文,来自技能仓库

Data Visualization Skill

Chart selection guidance, Python visualization code patterns, design principles, and accessibility considerations for creating effective data visualizations.

Chart Selection Guide

Choose by Data Relationship

What You're Showing Best Chart Alternatives
Trend over time Line chart Area chart (if showing cumulative or composition)
Comparison across categories Vertical bar chart Horizontal bar (many categories), lollipop chart
Ranking Horizontal bar chart Dot plot, slope chart (comparing two periods)
Part-to-whole composition Stacked bar chart Treemap (hierarchical), waffle chart
Composition over time Stacked area chart 100% stacked bar (for proportion focus)
Distribution Histogram Box plot (comparing groups), violin plot, strip plot
Correlation (2 variables) Scatter plot Bubble chart (add 3rd variable as size)
Correlation (many variables) Heatmap (correlation matrix) Pair plot
Geographic patterns Choropleth map Bubble map, hex map
Flow / process Sankey diagram Funnel chart (sequential stages)
Relationship network Network graph Chord diagram
Performance vs. target Bullet chart Gauge (single KPI only)
Multiple KPIs at once Small multiples Dashboard with separate charts

When NOT to Use Certain Charts

  • Pie charts: Avoid unless <6 categories and exact proportions matter less than rough comparison. Humans are bad at comparing angles. Use bar charts instead.
  • 3D charts: Never. They distort perception and add no information.
  • Dual-axis charts: Use cautiously. They can mislead by implying correlation. Clearly label both axes if used.
  • Stacked bar (many categories): Hard to compare middle segments. Use small multiples or grouped bars instead.
  • Donut charts: Slightly better than pie charts but same fundamental issues. Use for single KPI display at most.

Python Visualization Code Patterns

Setup and Style

import matplotlib.pyplot as plt
import matplotlib.ticker as mticker
import seaborn as sns
import pandas as pd
import numpy as np

# Professional style setup
plt.style.use(&#x27;seaborn-v0_8-whitegrid&#x27;)
plt.rcParams.update({
    &#x27;figure.figsize&#x27;: (10, 6),
    &#x27;figure.dpi&#x27;: 150,
    &#x27;font.size&#x27;: 11,
    &#x27;axes.titlesize&#x27;: 14,
    &#x27;axes.titleweight&#x27;: &#x27;bold&#x27;,
    &#x27;axes.labelsize&#x27;: 11,
    &#x27;xtick.labelsize&#x27;: 10,
    &#x27;ytick.labelsize&#x27;: 10,
    &#x27;legend.fontsize&#x27;: 10,
    &#x27;figure.titlesize&#x27;: 16,
})

# Colorblind-friendly palettes
PALETTE_CATEGORICAL = [&#x27;#4C72B0&#x27;, &#x27;#DD8452&#x27;, &#x27;#55A868&#x27;, &#x27;#C44E52&#x27;, &#x27;#8172B3&#x27;, &#x27;#937860&#x27;]
PALETTE_SEQUENTIAL = &#x27;YlOrRd&#x27;
PALETTE_DIVERGING = &#x27;RdBu_r&#x27;

Line Chart (Time Series)

fig, ax = plt.subplots(figsize=(10, 6))

for label, group in df.groupby(&#x27;category&#x27;):
    ax.plot(group[&#x27;date&#x27;], group[&#x27;value&#x27;], label=label, linewidth=2)

ax.set_title(&#x27;Metric Trend by Category&#x27;, fontweight=&#x27;bold&#x27;)
ax.set_xlabel(&#x27;Date&#x27;)
ax.set_ylabel(&#x27;Value&#x27;)
ax.legend(loc=&#x27;upper left&#x27;, frameon=True)
ax.spines[&#x27;top&#x27;].set_visible(False)
ax.spines[&#x27;right&#x27;].set_visible(False)

# Format dates on x-axis
fig.autofmt_xdate()

plt.tight_layout()
plt.savefig(&#x27;trend_chart.png&#x27;, dpi=150, bbox_inches=&#x27;tight&#x27;)

Bar Chart (Comparison)

fig, ax = plt.subplots(figsize=(10, 6))

# Sort by value for easy reading
df_sorted = df.sort_values(&#x27;metric&#x27;, ascending=True)

bars = ax.barh(df_sorted[&#x27;category&#x27;], df_sorted[&#x27;metric&#x27;], color=PALETTE_CATEGORICAL[0])

# Add value labels
for bar in bars:
    width = bar.get_width()
    ax.text(width + 0.5, bar.get_y() + bar.get_height()/2,
            f&#x27;{width:,.0f}&#x27;, ha=&#x27;left&#x27;, va=&#x27;center&#x27;, fontsize=10)

ax.set_title(&#x27;Metric by Category (Ranked)&#x27;, fontweight=&#x27;bold&#x27;)
ax.set_xlabel(&#x27;Metric Value&#x27;)
ax.spines[&#x27;top&#x27;].set_visible(False)
ax.spines[&#x27;right&#x27;].set_visible(False)

plt.tight_layout()
plt.savefig(&#x27;bar_chart.png&#x27;, dpi=150, bbox_inches=&#x27;tight&#x27;)

Histogram (Distribution)

fig, ax = plt.subplots(figsize=(10, 6))

ax.hist(df[&#x27;value&#x27;], bins=30, color=PALETTE_CATEGORICAL[0], edgecolor=&#x27;white&#x27;, alpha=0.8)

# Add mean and median lines
mean_val = df[&#x27;value&#x27;].mean()
median_val = df[&#x27;value&#x27;].median()
ax.axvline(mean_val, color=&#x27;red&#x27;, linestyle=&#x27;--&#x27;, linewidth=1.5, label=f&#x27;Mean: {mean_val:,.1f}&#x27;)
ax.axvline(median_val, color=&#x27;green&#x27;, linestyle=&#x27;--&#x27;, linewidth=1.5, label=f&#x27;Median: {median_val:,.1f}&#x27;)

ax.set_title(&#x27;Distribution of Values&#x27;, fontweight=&#x27;bold&#x27;)
ax.set_xlabel(&#x27;Value&#x27;)
ax.set_ylabel(&#x27;Frequency&#x27;)
ax.legend()
ax.spines[&#x27;top&#x27;].set_visible(False)
ax.spines[&#x27;right&#x27;].set_visible(False)

plt.tight_layout()
plt.savefig(&#x27;histogram.png&#x27;, dpi=150, bbox_inches=&#x27;tight&#x27;)

Heatmap

fig, ax = plt.subplots(figsize=(10, 8))

# Pivot data for heatmap format
pivot = df.pivot_table(index=&#x27;row_dim&#x27;, columns=&#x27;col_dim&#x27;, values=&#x27;metric&#x27;, aggfunc=&#x27;sum&#x27;)

sns.heatmap(pivot, annot=True, fmt=&#x27;,.0f&#x27;, cmap=&#x27;YlOrRd&#x27;,
            linewidths=0.5, ax=ax, cbar_kws={&#x27;label&#x27;: &#x27;Metric Value&#x27;})

ax.set_title(&#x27;Metric by Row Dimension and Column Dimension&#x27;, fontweight=&#x27;bold&#x27;)
ax.set_xlabel(&#x27;Column Dimension&#x27;)
ax.set_ylabel(&#x27;Row Dimension&#x27;)

plt.tight_layout()
plt.savefig(&#x27;heatmap.png&#x27;, dpi=150, bbox_inches=&#x27;tight&#x27;)

Small Multiples

categories = df[&#x27;category&#x27;].unique()
n_cats = len(categories)
n_cols = min(3, n_cats)
n_rows = (n_cats + n_cols - 1) // n_cols

fig, axes = plt.subplots(n_rows, n_cols, figsize=(5*n_cols, 4*n_rows), sharex=True, sharey=True)
axes = axes.flatten() if n_cats &gt; 1 else [axes]

for i, cat in enumerate(categories):
    ax = axes[i]
    subset = df[df[&#x27;category&#x27;] == cat]
    ax.plot(subset[&#x27;date&#x27;], subset[&#x27;value&#x27;], color=PALETTE_CATEGORICAL[i % len(PALETTE_CATEGORICAL)])
    ax.set_title(cat, fontsize=12)
    ax.spines[&#x27;top&#x27;].set_visible(False)
    ax.spines[&#x27;right&#x27;].set_visible(False)

# Hide empty subplots
for j in range(i+1, len(axes)):
    axes[j].set_visible(False)

fig.suptitle(&#x27;Trends by Category&#x27;, fontsize=14, fontweight=&#x27;bold&#x27;, y=1.02)
plt.tight_layout()
plt.savefig(&#x27;small_multiples.png&#x27;, dpi=150, bbox_inches=&#x27;tight&#x27;)

Number Formatting Helpers

def format_number(val, format_type=&#x27;number&#x27;):
    &quot;&quot;&quot;Format numbers for chart labels.&quot;&quot;&quot;
    if format_type == &#x27;currency&#x27;:
        if abs(val) &gt;= 1e9:
            return f&#x27;${val/1e9:.1f}B&#x27;
        elif abs(val) &gt;= 1e6:
            return f&#x27;${val/1e6:.1f}M&#x27;
        elif abs(val) &gt;= 1e3:
            return f&#x27;${val/1e3:.1f}K&#x27;
        else:
            return f&#x27;${val:,.0f}&#x27;
    elif format_type == &#x27;percent&#x27;:
        return f&#x27;{val:.1f}%&#x27;
    elif format_type == &#x27;number&#x27;:
        if abs(val) &gt;= 1e9:
            return f&#x27;{val/1e9:.1f}B&#x27;
        elif abs(val) &gt;= 1e6:
            return f&#x27;{val/1e6:.1f}M&#x27;
        elif abs(val) &gt;= 1e3:
            return f&#x27;{val/1e3:.1f}K&#x27;
        else:
            return f&#x27;{val:,.0f}&#x27;
    return str(val)

# Usage with axis formatter
ax.yaxis.set_major_formatter(mticker.FuncFormatter(lambda x, p: format_number(x, &#x27;currency&#x27;)))

Interactive Charts with Plotly

import plotly.express as px
import plotly.graph_objects as go

# Simple interactive line chart
fig = px.line(df, x=&#x27;date&#x27;, y=&#x27;value&#x27;, color=&#x27;category&#x27;,
              title=&#x27;Interactive Metric Trend&#x27;,
              labels={&#x27;value&#x27;: &#x27;Metric Value&#x27;, &#x27;date&#x27;: &#x27;Date&#x27;})
fig.update_layout(hovermode=&#x27;x unified&#x27;)
fig.write_html(&#x27;interactive_chart.html&#x27;)
fig.show()

# Interactive scatter with hover data
fig = px.scatter(df, x=&#x27;metric_a&#x27;, y=&#x27;metric_b&#x27;, color=&#x27;category&#x27;,
                 size=&#x27;size_metric&#x27;, hover_data=[&#x27;name&#x27;, &#x27;detail_field&#x27;],
                 title=&#x27;Correlation Analysis&#x27;)
fig.show()

Design Principles

Color

  • Use color purposefully: Color should encode data, not decorate
  • Highlight the story: Use a bright accent color for the key insight; grey everything else
  • Sequential data: Use a single-hue gradient (light to dark) for ordered values
  • Diverging data: Use a two-hue gradient with neutral midpoint for data with a meaningful center
  • Categorical data: Use distinct hues, maximum 6-8 before it gets confusing
  • Avoid red/green only: 8% of men are red-green colorblind. Use blue/orange as primary pair

Typography

  • Title states the insight: "Revenue grew 23% YoY" beats "Revenue by Month"
  • Subtitle adds context: Date range, filters applied, data source
  • Axis labels are readable: Never rotated 90 degrees if avoidable. Shorten or wrap instead
  • Data labels add precision: Use on key points, not every single bar
  • Annotation highlights: Call out specific points with text annotations

Layout

  • Reduce chart junk: Remove gridlines, borders, backgrounds that don't carry information
  • Sort meaningfully: Categories sorted by value (not alphabetically) unless there's a natural order (months, stages)
  • Appropriate aspect ratio: Time series wider than tall (3:1 to 2:1); comparisons can be squarer
  • White space is good: Don't cram charts together. Give each visualization room to breathe

Accuracy

  • Bar charts start at zero: Always. A bar from 95 to 100 exaggerates a 5% difference
  • Line charts can have non-zero baselines: When the range of variation is meaningful
  • Consistent scales across panels: When comparing multiple charts, use the same axis range
  • Show uncertainty: Error bars, confidence intervals, or ranges when data is uncertain
  • Label your axes: Never make the reader guess what the numbers mean

Accessibility Considerations

Color Blindness

  • Never rely on color alone to distinguish data series
  • Add pattern fills, different line styles (solid, dashed, dotted), or direct labels
  • Test with a colorblind simulator (e.g., Coblis, Sim Daltonism)
  • Use the colorblind-friendly palette: sns.color_palette(&quot;colorblind&quot;)

Screen Readers

  • Include alt text describing the chart's key finding
  • Provide a data table alternative alongside the visualization
  • Use semantic titles and labels

General Accessibility

  • Sufficient contrast between data elements and background
  • Text size minimum 10pt for labels, 12pt for titles
  • Avoid conveying information only through spatial position (add labels)
  • Consider printing: does the chart work in black and white?

Accessibility Checklist

Before sharing a visualization:

  • Chart works without color (patterns, labels, or line styles differentiate series)
  • Text is readable at standard zoom level
  • Title describes the insight, not just the data
  • Axes are labeled with units
  • Legend is clear and positioned without obscuring data
  • Data source and date range are noted

安全信息

审计结论
未标注不代表已通过审计
安全审计Gen Agent Trust Hub、Socket、Snyk第三方安全审计平台给出的结论

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 2026-05-01。