CommunityPesquisa e Análise de Dadosgithub.com

grahama1970/analytics

Análise flexível de ciência de dados para qualquer conjunto de dados. Descobre automaticamente o esquema, recomenda gráficos e exporta para create-figure. Funciona com JSONL, JSON e CSV de qualquer fonte.

O que é analytics?

Esta skill fornece um pipeline completo de análise de dados para agentes de IA, permitindo a descoberta automática de esquemas, recomendações de visualizações e exportação de gráficos de alta qualidade. Ela suporta os formatos JSONL, JSON e CSV, detectando automaticamente os tipos de colunas (temporal, numérico, categórico, booleano, texto) e sugerindo os melhores tipos de gráfico (barras, linhas, mapa de calor, histograma, etc.) com base nos padrões de dados. O fluxo de trabalho integra-se diretamente com a skill 'create-figure' para renderizar gráficos em PDF ou PNG de qualidade de publicação, usando comandos como `describe`, `chart`, `group-by` e `stats`. Para dados com timestamp, como saídas de ingestão, oferece comandos especializados como `insights`, `trends` e `sessions`. A skill é ideal para análise exploratória rápida de qualquer conjunto de dados, fornecendo recomendações automatizadas e exportação em lote, e pode ser integrada facilmente em workflows de agentes via Python ou CLI.

Funciona com~Claude Code~Codex CLI~Cursor✓Antigravity
npx skills add https://github.com/grahama1970/agent-skills/tree/main/skills/analytics

Installed? Explore more Pesquisa e Análise de Dados skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

Skill de Analytics

Análise flexível de ciência de dados que funciona com qualquer conjunto de dados. Descobre automaticamente o esquema, recomenda visualizações e exporta no formato create-figure.

Início Rápido (Qualquer Conjunto de Dados)

cd .pi/skills/analytics

# Passo 1: Descubra o que está nos dados
./run.sh describe data.jsonl

# Passo 2: Veja recomendações e gere um gráfico
./run.sh chart data.jsonl --name distribution_channel -o chart.json

# Passo 3: Renderize com create-figure
cd .agent/skills/create-figure
./run.sh metrics -i /path/to/chart.json --type bar -o chart.pdf

O Pipeline Integrado

Qualquer Dado (JSONL/JSON/CSV)
         │
         ▼
┌─────────────────────────────────┐
│     analytics describe          │  ← Descobre esquema, recomenda gráficos
│  "5 colunas categóricas, 2 numéricas,	│
│   1 coluna temporal detectada"	│
│  Recomendações:               │
│   - distribution_channel (barras)  │
│   - trend_by_date (linha)        │
│   - heatmap_hour_x_day          │
└─────────────────────────────────┘
         │
         ▼
┌─────────────────────────────────┐
│     analytics chart/group-by    │  ← Gera dados de gráfico no formato create-figure
│  --name distribution_channel    │
│  -o chart.json                  │
└─────────────────────────────────┘
         │
         ▼
┌─────────────────────────────────┐
│     create-figure metrics       │  ← Renderiza PDF/PNG de qualidade de publicação
│  -i chart.json --type bar       │
│  -o channel_distribution.pdf    │
└─────────────────────────────────┘

Comandos

Descoberta (Comece Aqui)

ComandoDescrição
describe <arquivo>Descobre esquema, detecta tipos de coluna, recomenda gráficos
./run.sh describe sales.jsonl
# Saída:
# Colunas: date (temporal), product (categórica), amount (numérica), region (categórica)
# Recomendações:
#   1. distribution_product - Distribuição de product
#   2. distribution_region - Distribuição de region
#   3. trend_by_date - Contagem ao longo de date
#   4. heatmap_product_x_region - product vs region

Análise Flexível

ComandoDescrição
group-by <arquivo>Agrupa por qualquer coluna com agregação
stats <arquivo>Estatísticas numéricas e correlações
chart <arquivo>Gera especificação de gráfico para create-figure
# Agrupar por qualquer coluna
./run.sh group-by data.jsonl --by channel --for-figure -o by_channel.json
./run.sh group-by data.jsonl --by category --agg price --func sum

# Estatísticas numéricas
./run.sh stats data.jsonl --columns revenue,cost,profit

# Gerar gráfico a partir de recomendação
./run.sh chart data.jsonl --name distribution_channel -o chart.json

Dados com Timestamp (saídas ingest-*)

ComandoDescrição
insights <arquivo>Resumo de análise completo (tendências, sessões, padrões)
trends <arquivo>Tendências de visualização com médias móveis
sessions <arquivo>Detecção de sessões e análise de maratona
time-patterns <arquivo>Distribuição por hora/dia
evolution <arquivo>Como as preferências mudam ao longo do tempo

Saída

ComandoDescrição
export <arquivo>Exporta em lote todos os gráficos padrão
report <arquivo>Relatório narrativo estilo Horus

Formatos Suportados

FormatoExtensãoDetecção Automática
JSONL.jsonlJSON delimitado por linha
JSON.jsonArray ou {data: [...]}
CSV.csvSeparado por vírgulas

Detecção de Tipo de Coluna

O comando describe detecta automaticamente:

TipoLógica de DetecçãoGráficos Recomendados
temporaldatetime64, strings com formato de datalinha, área, mapa de calor (eixo temporal)
numéricoint64, float64histograma, dispersão, estatísticas
categóricobaixa cardinalidade (≤20 únicos)barras, pizza, mapa de calor
booleanodtype boolpizza (verdadeiro/falso)
textostrings de alta cardinalidadenuvem de palavras, top-N

Recomendações de Gráfico

Com base nos tipos de coluna, o analytics recomenda:

Padrão de DadosTipo de GráficoComando create-figure
1 categóricabarras, pizzametrics --type bar
1 temporallinhatraining-curves
2 categóricasmapa de calorheatmap
temporal + categóricamapa de calorheatmap
2+ numéricasmatriz de correlaçãoheatmap
1 numéricahistogramametrics --type bar

Fluxo de Trabalho do Agente

Para um agente de projeto analisar qualquer conjunto de dados e visualizar:

# 1. Descobrir esquema
resultado = executar("./run.sh describe data.jsonl --json")
recomendacoes = resultado["recommendations"]

# 2. Pegar a primeira recomendação
nome_grafico = recomendacoes[0]["name"]
cmd = recomendacoes[0]["create_figure_cmd"]

# 3. Gerar dados do gráfico
executar(f"./run.sh chart data.jsonl --name {nome_grafico} -o chart.json")

# 4. Renderizar
executar(f"cd .agent/skills/create-figure && ./run.sh {cmd} -i chart.json -o chart.pdf")

Exemplos

Dados de Vendas de E-commerce

# Dados: orders.jsonl com date, product, category, amount, region

./run.sh describe orders.jsonl
# → Recomenda: distribution_category, distribution_region, trend_by_date

./run.sh group-by orders.jsonl --by category --agg amount --func sum --for-figure -o revenue_by_category.json
# → {"metrics": {"Eletrônicos": 45000, "Roupas": 32000, ...}}

cd .agent/skills/create-figure
./run.sh metrics -i revenue_by_category.json --type bar -o revenue.pdf

Histórico do YouTube (ingest-yt-history)

# Use comandos especializados para dados com timestamp
./run.sh insights ~/.pi/ingest-yt-history/history.jsonl
./run.sh export ~/.pi/ingest-yt-history/history.jsonl -o ./charts --for-figure

cd .agent/skills/create-figure
./run.sh heatmap -i charts/heatmap.json -o viewing_heatmap.pdf

Dados de Resposta de API

# Dados: api_logs.json com endpoint, status_code, response_time, user_id

./run.sh describe api_logs.json
./run.sh stats api_logs.json --columns response_time
# → média=245.3ms, dp=89.2ms, p50=220ms, p99=450ms

./run.sh group-by api_logs.json --by endpoint --agg response_time --func mean --for-figure -o latency.json

Dependências

# pyproject.toml
dependencies = [
    "pandas>=2.0.0",
    "typer>=0.9.0",
    "rich>=13.0.0",
]

Integração com Horus

# Estilo narrativo Horus
./run.sh insights ~/.pi/ingest-yt-history/history.jsonl --horus

# Saída:
# "Seus padrões de visualização revelam uma tendência noturna para conteúdo melancólico.
#  O pico de atividade ocorre nas horas do crepúsculo, com o consumo de música se intensificando
#  durante sessões introspectivas noturnas..."

Erros Comuns

# ERRADO: Chamar stats diretamente em um conjunto desconhecido
./run.sh stats data.jsonl --columns revenue,cost
# → Falha em colunas não numéricas ("USD 1000" é texto, não número)
# CERTO: Sempre execute describe primeiro
./run.sh describe data.jsonl
# → Mostra tipos de coluna, recomenda comandos de gráfico corretos

# ERRADO: Escolher manualmente o tipo de gráfico sem recomendação do describe
./run.sh group-by data.jsonl --by date --agg views | ./run.sh metrics --type pie
# → Gráfico de pizza para dados de série temporal é inútil
# CERTO: Use o comando create-figure recomendado pelo describe

# ERRADO: Assumir que o esquema JSONL corresponde às expectativas
# → Campos renomeados, nulos presentes, tipos misturados
# CERTO: describe detecta tudo isso automaticamente

Individual skills in this repo

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

grahama1970/acceptance-contract

Turn a client brief, zip bundle, directory, or single requirements file into a typed acceptance-contract bundle with extracted requirements, acceptance checks, open questions, an immutable-goal draft, and a create-report-backed decision report. Use when users say acceptance contract, brief to requirements, freeze the goal, create immutable goal, amend immutable goal, build a Battle requirements bundle, or extract requirements from this bundle.

grahama1970/agent-ecosystem

Canonical map and shared contracts for the agent-governance ecosystem: the pi.receipt_envelope.v1 boundary envelope, the component graph, and the rules for which component owns which schema. Use when wiring a skill or extension into the shared receipt world, when asking how shame, triage-error, tau, ask, project-watchdog, ops-herdr, ponytail, and Memory fit together, or when validating an envelope.

grahama1970/agentic-evals

Agentic evaluation of skills using multi-trial fixtures, deterministic command assertions, trajectory checks, safety constraints, and evidence-backed readiness scoring. Use when users ask for agentic evals, multi-trial skill evaluation, skill trajectory validation, or readiness scoring for a skill workflow.

grahama1970/agent-inbox

File-based inter-agent messaging with headless dispatch. Check inbox, send bugs/requests to other projects, automatically spawn headless agents to fix bugs, and track progress via task-monitor.

grahama1970/agents-registry

Generate and query the centralized agent identity registry. Scans .pi/agents/*/AGENTS.md, parses frontmatter, outputs agents-registry.json and optionally syncs to /memory for semantic search.

grahama1970/agent-status

Artifact-driven status surfaces for long-running project-agent work. Maintains status.json, events.jsonl, proof manifests, and a stale-aware STATUS.html so humans can tell where the agent is, what passed, what is still unproven, and what decision or action is next — without dashboard theater.

grahama1970/align

Round-based context alignment before execution. Use when the human, project agent, WebGPT, scillm, ask, dogpile, memory, or project-knowledge may each hold different facts about a task; especially before ambiguous design, infographic, product workflow, high-stakes implementation, plan-iterate, project-infographic, or multi-review work.

grahama1970/analyze-chatterbox-emotions

Evaluate generated Chatterbox voice files as voice-quality artifacts: affect match, arousal/valence proxies, pause placement, intelligibility inputs, clipping, loudness, and discontinuity flags. Use when reviewing Chatterbox emotional tags, pauses, Turbo/base affect delivery, Persona Dream utterance renders, or whether generated speech matches an intended product-facing affect.

grahama1970/analyze-elf

Reverse-engineer features from ELF binaries. Extracts CLI commands, state machines, protocols, Zod schemas, and data models. Automatically generates a /create-walkthrough prosecution brief with Mermaid diagrams. Uses /treesitter for AST analysis of bundled JS/TS source.

grahama1970/animation-vocabulary

Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" → Rubber-banding). Use when the user asks "what's it called when…", or describes a motion effect without knowing its name and wants the right word to prompt an AI or designer with. For naming an effect, not designing or building one.

grahama1970/anonymize-data

Anonymize supported CSV, JSON, UTF-8 text, and SQLite files using an explicit policy through the oai-trial project. Use for anonymize data, pseudonymize exports, redact policy literals, or discover and explicitly approve fuzzy name aliases. The skill is a thin CLI/Docker interface, not another engine.

grahama1970/anvil

Heavy-duty "No-Vibes" debugging and hardening orchestrator. Use this for complex, stubborn bugs where `review-code` has failed, or for "Red Teaming" (hardening) a codebase. Runs multiple agents in parallel (Thunderdome) using git worktree isolation.

grahama1970/apple-design

Apple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces.

grahama1970/argue

Multi-persona structured debate orchestrator. Personas research via /dogpile, consult colleagues via /ask, and argue toward nuanced synthesis on complex questions.

grahama1970/arxiv

Search arXiv for papers and extract knowledge into memory. Use `search` to find papers, `learn` to extract knowledge.

grahama1970/ask

Use when the user asks to query project memory, ask an oracle, use supported browser-backed reviewers, run Tau roundtable/single-handler workflows, ask Pi-native subagents from within Pi, run persona/deep-review workflows, generate image prompts, check OS/project health through composed skills, or run an ask DAG. This skill is the executable /ask runtime; do not replace it with an informal subagent, plain web search, or hand-written review; inside Pi, explicit Pi-native subagent targets are routed through the pi-subagents tool as an Ask target type.

grahama1970/assess

Step back and critically reassess project state. Use when asked to "assess", "step back", "fresh eyes", "check alignment", "sanity check", "health check", "prune documentation", or "evaluate what's working". Offers documentation pruning and doc-code alignment analysis. Offer to run after major changes (don't auto-run).

grahama1970/assistant

Shared GPT + classifier inference gateway for persona monitor tasks. Routes validation and classification through a 4-tier cascade: heuristic → classifier → local GPT → scillm.

grahama1970/assistant-lab

Self-improvement workbench for /assistant. All the tools needed to diagnose, train, evaluate, and promote models in a continuous loop. The "warm pond" where /assistant evolves its own inference stack.

grahama1970/batch-quality

Pre-flight validation and quality gates for batch LLM operations. ACTUALLY tests samples through LLM before burning tokens. Uses SPARTA contracts for DuckDB validation queries. Integrates with task-monitor for enforced quality gates.

Habilidades Relacionadas