simon@metabase.com

@sbelak
Doing data science with
Clojure
My perspective
• Core developer at Metabase, an open source BI/analytics
tool. 3rd largest BI tool in the world. 21k+ companies use
us daily, including N26, Revolut, Swisscom, Confluent, …

• Built analytics department at GoOpti from the ground up

• Helped 20+ companies become data-driven
Goal: answer 80% of
questions stemming from
data in <20min
The analytics chasm
2 min 20 min project
Ideal. Almost real-time. Can be
done during brainstorming
without disrupting the flow.
:(
Added to roadmapSqueeze in
somewhere
in the day
Doing our job better is
often a matter of speed
and quantity
Clojure at a glance
• (lisp (running-on :JVM))
• Functional, dynamic, immutable

• Excellent concurrency and state-management primitives

• Unparalleled data manipulation
Affordances of our tools
shape how we approach
problems
Data frames considered
harmful
• Data frame (=table) conflates representation and
abstraction

• Clojure excels in structure manipulation/encoding
Composability is key to
quick iterating
• Curried versions where possible 

• ->> and partial friendly 

• Side benefit: consistent API
“This is possibly Clojure’s most important property: the
syntax expresses the code’s semantic layers. An
experienced reader of Clojure can skip over most of the
code and have a lossless understanding of its high- level
intent.”
— Z. Tellman, Elements of Clojure
Live programming
Catching errors early more
context easier debugging
faster iterating
The power of
sharing runtime
clojure.spec
Queryable data
descriptions
The ecosystem
What about ML?
Farm it out!
(to sklearn)
Mini compilers targeting
a specific library in
another language
huri.plot
• DSL that compiles to ggplot2

• Targets Gorilla REPL

• bar chart, scatter plot, line chart, box & violin plot,
heatmap, histogram
Takeouts
• Speed-of-answer matters 

• You don’t have to reinvent every wheel in Clojure 

• Clojure is fantastic at structure manipulation, play to its
strengths 

• Blurring the line between environment and work is 

a powerful idea
Questions
P.S. We’re hiring!
github.com/metabase/metabase

github.com/clojupyter/clojupyter

github.com/uncomplicate/neanderthal

github.com/scicloj

github.com/sbelak/huri

Doing data science with clojure