Data · Analytics · Python · DuckDB

Data Studio — Local-First Analytics Workbench

Open a file, tidy it, chart it and save it. Underneath sits a full analytics engine: 17 typed analyses, semantic dashboards, what-if parameters and reproducible pipelines — all on your machine.

View on GitHub Download ZIP

Overview

Data Studio is a local-first analytics workbench for cleaning, joining, analyzing, visualizing and reporting on tabular data. The long-term goal is one platform for the work people currently split across Excel, R, SAS, Tableau and Power BI. It ships today as a small, friendly desktop app — five screens (Home, My table, Clean, Charts, Save & share) with undo and a built-in help guide — backed by a full analytics engine: kernel contracts, a versioned project format, a CLI and an HTTP API.

It is built for analysts, operations teams, small businesses and researchers who want trustworthy, repeatable numbers without uploading data anywhere. Opening a project after a restart reproduces the same results because datasets, schemas, checksums and the pipeline are all on disk — never pickle, always Parquet and JSON.

Honest status: phases 0–4 are implemented (typed analyses, time series, semantic dashboards, time intelligence, what-if parameters, drill-down cross-filtering, an Excel-like formula bar, pivots, code steps and reproducible script export). The v0.38 all-features prototype is frozen in legacy/ as a runnable reference, not where new work happens.

Use cases

  • Monthly sales reporting. Drop in the CSV export, clean it once, save the analysis with a daily or on_open schedule, and get a self-contained HTML report with inline SVG charts — no spreadsheet gymnastics.
  • Tidying messy operational data. Trim text, cast columns, drop missing rows with composable pipeline steps that re-run deterministically and are tracked by checksum.
  • Statistical inference on real work. Two-sample t-tests, one-way ANOVA with Tukey HSD, chi-square tests and proportion tests, all with effect sizes and honest diagnostics.
  • Forecasting demand. time_series_summary, seasonal_decompose, trend_test (Mann-Kendall) and arima_forecast with forecast intervals and an optional backtest.
  • Semantic dashboards for the team. Model datasets as tables, dimensions and metrics; tiles never store SQL — a safe measures DSL compiles to DuckDB FILTER expressions, so project files cannot inject SQL.
  • What-if planning. Declare typed parameters (number, text, choice, boolean) on a dashboard; viewers change them in the parameter bar and every tile re-queries live.
  • Handing work to engineering. Freeze the current pipeline as a standalone Python or R script with data-studio script --format python; SQL steps become DuckDB SQL, code steps are inlined.
  • Excel-style grid work, local. Formula bar with live syntax checks, pivots, freeze panes, data bars, heatmaps and validation lists — without touching your original file.

A day in the life with Data Studio

Morning: you open the demo project and the workspace reports which saved analyses are fresh or stale. The nightly refresh --due (wired to Windows Task Scheduler or cron) already re-ran yesterday’s revenue summary. You glance at the Charts screen, spot an outlier in the amount column, and fix it with an fx formula — round(amount / sum(amount), 4) — applied as a pipeline step. You drag a dashboard slicer to North, watch every KPI and chart cross-filter, drill a hierarchy tile from year to quarter to month, then hit print to save the canvas as PDF and export a chart as PNG. Before lunch you export clean.parquet for the warehouse. Afternoon: a stakeholder asks “what if discounts rise 5%?” You bump the min_total what-if parameter, screenshot the updated tiles, and saved the view as a bookmark named “Discount scenario”. Everything — dataset, pipeline, model, dashboard — lives in one folder you can zip, diff and audit.

Features

  • Simple desktop app — five screens (Home, My table, Clean, Charts, Save & share), undo, built-in help, theme toggle following OS preference.
  • 17 typed analyses across descriptive stats, correlation, quality profiles, t-tests, ANOVA, chi-square, regression (OLS with VIF, binary logistic with ROC AUC), and time series (ACF/PACF, seasonal decomposition, Mann-Kendall trend, ARIMA forecasting).
  • Typed AnalysisResult — tables, metrics, diagnostics, plain-language narrative, chart specs and provenance; workspace, CLI, API and HTML reports render identical numbers.
  • Semantic layer — models/semantic.json maps datasets to tables, grain-tagged dimensions and metrics; safe DSL (sum(amount) where region = 'North'), compiled to DuckDB, star-schema joins planned automatically.
  • Time intelligence — generated calendar dataset, running_total, yoy, yoy_pct measures, hierarchy drill-down (year → quarter → month → day) and per-tile SQL tooltips.
  • Saved analyses — stored under analyses/<id>.json with input fingerprints; stale results are flagged until refreshed; schedules: manual, on_open, hourly, daily; no background daemon.
  • Excel-like editing — formula bar, pivots with per-value aggregations, conditional formatting (data bars, heatmap, highlight), freeze panes, validation lists, Python/R code steps via DATA_STUDIO_INPUT_PARQUET/DATA_STUDIO_OUTPUT_PARQUET.
  • Scale — a 5M-row messy CSV imported in 1.0 s; an 8-step clean/join pipeline ran in 0.4 s with 8/8 cache hits on a development laptop.

Installation

Requires Python 3. A virtual environment is recommended:

python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -e ".[dev]"

Or run the simple desktop app directly after installing dependencies:

.\run_data_studio.bat
python -m data_studio.ui

Quickstart (30 seconds)

data-studio doctor
data-studio init .\examples\demo --name "Demo"
data-studio add-dataset .\examples\demo .\data\sales.csv --id sales
data-studio add-step .\examples\demo trim_text --params '{"columns":["region"]}'
data-studio run .\examples\demo
data-studio analyze .\examples\demo descriptive_stats --params '{"columns":["amount"]}'
data-studio serve --project .\examples\demo --port 8765

Then open http://127.0.0.1:8765 — interactive API docs live at /docs. Analyses run on the prepared pipeline output by default, so the numbers always match the cleaned preview. Pass "use_pipeline": false to analyze a raw dataset instead.

Workflow & architecture

All surfaces — web workspace, desktop app, CLI, scheduler, tests — call the same kernel. A TableSchema describes columns and roles; an AnalysisResult carries typed tables, metrics, diagnostics, narrative and chart specs (rendered to SVG in-kernel, no charting library or network needed). A project is a folder with project.json, Parquet datasets and JSON definitions. The execution engine is DuckDB over Arrow, with pandas kept for small-data compatibility. Pipeline steps are content-hashed, giving reproducible re-runs and cache hits; saved analyses and dashboards record input fingerprints so staleness is detected, never silently served.

Troubleshooting

  • data-studio not found. Activate the venv (.\.venv\Scripts\Activate.ps1) and reinstall with python -m pip install -e ".[dev]"; run data-studio doctor to diagnose.
  • Saved analysis shows stale. The dataset checksum, pipeline or app version changed. Run data-studio refresh .\examples\demo --all or re-save the analysis.
  • Time-intelligence measure refuses to run. Carry a grain (year/quarter/month/week/day) on the date dimension in models/semantic.json or the workspace model panel — the engine explains exactly what is missing.
  • Ambiguous column error in a measure. Unqualified columns existing in multiple tables are rejected by design; qualify them as table.column.
  • Scheduled refresh never fires. There is no background daemon by design — schedule data-studio refresh --due from Task Scheduler/cron, or rely on project open and the workspace timer.
  • R code step fails. R requires Rscript on the PATH and --format r exports require every code step to be R; Python steps run inline on the desktop.

Release & license

Actively developed; see GitHub and releases for tags. The README does not pin a license file for this repo — check the repository root before redistributing. Need more help? Visit Knowledge Base.

← Back to RepositoriesMore Help →