Metadata-Version: 2.4
Name: talocode-datalane
Version: 0.1.0
Summary: Open-source AI data analysis canvas — connect CSV/JSON/live URLs, describe charts in plain English, get editable artifacts instead of code dumps
Author: Talocode
License: MIT
Project-URL: Homepage, https://github.com/talocode/datalane
Project-URL: Documentation, https://docs.talocode.site
Project-URL: Repository, https://github.com/talocode/datalane
Project-URL: Issues, https://github.com/talocode/datalane/issues
Project-URL: PyPI, https://pypi.org/project/talocode-datalane/
Keywords: talocode,data,analysis,charts,visualization,csv,ai,cli
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# DataLane

Open-source AI data analysis canvas. Connect CSV, JSON, or a live URL, describe
a chart in plain English, and get an **editable artifact** — not a code dump.

DataLane is the open-source, self-hosted answer to AI data-analysis tools that
only hand you generated scripts. It runs entirely on your machine, works with
your own model key, and every chart is a real object you can edit, branch, and
re-render.

## What it solves

- You have data scattered across files and URLs and want charts without
  writing SQL or Python by hand.
- AI analysis tools give you a script you must re-run; DataLane hands you an
  editable HTML artifact with the spec + data embedded.
- Follow-up questions drift back to raw data; DataLane anchors a cleaned
  state so each question builds on the last.

## Install

```bash
npm install -g @talocode/datalane
# or
pip install talocode-datalane
```

## Quickstart

```bash
datalane analyze sales.csv "total revenue by month" --out revenue.html
```

```python
from talocode import DataLaneClient

client = DataLaneClient()
source = client.load("sales.csv")
result = client.analyze(source, "average revenue by region")
print(result.summary)
client.to_html(result)  # editable artifact
```

## CLI

```
datalane analyze <source> "<intent>" [--out <file.html>]
datalane render <source> --spec '<json>' [--out <file.html>]
datalane anchor <source> [--name <name>]
datalane from-anchor "<intent>" [--out <file.html>]
datalane branch --spec '<json>' --vars '<json>' [--out-dir <dir>]
datalane columns <source>
datalane sources | pricing | capabilities
```

## API surface

### Chart types

`bar`, `line`, `scatter`, `pie`, `table`

### Aggregations

`sum`, `avg`, `count`, `min`, `max`

### Sources

| Source | Example |
|--------|---------|
| CSV file | `sales.csv` |
| JSON file | `data.json` (array or `{ "rows": [...] }`) |
| Live URL | `https://api.example.com/data.json` |

### Intent parsing

Plain-English phrases are parsed deterministically — no key required:

- `"total revenue by month"` → bar, sum of revenue grouped by month
- `"average spend by country limit 5"` → avg, filtered to 5 rows
- `"how many orders by region"` → count
- `"revenue trend over time"` → line chart
- `"breakdown by region as a pie"` → pie
- `"correlation between x and y"` → scatter
- `"where region contains South"` → filter

### Anchored state

`anchor` saves the cleaned dataset to `.datalane/anchor.json`. `from-anchor`
and `branch` build on that clean state so follow-ups do not drift back to raw
data.

## Credits (hosted API)

| Route | Credits |
|-------|---------|
| `datalane.analyze` | 5 |
| `datalane.anchor` | 2 |
| `datalane.render` | 1 |

Hosted at `https://api.talocode.site/v1/datalane/*`. Set `TALOCODE_API_KEY`
and optionally `TALOCODE_BASE_URL`.

## Related packages

- `npm i @talocode/llmgateway` / `pip install talocode-llmgateway` — LLM API gateway
- `npm i @talocode/xsearchlane` / `pip install talocode-xsearchlane` — X search
- `npm i @talocode/doculane` / `pip install talocode-doculane` — office documents

## Talocode ecosystem

| Package | GitHub | Install |
|---------|--------|---------|
| **DataLane (this package)** | [talocode/datalane](https://github.com/talocode/datalane) | `pip install talocode-datalane` |
| Tera | [talocode/tera](https://github.com/talocode/tera) | `pip install talocode-tera` |
| Codra | [talocode/codra](https://github.com/talocode/codra) | `pip install talocode-codra` |
| SearchLane | [talocode/searchlane](https://github.com/talocode/searchlane) | `pip install talocode-searchlane` |
| StackLane | [talocode/stacklane](https://github.com/talocode/stacklane) | `pip install talocode` |
| GateLane | [talocode/gatelane](https://github.com/talocode/gatelane) | |
| ContextLane | [talocode/contextlane](https://github.com/talocode/contextlane) | `pip install contextlane` |
| ScreenLane | [talocode/screenlane](https://github.com/talocode/screenlane) | `pip install talocode-screenlane` |
| MemoryLane | [talocode/memorylane](https://github.com/talocode/memorylane) | |
| Tradia | [talocode/tradia](https://github.com/talocode/tradia) | `pip install tradia` |
| DevTool | [talocode/devtool](https://github.com/talocode/devtool) | `pip install talocode-devtool` |
| XProLane | [talocode/xprolane](https://github.com/talocode/xprolane) | `pip install talocode-xprolane` |
| XSearchLane | [talocode/xsearchlane](https://github.com/talocode/xsearchlane) | `npm i @talocode/xsearchlane` |
| Agent Browser | [talocode/agent-browser](https://github.com/talocode/agent-browser) | |
| InvoiceLane | [talocode/invoicelane](https://github.com/talocode/invoicelane) | |
| GeoLane | [talocode/geolane](https://github.com/talocode/geolane) | |
| ClipLoop | [talocode/cliploop](https://github.com/talocode/cliploop) | |
| LLM Gateway | [talocode/llmgateway](https://github.com/talocode/llmgateway) | `pip install talocode-llmgateway` |

More: [github.com/talocode](https://github.com/talocode) · [talocode.site](https://talocode.site) · [docs.talocode.site](https://docs.talocode.site)

## License

MIT © Talocode
