| name | analytics |
| description | Flexible data science analytics for any dataset. Auto-discovers schema, recommends charts, exports to create-figure. Works with JSONL, JSON, CSV from any source.
|
| allowed-tools | Bash, Read |
| triggers | ["analyze data","analyze dataset","show insights","describe data","what's in this data","data exploration","EDA","schema discovery","chart recommendations","visualize this data"] |
| metadata | {"short-description":"Schema discovery + chart recommendations for any data"} |
| provides | ["analytics"] |
| composes | ["create-figure","task-monitor"] |
Analytics Skill
Flexible data science analytics that works with any dataset. Auto-discovers schema, recommends visualizations, and exports in create-figure format.
Quick Start (Any Dataset)
cd .pi/skills/analytics
./run.sh describe data.jsonl
./run.sh chart data.jsonl --name distribution_channel -o chart.json
cd .agent/skills/create-figure
./run.sh metrics -i /path/to/chart.json --type bar -o chart.pdf
The Seamless Pipeline
Any Data (JSONL/JSON/CSV)
│
▼
┌─────────────────────────────────┐
│ analytics describe │ ← Discovers schema, recommends charts
│ "5 categorical, 2 numerical, │
│ 1 temporal column detected" │
│ Recommendations: │
│ - distribution_channel (bar) │
│ - trend_by_date (line) │
│ - heatmap_hour_x_day │
└─────────────────────────────────┘
│
▼
┌─────────────────────────────────┐
│ analytics chart/group-by │ ← Generates chart data in create-figure format
│ --name distribution_channel │
│ -o chart.json │
└─────────────────────────────────┘
│
▼
┌─────────────────────────────────┐
│ create-figure metrics │ ← Renders publication-quality PDF/PNG
│ -i chart.json --type bar │
│ -o channel_distribution.pdf │
└─────────────────────────────────┘
Commands
Discovery (Start Here)
| Command | Description |
|---|
describe <file> | Discover schema, detect column types, recommend charts |
./run.sh describe sales.jsonl
Flexible Analysis
| Command | Description |
|---|
group-by <file> | Group by any column with aggregation |
stats <file> | Numerical statistics and correlations |
chart <file> | Generate chart spec for create-figure |
./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
./run.sh stats data.jsonl --columns revenue,cost,profit
./run.sh chart data.jsonl --name distribution_channel -o chart.json
Timestamped Data (ingest-* outputs)
| Command | Description |
|---|
insights <file> | Full analysis summary (trends, sessions, patterns) |
trends <file> | Viewing trends with rolling averages |
sessions <file> | Session detection and binge analysis |
time-patterns <file> | Hour/day distribution |
evolution <file> | How preferences change over time |
Output
| Command | Description |
|---|
export <file> | Batch export all standard charts |
report <file> | Horus-style narrative report |
Supported Formats
| Format | Extension | Auto-Detection |
|---|
| JSONL | .jsonl | Line-delimited JSON |
| JSON | .json | Array or {data: [...]} |
| CSV | .csv | Comma-separated |
Column Type Detection
The describe command auto-detects:
| Type | Detection Logic | Recommended Charts |
|---|
| temporal | datetime64, date-like strings | line, area, heatmap (time axis) |
| numerical | int64, float64 | histogram, scatter, stats |
| categorical | low cardinality (≤20 unique) | bar, pie, heatmap |
| boolean | bool dtype | pie (true/false) |
| text | high cardinality strings | word cloud, top-N |
Chart Recommendations
Based on column types, analytics recommends:
| Data Pattern | Chart Type | create-figure Command |
|---|
| 1 categorical | bar, pie | metrics --type bar |
| 1 temporal | line | training-curves |
| 2 categorical | heatmap | heatmap |
| temporal + categorical | heatmap | heatmap |
| 2+ numerical | correlation matrix | heatmap |
| 1 numerical | histogram | metrics --type bar |
Agent Workflow
For a project agent to analyze any dataset and visualize:
result = run("./run.sh describe data.jsonl --json")
recommendations = result["recommendations"]
chart_name = recommendations[0]["name"]
cmd = recommendations[0]["create_figure_cmd"]
run(f"./run.sh chart data.jsonl --name {chart_name} -o chart.json")
run(f"cd .agent/skills/create-figure && ./run.sh {cmd} -i chart.json -o chart.pdf")
Examples
E-commerce Sales Data
./run.sh describe orders.jsonl
./run.sh group-by orders.jsonl --by category --agg amount --func sum --for-figure -o revenue_by_category.json
cd .agent/skills/create-figure
./run.sh metrics -i revenue_by_category.json --type bar -o revenue.pdf
YouTube History (ingest-yt-history)
./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
API Response Data
./run.sh describe api_logs.json
./run.sh stats api_logs.json --columns response_time
./run.sh group-by api_logs.json --by endpoint --agg response_time --func mean --for-figure -o latency.json
Dependencies
dependencies = [
"pandas>=2.0.0",
"typer>=0.9.0",
"rich>=13.0.0",
]
Integration with Horus
./run.sh insights ~/.pi/ingest-yt-history/history.jsonl --horus