Incanter and Statistical Computing in Clojure

Where Incanter still fits in Clojure, how to use its stats and chart modules, and how it compares with the newer Scicloj-centered data stack.

Incanter is an important part of Clojure’s data-science history, but it is no longer the default center of gravity for modern Clojure analytics work. That distinction is the main thing older tutorials miss. Incanter is still useful, still readable, and still perfectly capable for some local statistical tasks. But contemporary Clojure data work more often gathers around the broader Scicloj ecosystem and tech.ml.dataset-oriented tooling.

So the right way to teach Incanter in 2026 is neither “ignore it” nor “pretend it is the only serious option.” The better approach is to explain where it still shines, where it shows its age, and how to make a practical choice.

What Incanter Was Built To Do

The Incanter project describes itself as a Clojure-based, R-like statistical computing and graphics environment for the JVM. That framing still captures its appeal:

  • straightforward statistical functions
  • dataset-oriented workflow
  • JVM-native plotting and chart generation
  • good fit for small exploratory analyses and teaching examples

For a developer who wants to stay inside one Clojure process and perform quick statistical work, that can still be attractive.

Where Incanter Fits Today

Incanter is strongest when:

  • you are maintaining existing Incanter code
  • you want a lightweight statistical example inside a JVM application
  • you need a compact teaching tool for basic descriptive statistics or simple models
  • you want quick chart generation without designing a larger notebook workflow

It is weaker when:

  • the work depends on a broader modern data-science stack
  • you want strong notebook ergonomics and integrated exploratory workflows
  • you are building a larger tabular data pipeline around newer libraries
  • machine learning, model pipelines, and multi-library interop are central requirements

That is why the modern conversation usually includes Scicloj, Noj, scicloj.ml, and tech.ml.dataset-centric tools rather than treating Incanter as the default first stop.

Use a Current Project Shape

Older Incanter tutorials are often project.clj-first. A cleaner default now is deps.edn, and it is usually clearer to depend on the modules you actually need:

1{:paths ["src"]
2 :deps {org.clojure/clojure {:mvn/version "1.12.0"}
3        incanter/incanter-core {:mvn/version "1.9.3"}
4        incanter/incanter-stats {:mvn/version "1.9.3"}
5        incanter/incanter-charts {:mvn/version "1.9.3"}}}

That keeps the example aligned with the modern Clojure toolchain even if the library itself comes from an earlier era of the ecosystem.

A Small Example That Still Makes Sense

Here is the kind of job Incanter still handles well: summarize a small numeric sample and render a quick chart.

 1(ns myapp.stats
 2  (:require [incanter.stats :as stats]
 3            [incanter.charts :as charts]))
 4
 5(def latency-ms [82 79 90 88 77 84 95 91 80 86 83])
 6
 7(def summary
 8  {:mean (stats/mean latency-ms)
 9   :median (stats/median latency-ms)
10   :sd (stats/sd latency-ms)})
11
12(def histogram
13  (charts/histogram latency-ms
14                    :nbins 6
15                    :title "Latency Distribution"
16                    :x-label "Milliseconds"
17                    :y-label "Frequency"))

That example is good Incanter territory:

  • local data
  • standard descriptive statistics
  • quick visualization
  • no need for a broader notebook or ML pipeline

If your question is this small and this local, Incanter can still feel pleasantly direct.

Where The Older Model Shows Its Age

Incanter’s age becomes visible in three places.

Data Model Expectations

Modern Clojure data workflows more often revolve around richer, more interoperable tabular data tooling. In practice, many teams now want dataset abstractions that fit smoothly into a larger pipeline of cleaning, feature engineering, notebook exploration, and model training.

Visualization Expectations

Many older Incanter examples assume local windowed chart display as a normal default. That was more natural in an earlier JVM-centric analytics workflow. Today, browser-first and notebook-first flows are more common.

Broader Ecosystem Momentum

The Scicloj ecosystem now offers a more integrated story for:

  • tabular data handling
  • machine learning workflows
  • notebook-style work
  • combining multiple libraries behind a more coherent modern surface

That does not make Incanter “wrong.” It just changes the default recommendation.

    flowchart LR
	    A["Small Local Statistical Task"] --> B["Incanter Can Still Fit Well"]
	    A --> C["Larger Modern Data Workflow"]
	    C --> D["Scicloj / tech.ml.dataset / Noj Style Stack"]

The thing to notice is that the decision is driven by workflow shape, not by ideology.

A Practical Decision Rule

Choose Incanter when:

  • the task is small and statistics-first
  • the code already uses Incanter
  • the team wants a compact JVM-native example
  • teaching clarity matters more than stack breadth

Choose a more modern Scicloj-oriented path when:

  • you need stronger notebook and exploratory support
  • data preparation pipelines are central
  • you expect broader ML tooling integration
  • the work will live as an evolving data platform rather than a small local analysis

Incanter As A Historical Bridge

There is also a softer reason to keep Incanter in a guide like this: it helps explain how Clojure developers approached statistical computing before the newer Scicloj ecosystem matured. That historical bridge is useful. It shows how Clojure’s data story evolved rather than pretending the current stack appeared fully formed.

So this page should leave the reader with a balanced view:

  • Incanter still matters
  • Incanter is not the whole story anymore
  • modern Clojure data science has moved toward a broader stack

Key Takeaways

  • Incanter remains a usable Clojure library for local statistical computing and charting.
  • It is historically important, but it is no longer the default center of modern Clojure data work.
  • deps.edn is the better default for new examples, even when discussing older libraries.
  • Modern Clojure data-science workflows more often orbit around Scicloj and tech.ml.dataset-oriented tools.
  • Choose the tool based on workflow shape, not nostalgia or trend pressure.

References and Further Reading

Ready to Test Your Knowledge?

Loading quiz…
Revised on Thursday, April 23, 2026