@outsidedata/dolex 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +72 -120
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,34 +1,47 @@
|
|
|
1
|
-
|
|
1
|
+
```
|
|
2
|
+
██████╗ ██████╗ ██╗ ███████╗ ██╗ ██╗
|
|
3
|
+
██╔══██╗ ██╔═══██╗ ██║ ██╔════╝ ╚██╗██╔╝
|
|
4
|
+
██║ ██║ ██║ ██║ ██║ █████╗ ╚███╔╝
|
|
5
|
+
██║ ██║ ██║ ██║ ██║ ██╔══╝ ██╔██╗
|
|
6
|
+
██████╔╝ ╚██████╔╝ ███████╗ ███████╗ ██╔╝ ██╗
|
|
7
|
+
╚═════╝ ╚═════╝ ╚══════╝ ╚══════╝ ╚═╝ ╚═╝
|
|
8
|
+
```
|
|
2
9
|
|
|
3
|
-
**
|
|
10
|
+
**Your AI data analyst.** Not a chart library — a complete analytical engine that turns raw data into insight.
|
|
4
11
|
|
|
5
|
-
|
|
12
|
+
---
|
|
6
13
|
|
|
7
|
-
##
|
|
14
|
+
## The Problem
|
|
8
15
|
|
|
9
|
-
|
|
10
|
-
- **Pattern Selector** — analyzes data shape + user intent, scores every pattern, returns ranked recommendations with reasoning
|
|
11
|
-
- **Data Source Connectors** — connect CSV, SQLite, PostgreSQL, or MySQL; query with a declarative DSL including joins, aggregations, and time bucketing
|
|
12
|
-
- **React Components** — 43 thin-wrapper components with D3 lifecycle management
|
|
13
|
-
- **HTML Builders** — 43 self-contained HTML documents, perfect for MCP Apps / iframes
|
|
14
|
-
- **MCP Server** — 17 tools for Claude Desktop, ChatGPT, VS Code, and any MCP-compatible client
|
|
15
|
-
- **Dashboard Builder** — multi-view dashboards with global filters and cross-view interactions
|
|
16
|
-
- **Compound Visualizations** — chart + data table with linked highlighting
|
|
17
|
-
- **Design System** — dark/light themes with color palettes, typography, and spacing tokens
|
|
18
|
-
- **Smart Labels** — truncation, abbreviation, collision avoidance, adaptive strategies
|
|
19
|
-
- **Offline Maps** — choropleth and proportional symbol maps with 33 embedded TopoJSON files covering world, continents, US states/counties, and 17 country subdivision maps
|
|
16
|
+
Right now, getting real analysis out of an AI means one of two things:
|
|
20
17
|
|
|
21
|
-
|
|
18
|
+
1. **The Python REPL loop** — Claude writes a script, runs it, gets an error, fixes it, runs it again, gets a different error, and eventually produces a matplotlib chart with default styling that you'd be embarrassed to put in a deck.
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
2. **"Here's a bar chart"** — every AI assistant reaches for the same three chart types because they optimize for the most likely token, not the most informative visualization.
|
|
21
|
+
|
|
22
|
+
Dolex replaces both. No Python. No REPL. No `import pandas`. No `plt.show()`. No debugging dependency conflicts. Just point it at your data and ask questions.
|
|
23
|
+
|
|
24
|
+
## What It Actually Is
|
|
25
|
+
|
|
26
|
+
Dolex is an MCP server that gives your AI assistant a complete data analysis toolkit:
|
|
27
|
+
|
|
28
|
+
**A query engine** — point it at a CSV or SQLite file and query it with a declarative DSL. Joins across tables, aggregations (sum, avg, median, stddev, percentiles), time bucketing (group by month/quarter/year), window functions (lag, lead, rank, running totals, percent of total), filters, having clauses, sorting, and limits. Everything pandas can do, without the Python.
|
|
29
|
+
|
|
30
|
+
**43 handcrafted visualization patterns** — not chart.js defaults. Bump charts for rankings, beeswarms for distributions, Sankey diagrams for flows, ridgeline plots for comparing distributions, connected dot plots for two-metric comparisons, calendar heatmaps for temporal patterns, and 37 more. Each pattern has selection rules that encode real data visualization expertise.
|
|
31
|
+
|
|
32
|
+
**Pattern intelligence** — Dolex doesn't just render charts. It analyzes the shape of your data and your intent, scores all 43 patterns, and recommends the one that actually communicates the insight — not the obvious one.
|
|
33
|
+
|
|
34
|
+
**Multi-view dashboards** — N-panel layouts with global filter controls and cross-view interactions. Not static images — interactive HTML with linked highlighting.
|
|
35
|
+
|
|
36
|
+
**Auto-analysis planning** — give it a dataset and it generates a structured analysis plan: which columns matter, what relationships to explore, what charts to build, with ready-to-execute queries for each step.
|
|
26
37
|
|
|
27
|
-
|
|
38
|
+
**Offline everything** — charts render as self-contained HTML. 33 TopoJSON map files ship with the package. Zero CDN calls, zero external dependencies. Works air-gapped.
|
|
39
|
+
|
|
40
|
+
## Install
|
|
28
41
|
|
|
29
42
|
### Claude Desktop
|
|
30
43
|
|
|
31
|
-
Add
|
|
44
|
+
Add to your config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
|
|
32
45
|
|
|
33
46
|
```json
|
|
34
47
|
{
|
|
@@ -41,128 +54,67 @@ Add this to your Claude Desktop configuration file (`~/Library/Application Suppo
|
|
|
41
54
|
}
|
|
42
55
|
```
|
|
43
56
|
|
|
44
|
-
Restart Claude Desktop. You'll see Dolex's 17 tools available in the tool picker.
|
|
45
|
-
|
|
46
57
|
### Claude Code
|
|
47
58
|
|
|
48
59
|
```bash
|
|
49
60
|
claude mcp add dolex -- npx @outsidedata/dolex
|
|
50
61
|
```
|
|
51
62
|
|
|
52
|
-
###
|
|
53
|
-
|
|
54
|
-
Any MCP-compatible client (ChatGPT, VS Code, Goose, etc.) can connect via stdio:
|
|
63
|
+
### Any MCP Client
|
|
55
64
|
|
|
56
65
|
```bash
|
|
57
66
|
npx @outsidedata/dolex
|
|
58
67
|
```
|
|
59
68
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
| Tool | Description |
|
|
63
|
-
|------|-------------|
|
|
64
|
-
| `visualize` | Takes inline data + intent, returns visualization recommendations |
|
|
65
|
-
| `visualize_from_source` | Takes a data source + DSL query + intent, returns visualization recommendations |
|
|
66
|
-
| `list_patterns` | Browse all 43 available patterns |
|
|
67
|
-
| `refine_visualization` | Tweak a visualization — sort, limit, flip axes, change colors, update title |
|
|
68
|
-
| `add_source` | Connect a data source (CSV, SQLite, PostgreSQL, MySQL) |
|
|
69
|
-
| `list_sources` | List all connected data sources |
|
|
70
|
-
| `remove_source` | Disconnect and remove a data source |
|
|
71
|
-
| `describe_source` | Column profiles for a data source |
|
|
72
|
-
| `analyze_source` | Generate a structured analysis plan with ready-to-execute DSL queries |
|
|
73
|
-
| `query_source` | Run a declarative DSL query against a data source |
|
|
74
|
-
| `create_dashboard` | Multi-view dashboard with global filters and cross-view interactions |
|
|
75
|
-
| `refine_dashboard` | Iterate on a dashboard — add/remove views, change layout, filters, themes |
|
|
76
|
-
| `server_status` | Inspect cached data in server memory |
|
|
77
|
-
| `clear_cache` | Clear cached specs and query results |
|
|
78
|
-
| `report_bug` | Generate a sanitized bug report |
|
|
79
|
-
| `export_html` | Return full self-contained HTML for a visualization |
|
|
80
|
-
| `screenshot` | Render a visualization to PNG via headless Chromium |
|
|
81
|
-
|
|
82
|
-
## Pattern Catalog
|
|
83
|
-
|
|
84
|
-
| Category | Patterns |
|
|
85
|
-
|----------|----------|
|
|
86
|
-
| **Comparison** (9) | Bar, Diverging Bar, Slope Chart, Connected Dot Plot, Bump Chart, Lollipop, Bullet, Grouped Bar, Waterfall |
|
|
87
|
-
| **Distribution** (7) | Histogram, Beeswarm, Violin, Ridgeline, Strip Plot, Box Plot, Density Plot |
|
|
88
|
-
| **Composition** (9) | Stacked Bar, Waffle, Treemap, Sunburst, Circle Pack, Metric, Donut, Marimekko, Icicle |
|
|
89
|
-
| **Time** (7) | Line, Area, Small Multiples, Sparkline Grid, Calendar Heatmap, Stream Graph, Horizon Chart |
|
|
90
|
-
| **Relationship** (5) | Scatter, Connected Scatter, Parallel Coordinates, Radar, Heatmap |
|
|
91
|
-
| **Flow** (4) | Sankey, Alluvial, Chord, Funnel |
|
|
92
|
-
| **Geo** (2) | Choropleth, Proportional Symbol |
|
|
93
|
-
|
|
94
|
-
## Library Usage
|
|
95
|
-
|
|
96
|
-
### Pattern Selection
|
|
97
|
-
|
|
98
|
-
```typescript
|
|
99
|
-
import { selectPattern, registry } from '@outsidedata/dolex';
|
|
100
|
-
|
|
101
|
-
const result = selectPattern(data, columns, 'compare rankings over time');
|
|
102
|
-
console.log(result.recommended.pattern.name); // "Bump Chart"
|
|
103
|
-
console.log(result.recommended.reasoning);
|
|
104
|
-
|
|
105
|
-
const patterns = registry.getAll(); // 43 patterns
|
|
106
|
-
const comparison = registry.getByCategory('comparison'); // 9 patterns
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
### React Components
|
|
69
|
+
## The Query Engine
|
|
110
70
|
|
|
111
|
-
|
|
112
|
-
import { BumpChart, Beeswarm, Waffle, Scatter, Line } from '@outsidedata/dolex/react';
|
|
71
|
+
Drop a CSV on Claude and start asking questions. No schema definition, no imports, no setup. Dolex profiles your data automatically — column types, distributions, cardinality, sample values — and gives the LLM everything it needs to write smart queries.
|
|
113
72
|
|
|
114
|
-
|
|
115
|
-
return <BumpChart spec={spec} width={800} height={500} />;
|
|
116
|
-
}
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
Available components: `Bar`, `DivergingBar`, `SlopeChart`, `BumpChart`, `ConnectedDotPlot`, `Lollipop`, `Bullet`, `GroupedBar`, `Waterfall`, `Histogram`, `Beeswarm`, `StripPlot`, `Violin`, `Ridgeline`, `BoxPlot`, `DensityPlot`, `StackedBar`, `Waffle`, `Treemap`, `Sunburst`, `CirclePack`, `Metric`, `Donut`, `Marimekko`, `Icicle`, `Line`, `Area`, `SmallMultiples`, `SparklineGrid`, `CalendarHeatmap`, `StreamGraph`, `HorizonChart`, `Scatter`, `ConnectedScatter`, `ParallelCoordinates`, `Radar`, `Heatmap`, `Sankey`, `Alluvial`, `Chord`, `Funnel`, `Choropleth`, `ProportionalSymbol`
|
|
73
|
+
The DSL compiles to SQL under the hood but the LLM never writes raw SQL. Instead it works with a structured, validated query language:
|
|
120
74
|
|
|
121
|
-
|
|
75
|
+
**Aggregations**: `sum`, `avg`, `min`, `max`, `count`, `count_distinct`, `median`, `stddev`, `p25`, `p75`, `percentile`
|
|
122
76
|
|
|
123
|
-
|
|
124
|
-
import { buildChartHtml } from '@outsidedata/dolex/html';
|
|
77
|
+
**Window functions**: `lag`, `lead`, `rank`, `dense_rank`, `row_number`, `running_sum`, `running_avg`, `pct_of_total` — with partition and order control
|
|
125
78
|
|
|
126
|
-
|
|
127
|
-
// Complete self-contained HTML document with embedded D3 + data
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### Theme
|
|
79
|
+
**Time bucketing**: group by `day`, `week`, `month`, `quarter`, `year` — automatic date parsing
|
|
131
80
|
|
|
132
|
-
|
|
133
|
-
import { theme, getTheme } from '@outsidedata/dolex/theme';
|
|
81
|
+
**Joins**: inner and left joins across tables within the same source, with dot-notation field references and ambiguity detection
|
|
134
82
|
|
|
135
|
-
|
|
136
|
-
const palette = dark.palettes.categorical;
|
|
137
|
-
```
|
|
83
|
+
**Filters**: before aggregation (`filter`) and after (`having`), with operators `=`, `!=`, `>`, `>=`, `<`, `<=`, `in`, `not_in`, `between`, `like`, `is_null`, `is_not_null`
|
|
138
84
|
|
|
139
|
-
|
|
85
|
+
Every query is validated before execution — field names are checked against the schema with fuzzy "did you mean?" suggestions for typos.
|
|
140
86
|
|
|
141
|
-
|
|
142
|
-
import { labelStrategy, truncateLabel, abbreviate } from '@outsidedata/dolex/utils';
|
|
87
|
+
## 43 Patterns
|
|
143
88
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
|
150
|
-
|
|
151
|
-
|
|
|
152
|
-
|
|
|
153
|
-
| `@outsidedata/dolex/html` | Self-contained HTML chart builders |
|
|
154
|
-
| `@outsidedata/dolex/theme` | Design system tokens |
|
|
155
|
-
| `@outsidedata/dolex/utils` | Smart labels, responsive, export utilities |
|
|
156
|
-
| `@outsidedata/dolex/patterns` | Pattern registry and selector |
|
|
89
|
+
| Category | What they're for |
|
|
90
|
+
|----------|-----------------|
|
|
91
|
+
| **Comparison** (9) | Bar, Diverging Bar, Slope Chart, Connected Dot Plot, Bump Chart, Lollipop, Bullet, Grouped Bar, Waterfall |
|
|
92
|
+
| **Distribution** (7) | Histogram, Beeswarm, Violin, Ridgeline, Strip Plot, Box Plot, Density Plot |
|
|
93
|
+
| **Composition** (9) | Stacked Bar, Waffle, Treemap, Sunburst, Circle Pack, Metric, Donut, Marimekko, Icicle |
|
|
94
|
+
| **Time** (7) | Line, Area, Small Multiples, Sparkline Grid, Calendar Heatmap, Stream Graph, Horizon Chart |
|
|
95
|
+
| **Relationship** (5) | Scatter, Connected Scatter, Parallel Coordinates, Radar, Heatmap |
|
|
96
|
+
| **Flow** (4) | Sankey, Alluvial, Chord, Funnel |
|
|
97
|
+
| **Geo** (2) | Choropleth, Proportional Symbol — 33 offline maps (world, US, continents, 17 countries) |
|
|
157
98
|
|
|
158
|
-
##
|
|
99
|
+
## Tools
|
|
159
100
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
101
|
+
| Tool | What it does |
|
|
102
|
+
|------|-------------|
|
|
103
|
+
| `add_source` | Point at a CSV or SQLite file |
|
|
104
|
+
| `describe_source` | Profile columns, stats, sample rows |
|
|
105
|
+
| `analyze_source` | Auto-generate an analysis plan |
|
|
106
|
+
| `query_source` | Run queries with the full DSL |
|
|
107
|
+
| `visualize` | Inline data → ranked chart recommendations |
|
|
108
|
+
| `visualize_from_source` | Query + visualize in one step |
|
|
109
|
+
| `refine_visualization` | Iterate on a chart |
|
|
110
|
+
| `create_dashboard` | Multi-view dashboard with filters |
|
|
111
|
+
| `refine_dashboard` | Iterate on a dashboard |
|
|
112
|
+
| `list_patterns` | Browse all 43 patterns |
|
|
113
|
+
| `export_html` | Get raw HTML |
|
|
114
|
+
| `screenshot` | Render to PNG |
|
|
115
|
+
| `server_status` | Inspect server state |
|
|
116
|
+
| `clear_cache` | Reset |
|
|
117
|
+
| `report_bug` | File a bug report |
|
|
166
118
|
|
|
167
119
|
## License
|
|
168
120
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outsidedata/dolex",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "AI data analyst — 43 handcrafted visualization patterns, query engine with window functions, and auto-analysis planning via MCP",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|