Skip to content

Commit 1cef595

Browse files
authored
Merge pull request #249 from ClojureCivitas/aog-3
aog wip
2 parents a819c0c + 615a70f commit 1cef595

File tree

1 file changed

+60
-7
lines changed

1 file changed

+60
-7
lines changed

src/data_visualization/aog_in_clojure_part1.clj

Lines changed: 60 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
^{:kindly/hide-code true
2-
:clay {:title "Implementing the Algebra of Graphics in Clojure - Part 1"
3-
:quarto {:type :post
4-
:author [:daslu]
5-
:draft true
6-
:date "2025-12-26"
2+
:clay {:title "Implementing the Algebra of Graphics in Clojure - Part 1"
3+
:quarto {:type :post
4+
:author [:daslu]
5+
:draft true
6+
:date "2025-12-26"
77
:description "A Design Exploration for a plotting API"
88
:category :data-visualization
9-
:tags [:datavis]
9+
:tags [:datavis]
1010
:keywords [:datavis]}}}
1111
(ns data-visualization.aog-in-clojure-part1)
1212

@@ -4130,5 +4130,58 @@ iris
41304130
;; **Decision:** Worth pursuing, but not in this initial design phase.
41314131
;; Keep current Malli errors for now, enhance in future iteration.
41324132

4133+
;; # Conclusion
4134+
4135+
;; ### 📖 Where We Are
4136+
4137+
;; So that's the exploration. We set out to see if AlgebraOfGraphics.jl's compositional
4138+
;; approach could work in Clojure using plain maps and standard operations. The flat
4139+
;; structure with distinctive `:=` keys turned out pretty well—standard `merge` just works,
4140+
;; everything stays inspectable, and the threading macros feel natural. Getting type
4141+
;; information from Tablecloth for free was a nice bonus that eliminated a lot of
4142+
;; complexity.
4143+
4144+
;; The minimal delegation strategy (we compute transforms, rendering targets handle
4145+
;; layout) seems about right. We need domains before we can bin histograms anyway,
4146+
;; so might as well compute them. Everything else—axis formatting, tick placement,
4147+
;; "nice numbers"—the existing libraries already do better than we would.
4148+
4149+
;; There are rough edges. The threading-macro polymorphism (detecting whether the first
4150+
;; arg is layers or data) adds some complexity. Faceting works but doesn't feel as
4151+
;; algebraically elegant as `=*` and `=+`. Error messages could be much better. And we
4152+
;; haven't tested with large datasets yet. But nothing here feels like a fundamental
4153+
;; blocker—more like things to improve as we learn from usage.
4154+
4155+
;; ### 📖 What's Missing
4156+
4157+
;; This is a prototype, not a complete plotting library. We've got scatter, line,
4158+
;; histogram, linear regression, and faceting working across three rendering targets.
4159+
;; That's enough to explore the design, but Tableplot's existing APIs handle many more
4160+
;; plot types, aesthetics, transforms, and coordinate systems. Those aren't abandoned,
4161+
;; just deferred until we know if this approach is worth pursuing.
4162+
4163+
;; ### 📖 What Comes Next
4164+
4165+
;; Honestly, we're not sure yet. This could become a new namespace in Tableplot,
4166+
;; or it could just inform improvements to the existing APIs, or it could stay as
4167+
;; a design study. The goal was to explore whether a compositional approach could
4168+
;; work with plain Clojure data structures—and it seems like it can. What we do
4169+
;; with that depends on what we hear from people who try it.
4170+
4171+
;; If you've read this far and have thoughts—especially if you use Tableplot or build
4172+
;; visualizations regularly—we'd be interested to hear them. Try the code, see what
4173+
;; feels right or awkward, share what's missing for your use cases. This is happening
4174+
;; in the [Real-World Data dev group](https://scicloj.github.io/docs/community/groups/real-world-data/)
4175+
;; context, so feedback actually shapes what gets built.
4176+
4177+
;; Thanks to the AlgebraOfGraphics.jl folks for the inspiration, to Tableplot users
4178+
;; for the feedback that motivated this exploration, and to the Real-World Data group
4179+
;; for the space to try new ideas.
4180+
41334181
;; ---
4134-
;; *This is a design exploration. Feedback welcome!*
4182+
;;
4183+
;; **What comes next?** That depends on what we learn from sharing this work. For now,
4184+
;; this is a design exploration—a snapshot of our process, shared in the spirit of
4185+
;; collaborative development.
4186+
;;
4187+
;; *Feedback welcome. Let's see where this goes together.*

0 commit comments

Comments
 (0)