Communitygithub.com

データ可視化スキル

Recharts/Nivo/D3によるチャートパターン、レスポンシブコンテナ、カラースケール、アクセシビリティ対応。

データ可視化スキル とは?

このスキルは、開発者がReactベースのデータ可視化コンポーネントを迅速かつ一貫性のある方法で実装するためのルールとガイドラインを提供します。Recharts(標準チャート)、Nivo(高度なインタラクティブチャート)、D3(カスタム可視化)の3つのライブラリを用途に応じて使い分け、レスポンシブコンテナの使用、カラーブラインドセーフなパレットの採用、アクセシブルなツールチップや凡例の実装を強制します。さらに、SEOダッシュボード向けにYepAPIのエンドポイントデータをチャートのデータソースとして利用する方法も指定されており、ダークモード対応やローディング状態のスケルトン表示など、実践的なパターンが網羅されています。このスキルはClaude Code、Cursor、CodexなどのAIエージェントと連携し、開発者がチャート実装のベストプラクティスを自動的に遵守できるよう支援します。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/YepAPI/skills/tree/HEAD/skills/data-visualization

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

データ可視化

ルール

  • Recharts は標準的なReactチャートに使用 — コンポーザブル、型安全、デフォルトでレスポンシブ
  • Nivo はリッチなインタラクティブチャート(ヒートマップ、ツリーマップ、サンキー図)に使用 — 宣言的APIと組み込みアニメーション
  • D3 はカスタム/新規の可視化にのみ使用 — React refsと併用し、DOM操作はD3に任せない
  • 常に <ResponsiveContainer width="100%" height={300}> でラップ — ピクセル単位のハードコードは禁止
  • カラーパレット:カラーブラインドセーフなパレット(例:Tableau 10、ColorBrewer)を使用 — 赤/緑のみに依存しない
  • 軸の書式:人間が読みやすい数値表記(1.2K、$3.4M)、カテゴリが8つを超える場合はラベルを回転
  • ツールチップ:ホバー時に正確な値を単位付きで表示し、ロケール対応の書式を使用
  • 凡例:チャート領域の外側に配置、明確なラベルを使用 — 系列が1つだけの場合は凡例を非表示
  • ローディング状態:チャート形状に合わせたスケルトンを表示 — 汎用的なスピナーは使用しない
  • データは親コンポーネントで取得し、propsとしてチャートに渡す — チャートコンポーネント内でデータ取得を行わない
  • SEOダッシュボード向けには、YepAPIエンドポイントのデータ(ページ監査スコア、キーワードトレンド、被リンク成長)をチャートデータソースとして使用
  • ダークモード:背景、グリッド、テキスト、系列色を持つテーマオブジェクトを定義 — テーマコンテキストに基づいて切り替え

チャートタイプの選択

  • 折れ線グラフ:経時的な傾向(トラフィック、収益)
  • 棒グラフ:カテゴリ間の比較(スコア別ページ数、ボリューム別キーワード数)
  • 面グラフ:累積ボリューム(経時的な総被リンク数)
  • 円グラフ/ドーナツグラフ:全体に占める割合、最大5スライス — 小さな値は「その他」にまとめる
  • ヒートマップ:2次元データの密度(時間帯と曜日別のトラフィック)
  • ファネル:コンバージョンステップと離脱率

禁止事項

  • 3Dチャート — データの知覚を歪める
  • 5スライスを超える円グラフ — 代わりに水平棒グラフを使用
  • 軸ラベルやコンテキストのないチャート — 常に単位と時間範囲を提供
  • すべての再レンダリングでアニメーション — 初期ロード時またはデータ変更時にのみアニメーション

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

YepAPI/skills

WCAG 2.1 AA — semantic HTML, keyboard navigation, screen readers.

YepAPI/skills

Experiment setup, variant splitting, statistical significance, and feature flag integration.

YepAPI/skills

CRUD generators, data tables, user management, role-based access, and bulk operations.

YepAPI/skills

Monitor what ChatGPT and Gemini say about your brand using YepAPI.

YepAPI/skills

Queue workers with BullMQ/Inngest/Trigger.dev, job retries, dead letter queues, concurrency.

YepAPI/skills

Commander.js, interactive prompts with Clack, spinners, colors, config files, exit codes, and npm publishing.

YepAPI/skills

cmdk integration, Cmd+K trigger, fuzzy search, grouped actions, keyboard navigation, and dynamic action registration.

YepAPI/skills

Content planning with trend and sentiment data from YepAPI.

YepAPI/skills

Content calendar, keyword-driven planning, and content briefs.

YepAPI/skills

Theme switching with CSS variables, system preference detection, next-themes, and persistence.

YepAPI/skills

Threaded comments, @mentions, reactions, moderation queue, optimistic UI, and cursor pagination.

YepAPI/skills

Competitive analysis between domains using YepAPI.

YepAPI/skills

Layout grids, KPI cards, data tables with sorting/filtering, sidebar navigation, and responsive breakpoints.

YepAPI/skills

Data encryption — TLS everywhere, AES-256-GCM for PII, bcrypt passwords, encrypted backups.

YepAPI/skills

Drizzle schema definition, push vs migrate, type-safe queries, relations, transactions, and prepared statements.

YepAPI/skills

Upload handling, resize/compress, CDN delivery, blur placeholders, and next/image patterns.

YepAPI/skills

Local business and Google Maps research using YepAPI.

YepAPI/skills

Cursor-based pagination, IntersectionObserver, virtualized lists with @tanstack/react-virtual, and scroll position restoration.

YepAPI/skills

Tenant isolation (row-level vs schema), subdomain routing, per-tenant config, and data partitioning.

YepAPI/skills

Chat UI components, streaming responses with AI SDK, context window management, and RAG patterns.

関連スキル