Overview
What I Built
Every analysis starts with the same unglamorous first pass: What columns do I have? What types are they really? What is missing, what is skewed, what moves together? It is mechanical work, but skipping it is how people chart the wrong column and brief a room on a data entry error.
This demo encodes that first pass. Paste CSV or TSV data and a hand-rolled parser (quoted commas, quoted newlines, and escaped quotes handled properly) turns it into a table. The browser then computes the statistics locally: per-column type detection, missing counts, min, max, mean, and median for numeric columns, top values for categories, the strongest correlation between numeric columns, and a trend check when a date column exists. A chart is drawn as inline SVG from those computed values, with a data table alternative for anyone who cannot use the chart.
Only an aggregate summary and a five-row sample ever leave the page, sent to Claude through the same proxy as the other demos. Claude's job is interpretation: patterns, anomalies, and the questions worth asking next. Your full dataset stays in the tab.
Try It
Live Demo
Paste CSV or TSV data with a header row, or load a sample. The statistics and chart are computed on the spot; the written narrative follows a few seconds later.
Results
What the data says
Chart
Chart data as a table
Computed findings
Column by column
| Column | Type | Missing | Min | Max | Mean | Median | Top values |
|---|
AI narrative
Architecture
How It Works
Two layers with a hard boundary between them. Everything statistical happens in the page, deterministically, and would work with the network unplugged. The only network call carries a small summary: column profiles, the computed findings, and the first five rows as a sample, capped well under the proxy's size limit.
Raw text parsed locally, quotes and all
State machine builds a typed table
Profiles, correlation, trend, outliers
Findings plus a five-row sample only
Patterns, anomalies, next questions
Why cap the sample? Five rows show the model the shape of the data. Five hundred rows would mostly repeat that shape at higher cost and higher risk. The narrative is grounded in the computed aggregates, which describe all of the data, not a slice of it.
The idea
The math runs locally. The AI only interprets.
Statistics are deterministic, so the browser does them. Claude gets summaries, not your dataset, and its job is the part people actually want: what stands out, what looks off, and what to ask next.
Reflection
What I Learned
-
Parsing CSV properly is the whole game Quoted commas and embedded newlines break every naive split-based parser. A small character-by-character state machine handles all of it in about forty lines.
-
Type detection is a judgment call A column of ZIP codes parses as numbers but is not numeric data. Thresholds (most values must parse, and dates must look like dates) keep the profiles honest.
-
Aggregates are a privacy boundary Sending summaries instead of rows keeps the AI useful and the data local. It also keeps requests tiny, fast, and cheap.
-
A chart must earn its place The chart type follows the data: a line when there is a date column, category bars otherwise, and always a table alternative so the information does not depend on seeing the chart.
Tools Used
Tech Stack
Vanilla JavaScript only: a hand-rolled CSV parser, descriptive statistics, Pearson correlation, and SVG generated as strings. One proxied call to Claude for the narrative.
Keep exploring
More from the site
Head back to the projects page or take a look at the source on GitHub.