Bringing Modern JavaScript to the Jupyter Notebook

The Deno kernel is the freshest runtime for Jupyter

Kyle Kelley
Jupyter Blog

--

Visualizing Data via Deno, TypeScript, and VegaLite in JupyterLab

I never expected this.

Deno brings TypeScript, JavaScript, npm, and ES Modules to Jupyter with an easy to install kernel.

The Deno Kernel is the first language runtime with a builtin jupyter kernel.

There’s no better time to get started with Deno than now. Once deno is installed, run the deno jupyter kernel installation:

deno jupyter --unstable --install
Screen recording of clicking to select a kernel in VS Code. The users clicks “Select Kernel” in their notebook and a “Select Kernel” dialog comes up in the top middle. They click “Jupyter Kernel” and a listing of several Python kernels comes up. They select Deno and it drops them into the notebook. They type in console.log(“HOORAY!”) and run it. Out pops HOORAY!
Enabling Deno in VS Code

Since Deno supports web standards like fetch out of the box, loading data is simple and easy.

That’s so fetch

Not only is this a fast & secure runtime, it’s fun. The timing is great too — DataFrames aren’t just for Julia, Python, R, and Rust. Polars provides DataFrames for JavaScript.

Manipulating DataFrames in JavaScript

What’s surprising me is how easily I can use D3 with DataFrames.

D3 and Polars playing well together in a notebook

We can draw plots directly to a canvas.

as well as use any library that emits SVG

This enables a broad range of JavaScript developers and data professionals to iterate in a notebook writing documentation that runs.

If you want to explore and visualize data with JavaScript/TypeScript, check out Deno and their docs on getting started with Jupyter.

If you know Rust, come hack on Deno. If you don’t know rust, like me, come hack on Deno anyway. You can learn. The Deno team is a friendly group of people who believe deeply in the power of TypeScript, Jupyter, and standards.

You can also contribute by filing bugs, writing notebooks, and sharing the Deno kernel with others.

Jupyter Denos

Happy Notebooking!

--

--

Research Engineer with a ✨ of Design, Developer on @nteractio and @ProjectJupyter.