Interactive notebooks for exploring Stratum's features.
;; In a running REPL (clj -M:repl):
(require '[scicloj.clay.v2.api :as clay])
;; Render to HTML - opens in browser at http://localhost:1971/
(clay/make! {:source-path "notebooks/stratum_intro.clj" :show true})
;; Generate Quarto document
(clay/make! {:source-path "notebooks/stratum_intro.clj" :format [:quarto :html]})clj -M:repl
# then:
(load-file "notebooks/stratum_intro.clj")clj -M:dev -i notebooks/test_notebook.clj
clj -M:dev -i notebooks/test_persistence.cljIntroduction for Clojure data science practitioners:
- Column maps & SQL - DSL query maps and SQL strings, same engine
- Tablecloth interop - Pass
tc/datasetdirectly, zero copy - Fused SIMD execution - Why it's fast, live timing on 1M rows
- Zone map pruning - Range queries skip irrelevant chunks automatically
- Persistence -
st/sync!,st/fork,st/load, time-travel by commit UUID - Statistics - STDDEV, VARIANCE, CORR natively in a single pass
- Hash joins - INNER, LEFT, RIGHT, FULL
Datahike + Stratum - entity queries alongside OLAP analytics, auto-sync
via d/listen!, Yggdrasil composite for atomic snapshots, SQL via PgWire.
Notebooks are regular Clojure files. Comments become prose, expressions become output cells when rendered by Clay.
;; # My Notebook Title
;; Explanation text here.
(ns my-notebook
(:require [stratum.api :as st]
[scicloj.kindly.v4.kind :as kind]))
;; ## Section
(st/q {:from {:x (double-array [1 2 3])} :agg [[:sum :x]]})Stratum notebooks follow the Kindly convention and work with Clay for static site generation.