9

Drop a CSV in, get a self-contained exploration UI out. The prompt below produces a page that infers column types, picks sensible defaults, and lets you switch dimensions.

I use it weekly for one-off data questions. The type-inference instructions matter more than the charting instructions.

THE PROMPT
I will paste a CSV. Build a single-file HTML page that visualizes it with d3 (CDN). The page must:
1. Parse the CSV from an embedded <script type="text/csv"> block (embed my data verbatim)
2. Infer each column's type: numeric, categorical (<=20 uniques), date (try ISO then common formats), or text. Show the inferred schema in a collapsible panel.
3. Default view: if there's a date column, line chart of the first numeric over time; else bar chart of first numeric grouped by first categorical
4. Controls: dropdowns for X, Y, group-by, and aggregation (sum/mean/median/count) that redraw instantly
5. Hover tooltips with exact values, axis labels with units guessed from the header names
6. A "table" tab showing the raw rows, sortable by clicking headers
Handle up to 50k rows without freezing (aggregate before drawing).

0 Answers

Your Answer