Product
Open source 63 GitHub stars

the-stats-duck

A DuckDB extension that adds statistical functions to the SQL surface. The shared analytics layer that quietly powers Bedevere.

What it does

DuckDB ships with a strong but deliberately compact statistics surface. the-stats-duck extends it with the additional functions and distributions that clinical and tabular analytics actually need — quantile families, distribution CDFs and inverses, hypothesis-test machinery, the supporting numerics — without forcing analysts to leave SQL for a host language.

Charts from SQL

Statistics are only half the story. the-stats-duck also adds a VISUALIZE directive to DuckDB’s SQL surface, so a query can describe a chart and hand back a plot — the same SQL-native approach as the stats, and the charting primitive Bedevere builds on. The grammar (ggsql) now aims to follow that of DuckDB’s ggplot extension.

Why it exists

Bedevere leans on DuckDB for the heavy lifting. When it needs a quantile or a distribution function for an interactive query, the answer should come from one place. That place is the-stats-duck.

Use it

The extension is in the DuckDB community repository. Two statements install and load it in any DuckDB session, and the new functions sit on the SQL surface alongside the built-ins:

INSTALL stats_duck FROM community;
LOAD stats_duck;

The listing on duckdb.org shows the DuckDB releases and the platforms it is built for, WebAssembly included. The repository is the reference for the current function coverage and the build instructions.

Repository: github.com/KoliStat/the-stats-duck
Community extension: stats_duck on duckdb.org

Need a function?

the-stats-duck grows by demand. If there’s a statistic, distribution, or test you need that isn’t there yet, get in touch — request it for the roadmap, or sponsor it to jump the queue. Commissioned functions ship in the open-source extension, so everyone gets them.