caerbannogwhite
Joined 6 months ago
Joined 6 months ago
I think that's a red herring: the query is sandboxed DuckDB-WASM SQL (never executed as script), it's never injected into the DOM as HTML, and the page enforces a strict CSP that blocks inline script regardless. NoScript probably flags it because it's SQL-shaped text in a cross-site query string, and it matches its injection heuristic.
Agreed, it's not production-grade yet, and robust standard errors are the priority. HC and cluster-robust SEs are the biggest credibility gap, which is why I just added an (Eigen-based) linalg kernel for the next release: it's the groundwork so the regression fitter can ship HC0–HC3 and clustered SEs (and bootstrapped, via the existing bootstrap aggregate). Margins and GLMs (IRLS on the same kernel, so not really a backend rewrite) are the next layers.
About the scope, agreed, and already narrowing. I'll credit posit ggsql as the real grammar-of-graphics tool; mine stays a minimal built-in. The plan is to go deep on the statistical core and lean on the DuckDB ecosystem for the rest.
For the market fit I'd frame it a bit differently. Not trying to pry anyone off Stata/R for rigorous work, I know that those aren't going anywhere soon. The niche is stats where the data already lives: people in SQL/DuckDB who currently round-trip to R/Python for a regression. R can run in the browser now (webR), but not in the same engine as the data. The stats-duck runs inside duckdb-wasm, so there's no separate runtime and no marshalling. And DuckDB is already far faster than R for the ETL/wrangling around the stats.
The plan is to figure out from real usage. For now, I'll focus on the core.
About the name: yours is the official Posit one, and you were there first, so I'll rename my branding; there should be one ggsql, and it's yours. Mine only exposes VISUALIZE as the keyword anyway.
The actual name of the extension is the-stats-duck, which runs inside duckdb-wasm (it powers an in-browser data tool) and emits a Vega-Lite spec inline for the host to render. Your implementation (which I think is Rust based and an in-process HTTP server that opens a browser), is a native pattern, but correct me if I'm wrong! mine is deliberately thin and wasm-safe, not a whole engine.
About the parity, you're right, and I'm not chasing it; for real grammar-of-graphics, ggsql should be the tool! but, if that's ok with you, I'd love to keep the syntax aligned!
My plan is to release a blog post about all VISUALIZE current features next week, explicitly mentioning Posit's alpha GGPLOT.
/edit: clarifications
I wanted it to - be performant: some files can have 50k rows or more, so an HTML table could not be the solution - be easy to configure: web-app, no installation or configuration, so my colleagues could use it too - (later) have a way to quickly explore data via queries: what's better than DuckDB for this?
Then, a few weeks ago, I read Thomas Lin Pedersen / Posit's alpha release here on HN (https://news.ycombinator.com/item?id=47833558), and I thought it could be nice to have charts in Bedevere. So I asked Claude to add the GGSQL grammar to my DuckDB extension (the-stats-duck - separate repo: https://github.com/caerbannogwhite/the-stats-duck).
Here are some other things you can try:
VISUALIZE bill_length_mm AS x , bill_depth_mm AS y , species AS color FROM penguins_clean DRAW point SCALE x DOMAIN 30 60 SCALE y ZERO false SCALE color TO viridis ;
VISUALIZE bill_length_mm AS x , bill_depth_mm AS y , species AS color FROM penguins_clean DRAW point FACET BY species COLS SCALE x ZERO false SCALE y ZERO false ;
Feedback is very welcome!
https://kolistat.com/