Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

scicloj/noj

Repository files navigation

ci workflow Clojars Project

Noj - a data science toolkit

Noj logo

Noj gets you started with Clojure for data and science.

  • You get a collection of good libraries out of the box which are tested and known-to-work-together
  • .. and documentation that shows you how to use the different libraries together
  • (and if you want: a 'devcontainer' setup which is known to work with the native parts of the libraries)

Noj is a Clojure library that is also released as a Jupyter kernel (see below). It includes the underlying libraries as dependencies, and adds documentation and integration tests (which are mostly derived from the documentation, thus verifying its correctness).

The included libraries

  • use tech.ml.dataset directly for tabular data structures or provide high interoperability with it
  • support kindly for visualisations of data
Website https://scicloj.github.io/noj/
Source (GitHub repo)
Deps Clojars Project
Tests ci workflow
License EPLv1.0
Status Beta stage.
Dev chat #noj-dev at Clojurians Zulip
User chat #data-science at Clojurians Zulip

Video tutorials

From raw data to a blog post, 2025-01-24

Noj v2 video tutorial

Clojure namespaces are Noj notebooks

Noj has Clay included, which takes a Clojure namespace and turns it into a notebook. To get started,

Run a 'Hello world'

From noj/releases, download noj-<version>-uber.jar into a local directory of your choice (replacing <version> with e.g. 2-beta15).

In your terminal, switch to that directory and run the following command:

java -cp noj-2-beta15-uber.jar clojupyter.cmdline eval '(str "Hello " "Noj!")'

A nice message should appear on your screen. In this way, without having to install the Clojure CLI, you can run a Clojure program, e.g. some hello.clj

java -cp noj-2-beta15-uber.jar clojupyter.cmdline eval '(load-file "hello.clj")'

that already has access to all Noj libraries. However, for a more readable output of your Clojure program files,

Use Clay with live-reload

Clay renders Clojure files as notebooks in the browser. One way to use Clay is by typing

java -jar noj-2-beta15-uber.jar hello.clj

Then, you can edit the file with any editor you they know and love and see the updating browser view. See the recent 🎥 Noj in a JAR video.

Clay can also be used in other modes, with mode detailed integration into the use of Clojure editors and REPLs -- see the Clay documentation and a video overview.

If you look for in-browser editing, one option is to

Install Jupyter

Noj also provides a kernel for Jupyter. Compared to Clay, the kernel supports most but not all data visualization kinds. We also would like to mention the ongoing efforts to support Colab, the hosted Jupyter service. However, to start with the more mature local version, you best start using a Python environment:

python3 -m venv python_venv
source python_venv/bin/activate
python3 -m pip install jupyterlab

Then, install the Noj Jupyter Kernel using the JAR file downloaded from the noj/releases:

java -cp noj-2-beta15-uber.jar clojupyter.cmdline install --jarfile noj-2-beta15-uber.jar --ident noj-2-beta15

Verify,

java -cp noj-2-beta15-uber.jar clojupyter.cmdline list-installs

and run Jupyter

jupyter lab

(Technical note: every notebook starts its own nREPL server. For details, ask on Zulipchat)

License

Copyright © 2025 Scicloj

EPLv1.0 is just the default for projects generated by clj-new: you are not required to open source this project, nor are you required to use EPLv1.0! Feel free to remove or change the LICENSE file and remove or update this section of the README.md file!

Distributed under the Eclipse Public License version 1.0.