<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Jupyter Blog - kernels</title><link href="https://blog.jupyter.org/" rel="alternate"/><link href="https://blog.jupyter.org/feeds/tag-kernels.atom.xml" rel="self"/><id>https://blog.jupyter.org/</id><updated>2026-10-01T04:00:00+00:00</updated><subtitle>Jupyter kernels, which run a notebook's code, in any language.</subtitle><entry><title>From Punch Cards to the Browser: Fortran Comes to JupyterLite</title><link href="https://blog.jupyter.org/posts/2026/from-punch-cards-to-the-browser-fortran-comes-to-jupyterlite/" rel="alternate"/><published>2026-10-01T04:00:00+00:00</published><updated>2026-10-01T04:00:00+00:00</updated><author><name>Anutosh Bhat</name></author><id>tag:blog.jupyter.org,2026-10-01:/posts/2026/from-punch-cards-to-the-browser-fortran-comes-to-jupyterlite/</id><summary type="html">&lt;p&gt;The LFortran kernel now runs entirely in your browser, with no installation and no server.&lt;/p&gt;
</summary><content type="html">&lt;figure&gt;
&lt;img alt="Fortran card" src="https://blog.jupyter.org/posts/2026/from-punch-cards-to-the-browser-fortran-comes-to-jupyterlite/images/r1z7339YGg.jpg" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Punched card from a Fortran program Z(1) = Y + W(1), plus sorting information in the last 8 columns - Arnold Reinhold, &lt;a href="https://en.wikipedia.org/wiki/Punched_card#/media/File:FortranCardPROJ039.agr.jpg"&gt;Wikimedia Commons&lt;/a&gt;, CC BY-SA 2.5&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="a-language-for-people-who-think-in-formulas"&gt;A language for people who think in formulas&lt;/h2&gt;
&lt;p&gt;In the early 1950s, programming meant writing numerical machine instructions by hand, one row at a time. John Backus, who led the effort that changed this at IBM, described the experience as “hand-to-hand combat with the machine.”&lt;/p&gt;
&lt;p&gt;In 1953 he proposed a different bargain: let scientists write programs the way they already wrote their mathematics — &lt;em&gt;as formulas&lt;/em&gt; — and let a machine do the translating. The skeptics said it could not work. Memory was scarce, computer time was precious, and code produced from anything readable by humans could surely never rival code crafted by hand. Three years later, in April 1957, IBM delivered the first &lt;strong&gt;FORTRAN&lt;/strong&gt; compiler for the IBM 704, and the skeptics were answered by the world’s first optimizing compiler, whose output ran nearly as fast as anything a hand-coder could produce.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2026/from-punch-cards-to-the-browser-fortran-comes-to-jupyterlite/images/BJpwuIKFGg.webp" alt="Fortran_logo.svg" width="200" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;The name was the whole idea: &lt;strong&gt;FORmula TRANslation&lt;/strong&gt;. Fortran let scientists and engineers work in the vocabulary of their own fields — arrays, floating-point numbers, complex arithmetic — rather than in registers and opcodes. It became the first programming language to be standardized, in 1966, and it has been actively maintained to this day (latest standard is 2023, next one in progress, targeted for 2028). Much of the software that runs on the world’s fastest computers is written in Fortran, and the dense numerical libraries that other languages call for their heavy lifting, LAPACK most prominently, are written in it too. If you have solved a linear system today, in Python or R or Julia, there is a decent chance Fortran did the work.&lt;/p&gt;
&lt;h2 id="the-other-half-of-scientific-computing"&gt;The other half of scientific computing&lt;/h2&gt;
&lt;p&gt;But Fortran was born in the batch era. Running a program meant keypunching a deck of cards, handing it to an operator, and coming back hours later, or the next day, to find out whether it had run at all. Computing meant deciding everything in advance.&lt;/p&gt;
&lt;p&gt;A second tradition grew out of the opposite frustration: computing as a conversation. Type an expression, look at the result, adjust, repeat. That impulse ran through time-sharing terminals, through Mathematica and MATLAB, and into IPython, first released in 2001, which grew into &lt;strong&gt;Project Jupyter&lt;/strong&gt;. The notebook, with code, results, and prose in a single living document, is now the default home of exploratory data analysis and computational science, and Jupyter’s architecture is deliberately language-agnostic: any language can implement a kernel and join the conversation. Python, Julia, and R most visibly; C++, Lua, and others besides.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2026/from-punch-cards-to-the-browser-fortran-comes-to-jupyterlite/images/Hkqa_LFYzx.webp" alt="labpreview" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;In notebooks, though, Fortran has been present but invisible: the compiled layer underneath NumPy and its cousins, reached through wrappers, glimpsed only when a profiler points at it. The language in which so much of numerical computing is actually written has rarely been the language you can sketch an idea in.&lt;/p&gt;
&lt;h2 id="interactive-fortran"&gt;Interactive Fortran&lt;/h2&gt;
&lt;p&gt;That is the gap &lt;strong&gt;LFortran&lt;/strong&gt; was built to close. LFortran is a modern, open-source (BSD-licensed) Fortran compiler built on LLVM, an optimizing compiler infrastructure several generations on from the one Backus’s team delivered for the IBM 704.  The question that compiler settled, whether code written for humans could run as fast as code written for the machine, is one its descendants answer routinely; what they rarely offer is a conversation.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2026/from-punch-cards-to-the-browser-fortran-comes-to-jupyterlite/images/S1XHFUKFfg.webp" alt="lfortran" width="200" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;What LFortran adds is exactly that second mode: alongside compiling Fortran to fast binaries for production work, it can evaluate code interactively, statement by statement, much like Python, Julia, or MATLAB.&lt;/p&gt;
&lt;p&gt;Once a language has an interpreter, a Jupyter kernel is a small step away: from the language’s point of view, the kernel’s job is only to receive a cell of code and return its results. LFortran has shipped with such a kernel for some time. It is built on &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;&lt;strong&gt;xeus&lt;/strong&gt;&lt;/a&gt;, a C++ implementation of the Jupyter kernel protocol that already powers a long list of kernels, including xeus-python, xeus-cling, and xeus-r. The protocol plumbing is taken care of, so the kernel can concentrate on Fortran itself, and a single &lt;code&gt;conda install -c conda-forge lfortran&lt;/code&gt; gives you both the compiler and the kernel.&lt;/p&gt;
&lt;h2 id="taking-the-kernel-to-the-browser"&gt;Taking the kernel to the browser&lt;/h2&gt;
&lt;p&gt;Today we are announcing &lt;a href="https://jupyterlite.readthedocs.io"&gt;JupyterLite&lt;/a&gt; support: the LFortran kernel now runs in &lt;strong&gt;JupyterLite&lt;/strong&gt;, a JupyterLab distribution that runs entirely in the browser. JupyterLite is served as a static website, with no Jupyter server, no container, and nothing provisioned on any machine.&lt;/p&gt;
&lt;p&gt;This matters because it changes not just what a notebook is, but how it can be shared. A notebook becomes something you can publish like any web page: static, lightweight, and infinitely scalable. Whether you’re hosting it on GitHub Pages, a university server, or a personal blog, you can serve thousands of users with minimal resources. There is no backend to manage, no accounts to create, no queues to wait in. The gap between “here is a notebook” and “here, try it” disappears, and with it, many of the barriers that have traditionally limited access to computational tools.&lt;/p&gt;
&lt;p&gt;This makes JupyterLite ideal for education, where students can experiment with code without installing anything; for live documentation, where readers can tweak and run examples from a project’s docs; and for citizen science, where communities can collaborate on data analysis without specialized infrastructure. Fortran, a language built for heavy computation, is now as accessible as a webpage.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2026/from-punch-cards-to-the-browser-fortran-comes-to-jupyterlite/images/Hkuk5Ittfg.webp" alt="1_1mHVBUr6tB3TP0Z1ujvdjw" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;Building the kernel on xeus carried it most of the way to the browser. The same xeus kernel code that ships on conda-forge for the desktop is built for WebAssembly by emscripten-forge and loaded into JupyterLite by jupyterlite-xeus, and many of the JupyterLite kernels available today are xeus kernels: Python, R, C++, Lua. The desktop and browser kernels are the same code.&lt;/p&gt;
&lt;p&gt;The last obstacle was the interesting one. In interactive mode, LFortran leans on LLVM’s just-in-time compilation: each cell is compiled as it arrives and executed on the spot. A browser will not do that. WebAssembly keeps code and data in separate address spaces, so a program cannot write machine code into its own memory and then jump to it, and the classic JIT move is unavailable. What the browser does allow is loading a module: new code enters a running WebAssembly program by being handed to the host and instantiated, never by being written into memory. The problem becomes one of routing the compiler’s output through that door.&lt;/p&gt;
&lt;p&gt;This is the wall xeus-cpp hit when it brought the clang-repl C++ interpreter to WebAssembly, and the solution here is the one devised there. Instead of executing generated code in place, the kernel passes it to the WebAssembly toolchain, itself compiled to WebAssembly and running in the same tab, which links it into a side module (the browser’s equivalent of a shared library) and loads it into the running kernel. Parsing, compilation, and linking all happen in the browser; the notebook’s program grows one module at a time.&lt;/p&gt;
&lt;h2 id="try-it"&gt;Try it&lt;/h2&gt;
&lt;p&gt;You can try it right now on &lt;a href="https://notebook.link"&gt;notebook.link&lt;/a&gt;, with nothing but a browser. Just click &lt;a href="https://notebook.link/@anutosh491/fortran"&gt;HERE&lt;/a&gt;! The demo ships with a handful of notebooks to start from, including a Mandelbrot example and one showing rich display output — plots and images rendered straight from Fortran cells.&lt;/p&gt;
&lt;p&gt;The kernel itself is available as a package on &lt;a href="https://emscripten-forge.org/"&gt;&lt;strong&gt;emscripten-forge&lt;/strong&gt;&lt;/a&gt;, a software distribution for WebAssembly. That means Fortran is now just another entry in an &lt;code&gt;environment.yml&lt;/code&gt;: any JupyterLite deployment built with jupyterlite-xeus can include it. The deployment is a static site you can host anywhere (GitHub Pages, a blog) with no server costs and no limits on the number of users. For a Fortran project, this could mean embedding live, executable examples directly in your documentation, letting users experiment with your code without ever leaving the browser.&lt;/p&gt;
&lt;p&gt;For a regular Jupyter installation, the kernel is still available the classic way:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;conda&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;-c&lt;span class="w"&gt; &lt;/span&gt;conda-forge&lt;span class="w"&gt; &lt;/span&gt;lfortran&lt;span class="w"&gt; &lt;/span&gt;jupyterlab
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="inside-the-lfortran-compiler"&gt;Inside the LFortran compiler&lt;/h2&gt;
&lt;p&gt;Another reason why LFortran is a particularly good fit for the notebook workflow lies in its compiler pipeline: its Abstract Semantic Representation, or ASR. While the AST records the syntax the user wrote, ASR records what the program means, with types, symbols, procedure interfaces, and other semantic information made explicit. LFortran can therefore perform high-level, Fortran-aware transformations on a valid program before lowering it to LLVM IR, leaving LLVM to handle lower-level optimization and code generation.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;Fortran source → AST → ASR → LLVM IR → native code / WebAssembly
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;For interactive use, each notebook cell has its own ASR translation unit. Its symbol table points to the translation unit from the preceding cell, forming a chain through the session. A cell can therefore use variables, modules, and procedures defined earlier, while redefining a name shadows the old definition instead of modifying code that has already been compiled. Cell-level symbols are given distinct generated names, allowing old and new definitions to remain alive at the same time. Once the current cell has been lowered to an LLVM module, it is handed to the native On Request Compilation (ORC) JIT or to the browser executor described above.&lt;/p&gt;
&lt;h2 id="epilogue"&gt;Epilogue&lt;/h2&gt;
&lt;p&gt;When Fortran arrived in 1957, using it meant punching cards, standing in line at the keypunch and the card reader, and waiting for the batch to come back around. Today it means opening a URL, typing a few lines, and pressing Shift+Enter. The formulas look much the same as they did sixty-nine years ago.&lt;/p&gt;
&lt;p&gt;What changed is everything around them.&lt;/p&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
&lt;h2 id="about-the-authors"&gt;About the authors&lt;/h2&gt;
&lt;p&gt;&lt;img src="https://blog.jupyter.org/posts/2026/from-punch-cards-to-the-browser-fortran-comes-to-jupyterlite/images/BJVhjIFtze.jpg" alt="ondrej" width="150" loading="lazy" data-body-image=""&gt;&lt;br&gt;
&lt;a href="https://ondrejcertik.com"&gt;Ondřej Čertík&lt;/a&gt; is the creator of LFortran, which he started in 2017 and has led ever since; he is also the original author of SymPy and SymEngine, a co-founder of the fortran-lang community, and a Principal Software Engineer at Microsoft.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://blog.jupyter.org/posts/2026/from-punch-cards-to-the-browser-fortran-comes-to-jupyterlite/images/SJ5tjLFtfl.jpg" alt="1_NpDAN0ssTEugOAgQJ279xA" width="150" loading="lazy" data-body-image=""&gt;&lt;br&gt;
&lt;a href="https://github.com/anutosh491"&gt;Anutosh Bhat&lt;/a&gt; did the work of bringing this kernel to the browser: he ported both xeus-cpp and the Fortran kernel to WebAssembly, and iterated extensively on the kernel itself. Anutosh is a scientific software engineer at QuantStack, an LLVM maintainer, and a co-author of xeus-cpp; his contributions span clang-repl, LLVM’s WebAssembly backend, and their packaging for emscripten-forge.&lt;/p&gt;
&lt;h2 id="acknowledgements"&gt;Acknowledgements&lt;/h2&gt;
&lt;p&gt;The work by Anutosh on the porting the LFortran kernel to WebAssembly was funded by &lt;a href="https://quantstack.net"&gt;QuantStack&lt;/a&gt;, the team behind JupyterLite, xeus, and the emscripten-forge distribution.&lt;/p&gt;
&lt;p&gt;LFortran itself is the product of many years of sustained work by more than 130 contributors, made possible by the support of the &lt;a href="https://www.sovereign.tech/"&gt;Sovereign Tech Agency&lt;/a&gt;; Los Alamos National Laboratory, which supported its early development; GSI Technology; FLOSS/fund; QuantStack; John D. Cook; NumFOCUS; and Google Summer of Code, through which many contributors first joined the project. We also thank the individuals and organizations who have sponsored LFortran through GitHub and OpenCollective.&lt;/p&gt;
</content><category term="JupyterLite"/><category term="kernels"/><category term="WebAssembly"/><category term="xeus"/></entry><entry><title>GNU Octave Meets JupyterLite: Compute Anywhere, Anytime!</title><link href="https://blog.jupyter.org/posts/2025/gnu-octave-meets-jupyterlite-compute-anywhere-anytime/" rel="alternate"/><published>2025-10-16T15:04:00+00:00</published><updated>2025-10-16T15:04:00+00:00</updated><author><name>Isabel Paredes</name></author><id>tag:blog.jupyter.org,2025-10-16:/posts/2025/gnu-octave-meets-jupyterlite-compute-anywhere-anytime/</id><summary type="html">&lt;p&gt;We are thrilled to announce the newest member of our JupyterLite kernel ecosystem: Xeus-Octave. Xeus-Octave allows you to run GNU Octave code directly on your browser. GNU Octave is a free and open-source Scientific Programming Language that can be used to run Matlab scripts.&lt;/p&gt;</summary><content type="html">&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/gnu-octave-meets-jupyterlite-compute-anywhere-anytime/images/001-1__Ha5vHmLH66mSH3WFg1fxg.jpg" alt="Octave-lite logo" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;We are thrilled to announce the newest member of our JupyterLite kernel ecosystem: &lt;strong&gt;Xeus-Octave&lt;/strong&gt;. Xeus-Octave allows you to run GNU Octave code directly on your browser. GNU Octave is a free and open-source Scientific Programming Language that can be used to run Matlab scripts. In this article, we present the challenges encountered when targeting WebAssembly, the current state of the Xeus-Octave kernel, and the future plans for expanding the GNU Octave ecosystem.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Earlier this year, we introduced the JupyterLite kernel for R, &lt;a href="https://blog.jupyter.org/posts/2025/r-in-the-browser-announcing-our-webassembly/"&gt;&lt;strong&gt;Xeus-R-Lite&lt;/strong&gt;&lt;/a&gt;. Much like R, cross-compiling GNU Octave to WebAssembly required the same custom toolchain to enable the compilation of Fortran code, combining LLVM Flang and Emscripten.&lt;/p&gt;
&lt;p&gt;Similar to many other mathematically oriented language packages, GNU Octave requires a BLAS/LAPACK implementation. Fortunately, OpenBLAS and the Netlib implementations of BLAS/LAPACK had already been added to the emscripten-forge WebAssembly distribution. Initially, OpenBLAS was the preferred implementation, but for the successful compilation of Octave, Netlib LAPACK was selected as it presented fewer hurdles during the build process.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="cross-compilation-of-gnu-octave"&gt;Cross-Compilation of GNU Octave&lt;/h2&gt;
&lt;p&gt;One of the complications of cross-compiling Octave to WebAssembly, which had not been encountered with the R source code, was the extensive use of Fortran common symbols blocks in the internal libraries of Octave such as odepack.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;liboctave&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;external&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;odepack&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;slsode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;
&lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="o"&gt;-----------------------------------------------------------------------&lt;/span&gt;
&lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;The&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;following&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;internal&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Common&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;block&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;contains&lt;/span&gt;
&lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;variables&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;which&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;are&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;local&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;any&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;subroutine&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;but&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;whose&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;values&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;must&lt;/span&gt;
&lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="n"&gt;be&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;preserved&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;between&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;calls&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;routine&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;own&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;variables&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;and&lt;/span&gt;
&lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;variables&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;which&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;are&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;communicated&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;between&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;subroutines&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;The&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;block&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;SLS001&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;declared&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;subroutines&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;SLSODE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;SINTDY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;SSTODE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;SPREPJ&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;SSOLSY&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Groups&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;variables&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;are&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;replaced&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;by&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;dummy&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;arrays&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Common&lt;/span&gt;
&lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;declarations&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;routines&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;where&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;those&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;variables&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;are&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;not&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;used&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="n"&gt;C&lt;/span&gt;&lt;span class="o"&gt;-----------------------------------------------------------------------&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="n"&gt;COMMON&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;SLS001&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;CONIT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;CRATE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;EL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ELCO&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;HOLD&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;RMAX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;TESCO&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;CCMAX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;EL0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;H&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;HMIN&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;HMXI&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;HU&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;RC&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;TN&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;UROUND&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;INIT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MXSTEP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MXHNIL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;NHNIL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;NSLAST&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;NYH&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;IALTH&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;IPUP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;LMAX&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MEO&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;NQNYH&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;NSLP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;ICF&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;IERPJ&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;IERSL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;JCUR&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;JSTART&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;KFLAG&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;L&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;LYH&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;LEWT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;LACOR&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;LSAVF&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;LWM&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;LIWM&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;METH&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MITER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;     &lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="w"&gt;   &lt;/span&gt;&lt;span class="n"&gt;MAXORD&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MAXCOR&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MSBP&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;MXNCF&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;N&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;NQ&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;NST&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;NFE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;NJE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;NQU&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Initially, it was not possible to cross-compile these common blocks to WebAssembly because the latest version of LLVM (v20 at the time of testing) did not support common symbol linkage.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;// Source: llvm/lib/MC/MCWasmStreamer.cpp&lt;/span&gt;
&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;MCWasmStreamer::emitCommonSymbol&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;MCSymbol&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;S&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;uint64_t&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;Size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                                      &lt;/span&gt;&lt;span class="n"&gt;Align&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;ByteAlignment&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="n"&gt;llvm_unreachable&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;&amp;quot;Common symbols are not yet implemented for Wasm&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;As a temporary solution, LLVM was patched with the help of &lt;a href="https://github.com/serge-sans-paille"&gt;Serge Guelton&lt;/a&gt; to simulate common symbols as weak symbols.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;void MCWasmStreamer::emitCommonSymbol(MCSymbol *S, uint64_t Size,
&lt;span class="w"&gt; &lt;/span&gt;                                     Align ByteAlignment) {
&lt;span class="gd"&gt;-  llvm_unreachable(&amp;quot;Common symbols are not yet implemented for Wasm&amp;quot;);&lt;/span&gt;
&lt;span class="gi"&gt;+  auto *Symbol = cast&amp;lt;MCSymbolWasm&amp;gt;(S);&lt;/span&gt;
&lt;span class="gi"&gt;+  getAssembler().registerSymbol(*Symbol);&lt;/span&gt;
&lt;span class="gi"&gt;+  Symbol-&amp;gt;setWeak(true);&lt;/span&gt;
&lt;span class="gi"&gt;+  Symbol-&amp;gt;setExternal(true);&lt;/span&gt;
}
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;A proper solution to enable support of common symbols is currently in progress and will likely be included in the next release of LLVM v22 (see &lt;a href="https://github.com/llvm/llvm-project/pull/151478"&gt;llvm-project/pull/151478&lt;/a&gt;). For curious readers, the patched version of LLVM can be found &lt;a href="https://github.com/IsabelParedes/llvm-project/releases/download/v20.1.7_emscripten-wasm32/llvm_emscripten-wasm32-20.1.7-h2e33cc4_5.tar.bz2"&gt;here&lt;/a&gt; (linux only).&lt;/p&gt;
&lt;p&gt;In addition to the patches for LLVM, GNU Octave required a few minor modifications to target WebAssembly; mainly this entailed disabling the GUI functionalities and consolidating the Fortran function signatures and calling conventions. A full list of patches can be found in the &lt;a href="https://github.com/emscripten-forge/recipes/tree/main/recipes/recipes_emscripten/octave/patches"&gt;recipe directory&lt;/a&gt; on emscripten-forge.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="xeus-octave"&gt;Xeus-Octave&lt;/h2&gt;
&lt;p&gt;Once GNU Octave had been successfully packaged for WebAssembly, bringing &lt;a href="https://github.com/jupyter-xeus/xeus-octave"&gt;Xeus-Octave&lt;/a&gt; to JupyterLite was a simple matter of adding a recipe to &lt;a href="https://github.com/emscripten-forge/recipes/"&gt;emscripten-forge&lt;/a&gt;!&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="A JupyterLite notebook demonstrating plots with Xeus-Octave" src="https://blog.jupyter.org/posts/2025/gnu-octave-meets-jupyterlite-compute-anywhere-anytime/images/002-1_lKsfXJGc7_tM1ONU5Ej0Ng.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;&lt;a href="https://jupyter-xeus.github.io/xeus-octave/lab/?path=xeus-octave-wasm.ipynb"&gt;&lt;strong&gt;Try Xeus-Octave in JupyterLite!&lt;/strong&gt;&lt;/a&gt;&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;hr&gt;
&lt;h2 id="future-work"&gt;Future Work&lt;/h2&gt;
&lt;p&gt;For our next steps, the team is planning on expanding the Octave ecosystem by adding Octave packages to both conda-forge and emscripten-forge. The packaging work will require defining a process where Octave packages can be installed in predetermined conda environments, perhaps with some minor modifications to the existing pkg utility.&lt;/p&gt;
&lt;hr&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
&lt;h2 id="about-the-author"&gt;About the Author&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Isabel Paredes&lt;/strong&gt;, who led the charge on bringing GNU Octave to emscripten-forge, is a senior scientific software developer at QuantStack. Prior to working on this project, she focused on porting the R programming language and the Robot Operating System (ROS) framework to WebAssembly.&lt;/p&gt;
&lt;h2 id="acknowledgments"&gt;Acknowledgments&lt;/h2&gt;
&lt;p&gt;This project synthesizes work from many open-source contributors.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/emscripten-forge/recipes/"&gt;&lt;strong&gt;Emscripten-forge&lt;/strong&gt;&lt;/a&gt;, the distribution of conda packages for WebAssembly, was created by Thorsten Beier, who continues to lead the project. Many recipes were contributed by Isabel Paredes, Anutosh Bhat, Martin Renou, Ian Thomas, Wolf Vollprecht, and Johan Mabille.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://jupyterlite.readthedocs.io/en/stable/?badge=latest"&gt;&lt;strong&gt;JupyterLite&lt;/strong&gt;&lt;/a&gt;, the Jupyter distribution that runs entirely in the web browser, was created by Jeremy Tuloup.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jupyter-xeus/xeus"&gt;&lt;strong&gt;Xeus&lt;/strong&gt;&lt;/a&gt;, the C++ library implementing the Jupyter kernel protocol, enabling a custom communication layer, and is foundational to kernels like xeus-r, xeus-python, running in JupyterLite, was created by Johan Mabille and is maintained by a broader team including Martin Renou, Sylvain Corlay, and Thorsten Beier, who worked on the first integration with JupyterLite.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jupyter-xeus/xeus-octave"&gt;&lt;strong&gt;Xeus-Octave&lt;/strong&gt;&lt;/a&gt;, the Xeus-based Jupyter kernel for GNU Octave, was created by Giulio Girardi and Antoine Prouvost.&lt;/li&gt;
&lt;/ul&gt;
</content><category term="JupyterLite"/><category term="kernels"/><category term="WebAssembly"/><category term="xeus"/></entry><entry><title>C++ in Jupyter — Interpreting C++ in the Web</title><link href="https://blog.jupyter.org/posts/2025/c-in-jupyter-interpreting-c-in-the-web/" rel="alternate"/><published>2025-06-19T15:29:00+00:00</published><updated>2025-06-19T15:29:00+00:00</updated><author><name>Anutosh Bhat</name></author><id>tag:blog.jupyter.org,2025-06-19:/posts/2025/c-in-jupyter-interpreting-c-in-the-web/</id><summary type="html">&lt;p&gt;A Jupyter kernel for C++ running in the Web browser&lt;/p&gt;
</summary><content type="html">&lt;p&gt;Scientists and engineers utilize programming languages not only to build software systems but also to drive interactive exploratory workflows. They leverage developer tools to explore and reason through problems effectively. This process involves executing code, examining visualizations, loading data, and running additional code. Rapid iteration is particularly crucial during the exploratory phase of any technical project.&lt;/p&gt;
&lt;p&gt;For this reason, the most popular tools for exploratory work tend to be interpreted languages, such as Python or R. The “Read-Eval-Print-Loop” (REPL) places the user at the center of these iterative workflows. While compiled languages such as C++ are essential for performance-sensitive applications, engineers accustomed to interactive tools often struggle in such environments.&lt;/p&gt;
&lt;p&gt;At CERN, the C++ programming language has been pivotal to their data analysis platform for particle physics, notably in the ROOT framework. ROOT is underpinned by the Cling C++ interpreter, which is built on the Clang and LLVM stack. The Cling interpreter, co-created by Vassil Vassilev and Axel Naumann in the 2010s, effectively turned C++ into an agile scientific scripting language!&lt;/p&gt;
&lt;p&gt;These interactive workflows are where the Jupyter stack shines compared to traditional IDEs. Indeed, the Jupyter project was designed with exploratory computing in mind. Crucially, it was built from the ground up to be language-agnostic, accommodating multiple programming languages seamlessly. In 2017, the Xeus-Cling Jupyter kernel &lt;a href="https://blog.jupyter.org/posts/2017/interactive-workflows-for-c-with-jupyter/"&gt;was announced&lt;/a&gt;. Developed by Sylvain Corlay, Johan Mabille and Loic Gouarin, it integrated Cling in the Jupyter ecosystem, taking advantage of the rich features of Jupyter, such as rich mime type display and interactive widgets.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="An example C++ Jupyter notebook powered by the original Xeus-Cling kernel" src="https://blog.jupyter.org/posts/2025/c-in-jupyter-interpreting-c-in-the-web/images/001-0_WCAlh5DEa7IT27u3.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;An example C++ Jupyter notebook powered by the original Xeus-Cling kernel&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Packaging the Cling project proved challenging as it required patching the code base of Clang, and was not released as frequently as the LLVM stack, causing difficulties with rolling software distributions like conda-forge.&lt;/p&gt;
&lt;p&gt;In an effort led by Cling co-creator Vassil Vassilev, the &lt;a href="https://clang.llvm.org/docs/ClangRepl.html"&gt;Clang-Repl&lt;/a&gt; project was born, which consists in building the foundations for interactive C++ in the core of Clang. Clang-Repl has been undergoing active development for a few years now and a Jupyter kernel for Clang-Repl, &lt;a href="https://github.com/compiler-research/xeus-cpp"&gt;Xeus-Cpp&lt;/a&gt;, has also been developed, providing a similar set of features to Xeus-Cling.&lt;/p&gt;
&lt;p&gt;Building the new C++ kernel upon Xeus was crucial as it enabled the porting of the C++ kernel to the Web browser with JupyterLite.&lt;/p&gt;
&lt;h2 id="scaling-jupyter-with-jupyterlite"&gt;Scaling Jupyter with JupyterLite&lt;/h2&gt;
&lt;p&gt;The standard approach for Jupyter-based computing relies on providing each user with computing resources in the backend. Serving a few thousand end users necessitates substantial resources and complex deployment strategies.&lt;/p&gt;
&lt;p&gt;The JupyterLite project shifts this paradigm by running code directly in the user’s Web browser, by relying on a WebAssembly build of the kernel and required libraries. This eliminates the linear relationship between the number of users and the required resources.&lt;/p&gt;
&lt;p&gt;For instance, the NumPy.org website features a JupyterLite code console on its main page, offering a computational environment to thousands of monthly visitors without incurring any cloud costs. Similarly, the Capytale deployment of Jupyter, used in French high schools, operates on the same model. It accounts for over half a million registered users and hosts more than 200,000 user sessions weekly.&lt;/p&gt;
&lt;p&gt;In order to provide a broad range of packages and libraries for this new platform, the &lt;a href="https://jupyterlite.readthedocs.io/en/stable/"&gt;JupyterLite&lt;/a&gt; team at &lt;a href="https://quantstack.net/"&gt;QuantStack&lt;/a&gt; developed the &lt;a href="https://emscripten-forge.org/"&gt;Emscripten-forge&lt;/a&gt; distribution, utilizing the conda package manager for creating WebAssembly environments. Emscripten-forge comprises the main packages of the Python scientific computing ecosystem, as well as the R programming language, and several command-line applications powering the JupyterLite terminal.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Today, we are proud to announce that Xeus-Cpp and LLVM are available in emscripten-forge, effectively enabling interpreted C++ in the browser.&lt;/em&gt;&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="The new C++ Jupyter kernel in action in JupyterLite." src="https://blog.jupyter.org/posts/2025/c-in-jupyter-interpreting-c-in-the-web/images/002-0_XLTuIN3E7_64kPcO.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;The new C++ Jupyter kernel in action in JupyterLite.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Feel free to try it out in your browser by clicking the link below!&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;a href="https://compiler-research.org/xeus-cpp-wasm/lab/index.html"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/c-in-jupyter-interpreting-c-in-the-web/images/003-1_gNg6NzVjE9nwIF9PSdt-jA.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We now dive into the details on the internals of the WebAssembly build of Xeus-Cpp, and the key features of the project.&lt;/p&gt;
&lt;h2 id="walking-up-the-stack"&gt;Walking up the stack&lt;/h2&gt;
&lt;h3 id="emulated-just-in-time-compilation-and-webassembly"&gt;Emulated Just-in-Time Compilation and WebAssembly&lt;/h3&gt;
&lt;p&gt;A fundamental challenge inherent to the WebAssembly is that it operates in a &lt;strong&gt;sandboxed Harvard architecture&lt;/strong&gt;: code and data reside in completely distinct memory spaces. This makes conventional &lt;strong&gt;JIT compilation&lt;/strong&gt; unfeasible in the browser, as it prohibits dynamic modification of executable memory.&lt;/p&gt;
&lt;p&gt;The WebAssembly backend for Clang-Repl was introduced during the LLVM 17 development cycle, with the introduction of a WASM-specific &lt;strong&gt;IncrementalExecutor&lt;/strong&gt;, sidestepping the standard LLVM JIT approach used on native platforms. This new &lt;strong&gt;WasmIncrementalExecutor&lt;/strong&gt; class handled the WebAssembly-specific execution model as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The LLVM IR from the REPL’s Partial Translation Unit (PTU) is compiled into an object file.&lt;/li&gt;
&lt;li&gt;This object file is passed to wasm-ld with flags to generate a standalone WebAssembly module.&lt;/li&gt;
&lt;li&gt;The resulting .wasm module acts as a dynamically linked side module, designed to be loaded on top of a persistent main module at runtime.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These side modules, while similar to shared libraries, are treated as auxiliary WASM modules that are dynamically attached to the main application using Emscripten’s dlopen mechanism. They share memory with the main module and can resolve symbols defined in previous executions. As a result, each REPL input produces a corresponding .wasm module that is compiled, linked, and loaded at runtime, incrementally extending the current execution environment.&lt;/p&gt;
&lt;p&gt;Following the initial version in LLVM 17, the support for WebAssembly was incrementally consolidated by a series of pull requests addressing various issues and corner cases with respect to symbol duplication, memory corruption, and dynamic linking failures. We believe the version available today in LLVM 20 is a solid foundation to build upon.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/llvm/llvm-project/pull/86402"&gt;PR #86402 — Initial WebAssembly support for clang-repl&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/llvm/llvm-project/pull/113446"&gt;PR #113446 — Fix undefined lld::wasm::link symbol&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/llvm/llvm-project/pull/116735"&gt;PR #116735 — Improve flags responsible for generating shared wasm binaries&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/llvm/llvm-project/pull/117978"&gt;PR #117978 — Fix generation of wasm binaries&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/llvm/llvm-project/pull/118107"&gt;PR #118107 — Remove redundant shared flag while running clang-repl in browser&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For a deeper understanding of the constraints of the WebAssembly platform for JIT compilation, refer to the GSOC report: &lt;a href="https://compiler-research.org/assets/presentations/Anubhab_Ghosh_wasm_clangrepl.pdf"&gt;Anubhab Ghosh — WASM Clang-Repl&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id="porting-xeus-cpp-to-emscripten-forge"&gt;Porting Xeus-Cpp to Emscripten-forge&lt;/h3&gt;
&lt;p&gt;In addition to challenges with emulating JIT compilation in WebAssembly, packaging Xeus-Cpp for emscripten-forge presented another challenge: managing shared objects within the initial WebAssembly executable, which are typically built statically for other xeus kernels. This issue was addressed in the following PRS:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/jupyterlite/xeus/pull/145"&gt;PR #145 — Handle .data file for kernels that require preloading&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jupyterlite/xeus/pull/146"&gt;PR #146 - Kernel shared libs handling&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;As a result of this work, required side modules are now specified as metadata in the Jupyter kernelspec &lt;a href="https://github.com/compiler-research/xeus-cpp/blob/main/share/jupyter/kernels/xcpp23/wasm_kernel.json.in#L12"&gt;kernel.json&lt;/a&gt; file, enabling JupyterLite to automatically detect and utilize them.&lt;/p&gt;
&lt;h2 id="features"&gt;Features&lt;/h2&gt;
&lt;h3 id="inline-documentation"&gt;Inline documentation&lt;/h3&gt;
&lt;p&gt;To fully integrate C++ as a first-class citizen within the Jupyter ecosystem, supporting inline documentation is crucial. Similar to the Python kernel, utilizing the ? magic command should allow users to inspect the following type, perform a lookup in the available documentation, and display the relevant information.&lt;/p&gt;
&lt;p&gt;The C++ kernel comes equipped with a lookup file for the standard library, making it possible to execute queries like &lt;strong&gt;?std::vector&lt;/strong&gt; seamlessly.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Inline help feature in the C++ JupyterLite kernel" src="https://blog.jupyter.org/posts/2025/c-in-jupyter-interpreting-c-in-the-web/images/004-0_j7LvIkaUDbSD0urz.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Inline help feature in the C++ JupyterLite kernel&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;This can be enabled for third-party libraries. Check out the &lt;a href="https://xeus-cpp.readthedocs.io/en/latest/inline_help.html"&gt;documentation&lt;/a&gt; to enable inline help for your package.&lt;/p&gt;
&lt;p&gt;This feature, inherited from the Xeus-Cling project, was initially created by &lt;strong&gt;Loic Gouarin&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id="rich-display"&gt;Rich display&lt;/h3&gt;
&lt;p&gt;One of the core benefits of integrating C++ into the Jupyter ecosystem is the ability to leverage Jupyter’s rich MIME display system. Rather than limiting output to plain text, Xeus-Cpp allows you to render rich content like &lt;strong&gt;images, HTML tables, LaTeX&lt;/strong&gt;, or even &lt;strong&gt;custom visualizations&lt;/strong&gt;, all directly from C++.&lt;/p&gt;
&lt;p&gt;This is made possible by the function xcpp::display, which sends a &lt;em&gt;MIME bundle&lt;/em&gt; to the frontend. Each bundle can include multiple representations of the same object, such as &lt;strong&gt;text/plain&lt;/strong&gt;, &lt;strong&gt;image/png&lt;/strong&gt;, or even custom mime types.&lt;/p&gt;
&lt;p&gt;This is illustrated in the following example:&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Rich mime type rendering feature of the Xeus-Cpp kernel" src="https://blog.jupyter.org/posts/2025/c-in-jupyter-interpreting-c-in-the-web/images/005-0_icsXc3d2vC5OTF1K.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Rich mime type rendering feature of the Xeus-Cpp kernel&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;A custom renderer for any given type can be defined by defining the &lt;strong&gt;mime_bundle_repr&lt;/strong&gt; function in the corresponding namespace, which is then picked up by Xeus-Cpp’s display system through Argument-Dependent Lookup (ADL). A large collection of mime types are supported by the JupyterLab frontend, which can also be extended with plugins to support custom mime types.&lt;/p&gt;
&lt;h3 id="advanced-graphics"&gt;Advanced Graphics&lt;/h3&gt;
&lt;p&gt;Another compelling example leveraging the rich rendering capabilities, is to combine it with frameworks such as SDL for rich graphic content. Emscripten has built-in support for SDL (enabled with the &lt;strong&gt;-s USE_SDL=2&lt;/strong&gt; compilation flag), which allows us to leverage its power in C++ notebooks.&lt;/p&gt;
&lt;p&gt;To illustrate this, we ported &lt;strong&gt;Kevin Beason’s legendary &lt;a href="https://www.kevinbeason.com/smallpt/"&gt;smallpt&lt;/a&gt; global illumination renderer&lt;/strong&gt; (a path tracer in 99 lines of C++) into a C++ notebook. The scene is rendered using SDL onto an in-memory canvas, and the resulting image is captured and displayed with &lt;strong&gt;xcpp::display&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This setup showcases the seamless integration of SDL and the Jupyter display system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use SDL for &lt;strong&gt;real-time or offscreen rendering&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Then pipe the result through xcpp::display(…) as a PNG or pixel buffer.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://github.com/compiler-research/xeus-cpp/pull/299"&gt;PR #299&lt;/a&gt; added an example notebook supporting smallpt with SDL-based rendering. Feel free to access the notebook through our &lt;a href="https://compiler-research.org/xeus-cpp/lab/index.html"&gt;lite link&lt;/a&gt;. Since the number of samples per pixel (spp) directly correlates with how long the process runs (approximately 2 minutes in our case), we’ve included debug logs to keep users informed during rendering, so they aren’t left wondering about the progress.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Smallpt tiny raytracer in action in JupyterLite" src="https://blog.jupyter.org/posts/2025/c-in-jupyter-interpreting-c-in-the-web/images/006-0_OrN0HWXlcMjemfj6.jpg" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Smallpt tiny raytracer in action in JupyterLite&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;This approach paves the way for interactive C++ graphics demos, ray tracing notebooks, and even the prototyping of browser-based video games from within WebAssembly C++ notebooks.&lt;/p&gt;
&lt;h3 id="loading-third-party-libraries"&gt;Loading Third-Party Libraries&lt;/h3&gt;
&lt;p&gt;For a user’s perspective, a key difference between a Jupyter kernel for a compiled language like C++ and e.g. Python concerns how third-party libraries can be utilized. In Python, one merely needs to import the relevant installed packages, while in the case of C++, the relevant compiled libraries must be loaded in addition to including the corresponding headers.&lt;/p&gt;
&lt;p&gt;Thankfully, Clang-Repl provides the &lt;strong&gt;LoadDynamicLibrary&lt;/strong&gt; to dynamically load shared objects, which was adapted to the WebAssembly based in &lt;a href="https://github.com/llvm/llvm-project/pull/133037"&gt;LLVM PR #133037&lt;/a&gt;. Instead of relying directly on raw dlopen calls, this function ensures that memory layout, symbol resolution, and constructor invocation are handled correctly — even in a WebAssembly environment.&lt;/p&gt;
&lt;p&gt;Building on top of this, the CppInterOp project made these features available via a high-level C++ API.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Showcasing the dynamic loading of shared objects with CppInterOp" src="https://blog.jupyter.org/posts/2025/c-in-jupyter-interpreting-c-in-the-web/images/007-0_O4xsKujuUwCvMVSq.jpg" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Showcasing the dynamic loading of shared objects with CppInterOp&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Library authors interested in facilitating the use of their package with the Jupyter kernel can include the calls to CppInterop’s &lt;strong&gt;LoadLibrary&lt;/strong&gt; can simply be included in user-facing headers.&lt;/p&gt;
&lt;p&gt;This has been done for example, in the Symengine library.&lt;/p&gt;
&lt;h3 id="symbolic-computing-with-symengine"&gt;Symbolic Computing with Symengine&lt;/h3&gt;
&lt;p&gt;A compelling example of the Jupyter rich display system’s advanced capabilities with Xeus-Cpp is the &lt;a href="https://github.com/symengine/symengine"&gt;&lt;strong&gt;SymEngine&lt;/strong&gt;&lt;/a&gt; package, a powerful C++ library for symbolic computing.&lt;/p&gt;
&lt;p&gt;Originally designed as a backend for symbolic Python libraries like SymPy, SymEngine offers native support for expression trees, calculus and Latex/MathJax rendering of mathematical expressions. We have integrated SymEngine into the emscripten-forge distribution, making it readily available for use. Once installed, it works seamlessly with Xeus-Cpp, requiring no additional setup.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SymEngine expressions can be rendered via xcpp::display()&lt;/strong&gt;, which produces LaTeX-formatted expressions and delegates their rendering to &lt;strong&gt;MathJax&lt;/strong&gt; in the frontend.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Rich mime type rendering used with Symengine" src="https://blog.jupyter.org/posts/2025/c-in-jupyter-interpreting-c-in-the-web/images/008-0_7E9I9OxKKGqDK_Og.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Rich mime type rendering used with Symengine&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h3 id="array-based-computing"&gt;Array-based Computing&lt;/h3&gt;
&lt;p&gt;Jupyter notebooks are particularly popular among data scientists, students, and practitioners of scientific computing. &lt;strong&gt;Array-based computing&lt;/strong&gt; is at the center of the practice, be it in Python with NumPy, in R, GNU Octave, or Julia.&lt;/p&gt;
&lt;p&gt;A framework for array-based computing is C++ is &lt;strong&gt;Xtensor&lt;/strong&gt;. Xtensor’s syntax closely mirrors that of NumPy, supporting features like array broadcasting, lazy evaluation, and element-wise operations with an idiomatic C++ API. Using Xtensor in combination with the C++ Jupyter kernel provides a similar user experience to that of NumPy with the Python Jupyter kernel.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="JupyterLite used in combination with Xtensor, utilizing rich display for tables." src="https://blog.jupyter.org/posts/2025/c-in-jupyter-interpreting-c-in-the-web/images/009-0_jbBM7zjHznUTxDmp.jpg" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;JupyterLite used in combination with Xtensor, utilizing rich display for tables.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Built on top of Xtensor, &lt;strong&gt;Xtensor-BLAS&lt;/strong&gt; brings the &lt;strong&gt;high-level syntax of Xtensor&lt;/strong&gt; with the &lt;strong&gt;performance of OpenBLAS&lt;/strong&gt;. It provides convenient, NumPy-style access to BLAS and LAPACK routines making operations like matrix inversion or system solving easy to express and execute.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="JupyterLite used in combination with Xtensor-BLAS" src="https://blog.jupyter.org/posts/2025/c-in-jupyter-interpreting-c-in-the-web/images/010-0_Y0RXrB1PrRoP7fQ3.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;JupyterLite used in combination with Xtensor-BLAS&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;To use these libraries inside a JupyterLite notebook, all you need is to include Xtensor-BLAS in your environment (available via emscripten-forge). Under the hood, Xtensor-BLAS dynamically loads &lt;strong&gt;libopenblas&lt;/strong&gt;, which is bundled automatically as a dependency.&lt;/p&gt;
&lt;h3 id="simd-acceleration"&gt;SIMD Acceleration&lt;/h3&gt;
&lt;p&gt;We can take a step further with &lt;strong&gt;SIMD (Single Instruction, Multiple Data)&lt;/strong&gt; acceleration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Using raw WebAssembly intrinsics :&lt;/strong&gt; WebAssembly includes 128-bit SIMD instructions, which are provided in Clang’s &lt;strong&gt;&amp;lt;wasm_simd128.h&amp;gt;&lt;/strong&gt; header. They can be used to perform vectorized operations directly.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Xeus-Cpp kernel showcasing the use of SIMD instructions" src="https://blog.jupyter.org/posts/2025/c-in-jupyter-interpreting-c-in-the-web/images/011-0_PyE8StfrE9f5s7g8.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Xeus-Cpp kernel showcasing the use of SIMD instructions&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Using Xsimd:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Rewriting specialized vectorized routines for WebAssembly can be cumbersome. This is where frameworks like &lt;a href="https://github.com/xtensor-stack/xsimd"&gt;&lt;strong&gt;Xsimd&lt;/strong&gt;&lt;/a&gt; come in. It provides a high-level SIMD API in C++ that abstracts platform-specific SIMD instructions. With Xsimd, you can efficiently operate on batches of numbers using familiar arithmetic operators or mathematical functions, while benefiting from optimized performance under the hood.&lt;/p&gt;
&lt;p&gt;Xsimd powers SIMD acceleration in Xtensor and is also used in many other projects, including Apache Arrow, Firefox, Velox, Pythran, and Krita. Here’s how the same example would look when when using Xsimd instead of raw intrinsics:&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Xeus-Cpp kernel showcasing the Xsimd library" src="https://blog.jupyter.org/posts/2025/c-in-jupyter-interpreting-c-in-the-web/images/012-0_cmTseJsCeHr02SRp.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Xeus-Cpp kernel showcasing the Xsimd library&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h3 id="magic-commands"&gt;Magic Commands&lt;/h3&gt;
&lt;p&gt;In addition to interpreting standard C++ code, Xeus-Cpp also supports &lt;strong&gt;magic commands&lt;/strong&gt;, special notebook commands prefixed with % or %% that allow for extended functionality not defined by the C++ language itself.&lt;/p&gt;
&lt;p&gt;These magics let you interact with the runtime environment, manage files, or perform meta-operations, all from within a code cell. The following magics are available:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;%file :&lt;/strong&gt; The %file magic enables file creation and editing directly from a code cell. You can append to an existing file using the &lt;strong&gt;-a&lt;/strong&gt; flag&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Using the %file magics in Xeus-Cpp-lite" src="https://blog.jupyter.org/posts/2025/c-in-jupyter-interpreting-c-in-the-web/images/013-0_-sOa-yVDMKuTdJ6R.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Using the %file magics in Xeus-Cpp-lite&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;%timeit :&lt;/strong&gt; A %timeit magic has also been prototyped via &lt;a href="https://github.com/compiler-research/xeus-cpp/pull/289"&gt;PR #289&lt;/a&gt; by &lt;a href="https://github.com/kr-2003"&gt;@kr-2003&lt;/a&gt;, enabling performance measurement for expressions in the notebook.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;However, due to the lack of &lt;strong&gt;last value printing support&lt;/strong&gt; in Clang-Repl, this feature currently relies on a workaround and hasn’t yet been merged. Once upstream support is in place, %timeit will be integrated cleanly and available out of the box.&lt;/p&gt;
&lt;p&gt;Here’s a preview of the %timeit magic in action:&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Using the %timeit magics in Xeus-Cpp-lite" src="https://blog.jupyter.org/posts/2025/c-in-jupyter-interpreting-c-in-the-web/images/014-1_TxNBjy8ovN1LbrQ1UYejAQ.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Using the %timeit magics in Xeus-Cpp-lite&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Magic commands open the door to a more expressive and interactive notebook experience for C++. While support is currently limited to a few core magics, this is just the beginning — with more capabilities and enhancements expected in the near future.&lt;/p&gt;
&lt;h3 id="interactive-widgets"&gt;Interactive Widgets&lt;/h3&gt;
&lt;p&gt;Beyond rich mime type rendering and inline documentation, the Jupyter widgets system allows users to create interactive components in the Jupyter notebook, leveraging by-directional communication with the kernel for more interactivity.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://github.com/jupyter-xeus/xwidgets"&gt;&lt;strong&gt;xwidgets&lt;/strong&gt;&lt;/a&gt; package is a C++ implementation of the Jupyter widget protocol, comprising an implementation of all the core Jupyter widgets, and which underlies other interactive visualization libraries like &lt;a href="https://github.com/jupyter-xeus/xleaflet"&gt;&lt;strong&gt;xleaflet&lt;/strong&gt;&lt;/a&gt; or &lt;a href="https://github.com/jupyter-xeus/xcanvas"&gt;&lt;strong&gt;xcanvas&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here are a couple examples demonstrating interactive widgets through xwidgets &amp;amp; xcanvas with Xeus-Cpp-lite.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Displaying a slider using xwidgets" src="https://blog.jupyter.org/posts/2025/c-in-jupyter-interpreting-c-in-the-web/images/015-1_uJRTSmvJ8OgZbDLliI5BkQ.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Displaying a slider using xwidgets&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure&gt;
&lt;img alt="Displaying a canvas through xcanvas" src="https://blog.jupyter.org/posts/2025/c-in-jupyter-interpreting-c-in-the-web/images/016-1_w-SeiUeAmHPcMeIY84tb0w.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Displaying a canvas through xcanvas&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;If you inspect the codebase of xwidgets or xcanvas, you will notice that it contains very little code. All that is required on the C++ end is a declaration of the attributes that should be synchronized with the frontend, and serialization methods for complex data types.&lt;/p&gt;
&lt;p&gt;Most of the programmatic logic for Jupyter interactive widgets lies in the frontend implementation. The consequence for the C++ Jupyter kernel is that with seemingly little implementation effort, we could enable an entire ecosystem of widget libraries, covering a large range of use cases. Interactive widgets for 2-D plotting (&lt;strong&gt;bqplot&lt;/strong&gt;, &lt;strong&gt;plotly&lt;/strong&gt;) and 3-D plotting (&lt;strong&gt;ipyvolume&lt;/strong&gt;), GIS (&lt;strong&gt;ipyleaflet&lt;/strong&gt;), efficient rendering of meshes (&lt;strong&gt;ipygany&lt;/strong&gt;), graph visualization (&lt;strong&gt;ipycytoscape&lt;/strong&gt;), and many more could be almost automatically connected to the C++ world.&lt;/p&gt;
&lt;h2 id="how-to-deploy-jupyterlite-with-xeus-cpp"&gt;How to deploy JupyterLite with Xeus-Cpp&lt;/h2&gt;
&lt;p&gt;The GitHub repository &lt;a href="https://github.com/jupyterlite/xeus-lite-demo"&gt;https://github.com/jupyterlite/xeus-lite-demo&lt;/a&gt; is a template for creating a JupyterLite deployment on GitHub pages that includes the packages specified in a conda environment.&lt;/p&gt;
&lt;p&gt;The process is as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a new repository from the GitHub template.&lt;/li&gt;
&lt;li&gt;Enable the deployment on GitHub pages from a GitHub action, as shown in the README.&lt;/li&gt;
&lt;li&gt;Edit the environment file to include the desired packages.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For example, to deploy an C++ kernel with Symengine &amp;amp; Xtensor-blas installed, the environment.yml file would contain the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;xeus-cpp&lt;/span&gt;
&lt;span class="nt"&gt;channels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;https://repo.prefix.dev/emscripten-forge-dev&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;conda-forge&lt;/span&gt;
&lt;span class="nt"&gt;dependencies&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;xeus-cpp&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;symengine&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;xtensor-blas&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The deployment linked at the beginning of this article was created with this template.&lt;/p&gt;
&lt;h2 id="future-work"&gt;Future work&lt;/h2&gt;
&lt;p&gt;The journey of interactive C++ in Jupyter, both natively and in the browser, is still evolving. While Xeus-Cpp already offer powerful foundations, several exciting developments are underway that will further expand their capabilities across platforms&lt;/p&gt;
&lt;h3 id="debugger-support"&gt;Debugger Support&lt;/h3&gt;
&lt;p&gt;Currently, only a few Jupyter kernels like Xeus-Python offer full integration with the Jupyter Debug Protocol to enable the Jupyterlab debugger. We’re working to bring that experience to C++ as well.&lt;/p&gt;
&lt;p&gt;This summer, thanks to &lt;a href="https://summerofcode.withgoogle.com/programs/2025/projects/uEB2as1n"&gt;Google Summer of Code 2025&lt;/a&gt;, &lt;strong&gt;Abhinav Kumar&lt;/strong&gt; will be implementing native debugging support in Xeus-Cpp.The approach is based on using &lt;strong&gt;LLDB&lt;/strong&gt; and its &lt;strong&gt;Debug Adapter Protocol (lldb-dap)&lt;/strong&gt;. Modeled after Xeus-Python, it leverages LLDB’s Clang and JIT debugging capabilities to enable &lt;strong&gt;breakpoints&lt;/strong&gt;, &lt;strong&gt;variable inspection&lt;/strong&gt;, and &lt;strong&gt;step-through execution&lt;/strong&gt; directly within the JupyterLab debugger interface.&lt;/p&gt;
&lt;p&gt;We already have a proof-of-concept demonstrating that debugging C++ in Jupyter is possible. You can track this effort here: &lt;a href="https://github.com/compiler-research/xeus-cpp/issues/282"&gt;xeus-cpp issue #282&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In the longer term, we aim to explore extending debugging to the browser through Xeus-Cpp.&lt;/p&gt;
&lt;h3 id="cuda-support-in-xeus-cpp"&gt;Cuda Support in Xeus-Cpp&lt;/h3&gt;
&lt;p&gt;CUDA support in Clang-Repl was broken by the time LLVM 20 was released, but that changed with this upstream patch:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;LLVM PR: &lt;a href="https://github.com/llvm/llvm-project/pull/136404"&gt;#136404 — Enable CUDA support in clang-repl&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We’re now preparing to bring CUDA support directly to Xeus-Cpp, enabling GPU programming from a Jupyter notebook. Early planning is underway:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;GitHub issue: &lt;a href="https://github.com/compiler-research/xeus-cpp/issues/300"&gt;#300 — CUDA REPL support in xeus-cpp&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="last-value-printing"&gt;Last Value Printing&lt;/h3&gt;
&lt;p&gt;In &lt;strong&gt;cling&lt;/strong&gt;, a widely appreciated feature is &lt;em&gt;last value printing&lt;/em&gt;, simply writing a variable at the end of a cell automatically displays its value, without needing any manual printing. This behavior naturally carried over to &lt;strong&gt;xeus-cling&lt;/strong&gt;, making interactive exploration even smoother.&lt;/p&gt;
&lt;p&gt;This feature stands almost done in Clang-Repl:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;LLVM PR: &lt;a href="https://github.com/llvm/llvm-project/pull/84769"&gt;#84769 — Last Value Printing in clang-repl&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once merged, this will be integrated into Xeus-Cpp, enabling seamless REPL experience for C++ users.&lt;/p&gt;
&lt;h2 id="how-to-contribute"&gt;How to contribute?&lt;/h2&gt;
&lt;p&gt;Whether you’re a developer, package maintainer, educator, or simply curious about C++ in the browser, &lt;strong&gt;contributions are always welcome&lt;/strong&gt;!&lt;/p&gt;
&lt;h3 id="packaging-for-the-browser"&gt;Packaging for the Browser&lt;/h3&gt;
&lt;p&gt;Many of the capabilities in xeus-cpp-lite rely on packages built for the WebAssembly platform via &lt;strong&gt;emscripten-forge&lt;/strong&gt;. If you’re interested in porting a library or creating a new recipe, please visit &lt;a href="https://emscripten-forge.org/"&gt;emscripten-forge.org&lt;/a&gt; for detailed guidelines and examples.&lt;/p&gt;
&lt;p&gt;PRs and discussions are welcome at &lt;a href="https://github.com/emscripten-forge"&gt;github.com/emscripten-forge&lt;/a&gt;, especially if you’re looking to bring more numerical, graphical, or scientific libraries into the browser.&lt;/p&gt;
&lt;h3 id="improving-xeus-cpp-cppinterop-and-clang-repl"&gt;Improving Xeus-Cpp, CppInterOp and Clang-Repl&lt;/h3&gt;
&lt;p&gt;We welcome contributions to the broader &lt;strong&gt;xeus&lt;/strong&gt; project, which is part of the &lt;a href="https://jupyter.org/"&gt;Project Jupyter&lt;/a&gt; ecosystem. Xeus-Cpp in particular is actively seeking contributors, whether to improve kernel behavior, expand feature support, or explore new magic commands and UI integrations.&lt;/p&gt;
&lt;p&gt;On the LLVM side, the &lt;strong&gt;Clang-Repl&lt;/strong&gt; component is still under active development and can greatly benefit from community contributions, particularly around WebAssembly backend improvements and incremental execution features.&lt;/p&gt;
&lt;h3 id="areas-of-need-opportunities-for-collaboration"&gt;Areas of Need &amp;amp; Opportunities for Collaboration&lt;/h3&gt;
&lt;p&gt;In addition to code contributions, we are seeking funding opportunities to advance the project. We’ve identified several areas where focused effort could significantly enhance the ecosystem, and we warmly welcome collaborators or potential funding partners interested in helping us move these efforts forward, including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Integration testing&lt;/strong&gt;: LLVM currently lacks tests for Clang-Repl + WebAssembly. Establishing a reliable test harness in this area is both challenging and critical.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Interactive plotting&lt;/strong&gt;: A robust plotting library or plugin for Xeus-Cpp would make the kernel far more expressive for teaching, data exploration, and scientific computing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Plugin system for magics&lt;/strong&gt;: Further decoupling kernel extensions would simplify development and allow community-driven growth. A concrete description of this project is framed on &lt;a href="https://hepsoftwarefoundation.org/gsoc/2025/proposal_XeusCpp-Plugins.html"&gt;CERN’s website&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you or your organization shares the vision of making modern C++ more accessible, especially in-browser, we’d love to hear from you.&lt;/p&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
&lt;h2 id="about-the-authors"&gt;About the Authors&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://github.com/anutosh491"&gt;&lt;strong&gt;Anutosh Bhat&lt;/strong&gt;&lt;/a&gt; is a scientific software engineer at &lt;a href="https://quantstack.net/"&gt;QuantStack&lt;/a&gt;. His contributions range from the core of LLVM and Xeus, to their packaging for the Emscripten-forge software distribution. In the course of this endeavor, Anutosh was granted commit rights to the LLVM project.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/vgvassilev"&gt;&lt;strong&gt;Vassil Vassilev&lt;/strong&gt;&lt;/a&gt; is a Research Software Consultant with Princeton at &lt;a href="https://home.cern/"&gt;CERN&lt;/a&gt;. As the co-creator of Cling and the lead developer of the Clang-Repl and CppInterOp projects, he has spearheaded the development of interpreted C++ for over a decade.&lt;/p&gt;
&lt;h2 id="acknowledgements"&gt;Acknowledgements&lt;/h2&gt;
&lt;p&gt;The work by &lt;strong&gt;Vassil Vassilev&lt;/strong&gt; on this project is done in the context of the &lt;a href="https://compiler-research.org/"&gt;Compiler Research&lt;/a&gt; group, funded by the National Science Foundation grant OAC-2311471.&lt;/p&gt;
&lt;p&gt;The work by &lt;strong&gt;Anutosh Bhat&lt;/strong&gt; on this project is funded by &lt;a href="https://quantstack.net/"&gt;QuantStack&lt;/a&gt;, as part of a broader initiative to enable the data science ecosystem within the Web browser.&lt;/p&gt;
&lt;p&gt;Work on prototyping the WebAssembly infrastructure for Clang-Repl was done by &lt;strong&gt;Anubhab Ghosh&lt;/strong&gt;, supported through &lt;a href="https://summerofcode.withgoogle.com/archive/2023/projects/X0cFgJkY"&gt;Google Summer of Code 2023&lt;/a&gt; via the LLVM mentoring organization.&lt;/p&gt;
&lt;p&gt;A significant portion of the Xeus-Cpp codebase was inherited from the Xeus-Cling project and adapted for the Clang-Repl interpreter. This includes work by &lt;strong&gt;Sylvain Corlay&lt;/strong&gt;, &lt;strong&gt;Johan Mabille&lt;/strong&gt;, &lt;strong&gt;Loic Gouarin&lt;/strong&gt;, and &lt;strong&gt;Martin Renou&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;We are grateful to &lt;strong&gt;Thorsten Beier&lt;/strong&gt;, the creator and lead developer of the emscripten-forge software distribution, for his support in packaging LLVM and Xeus-Cpp.&lt;/p&gt;
&lt;p&gt;We extend our gratitude to &lt;strong&gt;Martin Renou&lt;/strong&gt; and &lt;strong&gt;Anastasiia Sliusar&lt;/strong&gt; for devising the processing of conda packages in the frontend, which underlies the support of third-party libraries in WebAssembly environments used by Xeus-Cpp and xeus-r. We are grateful to &lt;strong&gt;Johan Mabille&lt;/strong&gt; for creating xeus and for his code reviews within the xeus stack. We also thank &lt;strong&gt;Jeremy Tuloup&lt;/strong&gt; for creating JupyterLite.&lt;/p&gt;
&lt;p&gt;We are grateful to &lt;strong&gt;Matthew Barton, Tharun Anandh &amp;amp; Abhinav Kumar&lt;/strong&gt; for their numerous and significant contributions to the Xeus-Cpp project.&lt;/p&gt;
&lt;p&gt;Finally, we are immensely grateful to the authors and maintainers of Emscripten and LLVM for building such remarkable technologies and for their engagement and support during our numerous interactions on GitHub.&lt;/p&gt;
</content><category term="C++"/><category term="JupyterLite"/><category term="kernels"/><category term="WebAssembly"/><category term="xeus"/></entry><entry><title>Exploring Open Access Art Using the Deno Jupyter Kernel</title><link href="https://blog.jupyter.org/posts/2025/exploring-open-access-art-using-the-deno-jupyter-kernel/" rel="alternate"/><published>2025-04-17T15:27:00+00:00</published><updated>2025-04-17T15:27:00+00:00</updated><author><name>Trevor Manz</name></author><id>tag:blog.jupyter.org,2025-04-17:/posts/2025/exploring-open-access-art-using-the-deno-jupyter-kernel/</id><summary type="html">&lt;p&gt;Jupyter notebooks are the de facto standard for interactive computing and data analysis, combining code, prose, and visualizations in a single document.&lt;/p&gt;</summary><content type="html">&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/exploring-open-access-art-using-the-deno-jupyter-kernel/images/001-1_MJgcofpQm8Pl6hSZDvSdAw.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;Jupyter notebooks are the &lt;em&gt;de facto&lt;/em&gt; standard for interactive computing and data analysis, combining code, prose, and visualizations in a single document.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/manzt/deno-jupyter-blog/blob/main/post.ipynb"&gt;In fact, this post was written in a notebook!&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.deno.com/"&gt;Deno&lt;/a&gt; is a simplified and secure runtime for JavaScript and TypeScript, with built-in tooling and modern defaults. Since &lt;a href="https://deno.com/blog/v1.37"&gt;v1.37&lt;/a&gt;, Deno ships with a &lt;a href="https://docs.deno.com/runtime/reference/cli/jupyter/"&gt;built-in Jupyter kernel&lt;/a&gt;, making it easy to use TypeScript for data science and interactive computing.&lt;/p&gt;
&lt;p&gt;Having worked extensively with computational notebooks (mainly in Python), I find this exciting for these reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Simple setup&lt;/strong&gt; — The kernel is built into the Deno CLI, so there’s no need for additional installation. Just install Deno.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Improved dependency management&lt;/strong&gt; — Notebooks run like standalone scripts, and Deno’s support for importing dependencies in the code itself improves dependency management and reproducibility.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;A unified ecosystem for interactive data analysis&lt;/strong&gt; — Jupyter supports rich HTML/CSS/JS outputs, and the JavaScript ecosystem is ideal for interactive UIs. Deno connects the kernel and frontend, making notebooks more powerful and flexible.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In this post, we’ll explore the National Gallery of Art’s Open Access dataset in Jupyter with Deno. We’ll clean and analyze the data, looking at public domain works, artists, origins, and patterns. Along the way, we’ll introduce Deno-compatible tools like &lt;a href="https://github.com/pola-rs/nodejs-polars"&gt;npm:nodejs-polars&lt;/a&gt; and &lt;a href="https://observablehq.com/plot/"&gt;npm:@observablehq/plot&lt;/a&gt;, and wrap up by adding widgets and custom displays for a more interactive experience.&lt;/p&gt;
&lt;h2 id="the-dataset"&gt;The dataset&lt;/h2&gt;
&lt;p&gt;The &lt;strong&gt;National Gallery of Art (NGA)&lt;/strong&gt; &lt;a href="https://www.nga.gov/open-access-images/open-data.html"&gt;Open Data Program&lt;/a&gt; provides access to over 130,000 artworks and their creators, available &lt;a href="https://github.com/NationalGalleryOfArt/opendata/tree/main/data"&gt;on GitHub&lt;/a&gt;. This dataset includes valuable metadata such as titles, dates, artists, and classifications, all under a &lt;a href="https://creativecommons.org/public-domain/cc0/"&gt;Creative Commons 0 (CC0) license&lt;/a&gt;, meaning it’s free to use and share.&lt;/p&gt;
&lt;p&gt;The collection spans a wide variety of artworks, from sculptures to paintings, by famous artists like Mary Cassatt, M.C. Escher, Vincent van Gogh, Pablo Picasso, and Georgia O’Keeffe.&lt;/p&gt;
&lt;p&gt;However, navigating this resource is challenging. The National Gallery’s website is not very user-friendly, making it difficult to make sense of what is actually in the dataset. It’s nearly impossible to get any high-level insights, like the number of paintings, which time periods are most represented, or which artists are most prevalent–let alone make specific queries.&lt;/p&gt;
&lt;p&gt;Fortunately, the &lt;a href="https://github.com/NationalGalleryOfArt/opendata/tree/main/data"&gt;dataset is available on GitHub&lt;/a&gt; as a collection of related tables, exported as CSV files. For our analysis, we’ll focus on three key tables:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;objects.csv&lt;/strong&gt; — Metadata about artworks, including titles, dates, materials, and classifications.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;constituents.csv&lt;/strong&gt; — Artist details such as names, nationalities, and lifespans.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;published_images.csv&lt;/strong&gt; — Links to artwork images via the NGA’s IIIF API.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We’ll &lt;strong&gt;clean&lt;/strong&gt; and &lt;strong&gt;join&lt;/strong&gt; these tables to create a &lt;strong&gt;unified dataset&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id="but-wait"&gt;But wait!&lt;/h3&gt;
&lt;p&gt;While these NGA tables are free to use, they only include &lt;em&gt;metadata&lt;/em&gt;. The actual artwork images have separate licensing, with only about half being CC0-licensed. We’ll gather this info separately to identify freely available images.&lt;/p&gt;
&lt;p&gt;Our goal is to unify the data to identify public domain images, explore subsets, and view available artworks. Maybe you’ll even find an upgrade for that default OS wallpaper.&lt;/p&gt;
&lt;h2 id="loading-and-cleaning-the-data"&gt;Loading and cleaning the data&lt;/h2&gt;
&lt;h3 id="open-access-dataset"&gt;Open Access dataset&lt;/h3&gt;
&lt;p&gt;To get started, we first need to download the data. If you’ve worked with CSVs in JavaScript before, this typically looks like a &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API"&gt;“fetch”&lt;/a&gt; request followed by some parsing. Here, we’re using &lt;a href="https://jsr.io/@std/csv"&gt;jsr:@std/csv&lt;/a&gt; to stream the data, which gives us an array of objects.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;csv&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;jsr:@std/csv&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;baseUrl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;https://github.com/NationalGalleryOfArt/opendata/raw/refs/heads/main/data/&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;objects.csv&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;baseUrl&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;objects&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;Array&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;fromAsync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pipeThrough&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;TextDecoderStream&lt;/span&gt;&lt;span class="p"&gt;()).&lt;/span&gt;&lt;span class="nx"&gt;pipeThrough&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;CsvParseStream&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;skipFirstRow&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;true&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}),&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;objectid&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;objectid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;row.title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;year&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;beginyear&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;medium&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;row.medium&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="kr"&gt;type&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;visualbrowserclassification&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;}),&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;objectid&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;title&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Saint James Major&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;year&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1310&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;medium&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;tempera on panel&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;painting&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;objectid&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;title&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Saint Paul and a Group of Worshippers&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;year&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1333&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;medium&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;tempera on panel&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;painting&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;objectid&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;title&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Saint Bernard and Saint Catherine of Alexandria with the Virgin of the Annunciation [right panel]&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;year&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1387&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;medium&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;tempera on poplar panel&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nt"&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;painting&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;If we were just plotting the data, this would work fine. But an array of objects isn’t ideal for building our dataset. The NGA data is relational and needs merging, cleaning, and restructuring. A &lt;strong&gt;DataFrame&lt;/strong&gt; is better suited for our use case, offering higher-level, efficient APIs that eliminate the need to write manipulation functions by hand.&lt;/p&gt;
&lt;p&gt;Let’s see how we can load the same dataset using a DataFrame from &lt;a href="https://github.com/pola-rs/nodejs-polars"&gt;npm:nodejs-polars&lt;/a&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;npm:nodejs-polars&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;objects.csv&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;baseUrl&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;objects&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;pl.DataFrame&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;readCSV&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;quoteChar&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&amp;quot;&amp;#39;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;objects&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;objectid&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;title&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;beginyear&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="kr"&gt;as&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;year&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;medium&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;visualbrowserclassification&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="kr"&gt;as&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;head&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/exploring-open-access-art-using-the-deno-jupyter-kernel/images/002-1_DbMTGoODjquyHq4C2F18Zw.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;Here, we fetch the dataset as before, but instead of parsing the CSV ourselves, we read the text response directly with Polars to create a &lt;strong&gt;pl.DataFrame&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;We then chain a &lt;strong&gt;.select&lt;/strong&gt; expression to choose and rename the columns we want. Notice how, rather than operating on each row in a loop, with Polars we work directly with &lt;em&gt;columns&lt;/em&gt;. This API allows us to express complex, efficient operations (in Rust) without materializing JavaScript objects.&lt;/p&gt;
&lt;p&gt;Let’s load our other two datasets as pl.DataFrames as well:&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;constituents.csv&lt;/strong&gt; table contains information about any person or entity associated with a piece of art, such as artists, curators, or collectors.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;constituents.csv&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;baseUrl&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;constituents&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;readCSV&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;quoteChar&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&amp;quot;&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;constituentid&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;forwarddisplayname&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;alias&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;visualbrowsernationality&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;alias&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;nationality&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;constituents&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;head&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/exploring-open-access-art-using-the-deno-jupyter-kernel/images/003-1_RkX0rBRpRv89jfCrgv8rZw.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;published_images.csv&lt;/strong&gt; table contains additional information about the artwork’s image, including a URL for the thumbnail and mapping the objectid to the &lt;a href="https://iiif.io/"&gt;IIIF (International Image Interoperability Framework)&lt;/a&gt; for the image.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;published_images.csv&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;baseUrl&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;publishedImages&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;readCSV&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;quoteChar&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&amp;quot;&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;depictstmsobjectid&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;alias&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;objectid&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;uuid&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;iiifthumburl&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;alias&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;thumburl&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nx"&gt;publishedImages&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;head&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/exploring-open-access-art-using-the-deno-jupyter-kernel/images/004-1_Gk0o33-bs2AR7Ys4ajyypQ.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;The final table, &lt;strong&gt;objects_constituents.csv&lt;/strong&gt;, represents a many-to-many relationship between artworks and the people or entities associated with them. Each artwork may have multiple people linked to it.&lt;/p&gt;
&lt;p&gt;For our analysis, we’re interested in selecting the “primary” constituent (i.e., the artist). We define the primary artist as the one with the highest &lt;strong&gt;displayorder&lt;/strong&gt; for each object.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;objects_constituents.csv&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;baseUrl&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;objectToArtist&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;readCSV&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;await&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;quoteChar&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;&amp;#39;&amp;quot;&amp;#39;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;role&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;eq&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;artist&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;by&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;displayorder&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;groupBy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;objectid&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;first&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;objectid&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;constituentid&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;objectToArtist&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;head&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/exploring-open-access-art-using-the-deno-jupyter-kernel/images/005-1_kr-dapKFd1hmgpYEbG8rJA.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;This is a much more advanced usage of Polars, so let’s break down what’s going on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Filter&lt;/strong&gt; the table to select only rows where the role is “artist”.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sort&lt;/strong&gt; the filtered data by displayorder to ensure all entries are at the top.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Group&lt;/strong&gt; the rows &lt;strong&gt;by&lt;/strong&gt; objectid, ensuring one row per artwork.&lt;/li&gt;
&lt;li&gt;Get the &lt;strong&gt;first&lt;/strong&gt; in each group (i.e., artist with highest display order).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; just the “objectid” and “constituentid” for joining our tables.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Writing this logic by hand in JavaScript would be tedius, but with Polars it’s declarative and reads like a sentence. This type of chaining is common when working with relational data.&lt;/p&gt;
&lt;h2 id="determining-whether-art-is-in-public-domain"&gt;Determining whether art is in public domain&lt;/h2&gt;
&lt;p&gt;We’ve loaded the relevant tables from the Open Access dataset, but they do not indicate whether images associated with an artwork are in the public domain. While CC0 images can be freely downloaded, shared, and repurposed, not all art with the CC0 license are &lt;em&gt;legally&lt;/em&gt; in the public domain everywhere due to local copyright laws and edge cases.&lt;/p&gt;
&lt;p&gt;Let’s find a way to add public domain information to our data set.&lt;/p&gt;
&lt;p&gt;That information is available on the NGA website, but only through the search user interface. Extracting it manually would be impractical, so I reverse-engineered an API call to retrieve the IDs of artworks with public domain images.&lt;/p&gt;
&lt;p&gt;We only need the IDs, not the full data, but the query is slow. Since this isn’t an official API, I’ve saved the results separately. There are about 50k IDs identifying public domain images in our dataset.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;// This is not an official API, so I’ve cached the results to avoid &lt;/span&gt;
&lt;span class="c1"&gt;// repeatedly querying the server.&lt;/span&gt;
&lt;span class="c1"&gt;// &lt;/span&gt;
&lt;span class="c1"&gt;// let response = await fetch(&amp;quot;https://www.nga.gov/bin/ngaweb/collection-search-result/search.pageSize__100000.pageNumber__1.lastFacet__artobj_downloadable.json?artobj_downloadable=Image_download_available&amp;quot;); &lt;/span&gt;
&lt;span class="c1"&gt;// let data = await response.json();&lt;/span&gt;
&lt;span class="c1"&gt;// Deno.writeTextFileSync(&amp;quot;public-domain-ids.txt&amp;quot;, data.results.map((object) =&amp;gt; object.id).join(&amp;quot;\n&amp;quot;));&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;publicDomainIds&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Deno&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;readTextFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;public-domain-ids.txt&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;\n&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="join-to-single-unified-table"&gt;“Join” to single unified table&lt;/h2&gt;
&lt;p&gt;Now that we have all our data cleaned and loaded, we’ll perform a large join to combine all these tables into a &lt;strong&gt;single unified table&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Again, this challenging to do manually, but with Polars, we can nicely express these complex join operations. Finally, we use a &lt;strong&gt;.isIn&lt;/strong&gt; expression to derive a new column that indicates whether a piece of art is public domain.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;df&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;objects&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;objectToArtist&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;on&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;objectid&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;constituents&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;on&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;constituentid&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;publishedImages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;on&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;objectid&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exclude&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;constituentid&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;withColumns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;objectid&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;isIn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;publicDomainIds&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;alias&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;public&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;by&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;public&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;by&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;year&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;descending&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;nullsLast&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;true&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;head&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/exploring-open-access-art-using-the-deno-jupyter-kernel/images/006-1_pfamudvyutL613ZC_nuGJg.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;With our unified dataset finally loaded, let’s move on to some plotting.&lt;/p&gt;
&lt;h2 id="exploring-art-who-created-it-when-and-more-with-plots"&gt;Exploring art, who created it, when, and more with plots&lt;/h2&gt;
&lt;p&gt;The NGA portal allows some exploration of these data but focuses on specific artworks. We’re more interested in broader insights — where most art comes from, who created it, when it was made, and whether it’s public domain.&lt;/p&gt;
&lt;p&gt;As a JavaScript/TypeScript runtime, Deno gives us access to many visualization libraries to ask these kinds of questions. We’ll use &lt;a href="https://observablehq.com/plot/"&gt;npm:@observablehq/plot&lt;/a&gt; (Observable Plot) to create plots, spot patterns, and better understand the collection.&lt;/p&gt;
&lt;p&gt;Note this post is not a tutorial on Observable Plot, so don’t worry if some of the code below is not immediately clear. The goal is to demonstrate how to use Observable Plot in Jupyter with Deno to extract insights from our data. I’ll highlight any Deno-specific details or useful tips along the way.&lt;/p&gt;
&lt;p&gt;Let’s start by examining the distribution of artworks across different “types” in the NGA collection.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;npm:@observablehq/plot&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;jsr:@manzt/jupyter-helper&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Convert our DataFrame to Array&amp;lt;Object&amp;gt;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;records&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toRecords&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;900&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;marginLeft&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;legend&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;true&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;marks&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;barY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nx"&gt;records&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;groupX&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;count&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nx"&gt;sort&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-y&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nx"&gt;fill&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Public domain&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Copyrighted&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;}),&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="c1"&gt;// Provide a custom `document`&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;For the code above, the key things to keep in mind are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Custom document&lt;/strong&gt; — Observable Plot relies on the browser DOM, but since we’re in Deno, we provide a custom document from &lt;a href="https://jsr.io/@manzt/jupyter-helper"&gt;jsr:@manzt/jupyter-helper&lt;/a&gt; to enable rendering.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Converting our Polars DataFrame to records&lt;/strong&gt; — Observable Plot works best with arrays of objects, so we use &lt;strong&gt;df.toRecords()&lt;/strong&gt; to make the data easier to work with.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;For specifics on the &lt;strong&gt;Plot&lt;/strong&gt; API, see the &lt;a href="https://observablehq.com/plot/"&gt;documentation&lt;/a&gt; and &lt;a href="https://observablehq.com/@observablehq/plot-gallery"&gt;examples&lt;/a&gt; available.&lt;/em&gt;&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/exploring-open-access-art-using-the-deno-jupyter-kernel/images/007-0_iO8EF2CUzpVxl6em.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;Right away, we can see that prints, drawings, and photographs make up most of the collection. Each category varies in how many images are public domain — images of prints, drawings, sculptures, and paintings are mostly public domain, while images of photographs and portfolios are largely copyrighted.&lt;/p&gt;
&lt;p&gt;We can get more granular in our plot very easily with Observable Plot, which is &lt;strong&gt;composable and expressive&lt;/strong&gt;. With just a few tweaks, you can completely change how the data is represented. For example, starting from the plot above, we can modify marks and some encoding fields and produce an entirely different chart, allowing for quick exploration and iteration — like this “waffle” bar chart.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;900&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;marginLeft&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;legend&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;true&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;marks&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;waffleY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="cm"&gt;/* changed, Plot.barY */&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nx"&gt;records&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;groupZ&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="cm"&gt;/* changed, Plot.groupX */&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;count&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nx"&gt;fx&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nx"&gt;fill&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Public Domain&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Copyrighted&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nx"&gt;sort&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;fx&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-y&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cm"&gt;/* changed, sort: { x: &amp;quot;-y&amp;quot;  } */&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="nx"&gt;unit&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="cm"&gt;/* new */&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ruleY&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/exploring-open-access-art-using-the-deno-jupyter-kernel/images/008-0_QtnqOHV1z4f0n1Kx.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;With both Polars and Plot, we can ask more specific questions about the data, such as &lt;strong&gt;“Which artists have the most artwork in the collection?”&lt;/strong&gt; Here, we first use Polars to group the data by artist (“name”) and whether the artwork is public domain (“public”), counting the number of works for each. Then, we use Plot to visualize the top 25 artists.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;artworkTotals&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;df&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;groupBy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;public&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;len&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;name_count&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;head&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;25&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toRecords&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;marginLeft&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;legend&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;true&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;marks&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;barX&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;artworkTotals&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;name_count&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nx"&gt;sort&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;-x&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nx"&gt;fill&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Public domain&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Copyrighted&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}),&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/exploring-open-access-art-using-the-deno-jupyter-kernel/images/009-0_uT6qwM4VdbZE5jjU.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;Again, we can draw some high-level takeaways from this plot: The photographer Robert Frank has nearly twice as many works as the next highest artist. Some entries, like &lt;strong&gt;“American 20th Century”&lt;/strong&gt; and &lt;strong&gt;“German 15th Century,”&lt;/strong&gt; represent groups rather than individuals. Additionally, an artist’s work is typically either &lt;strong&gt;entirely public domain or not at all&lt;/strong&gt; — likely because public domain status is determined at the &lt;strong&gt;collection level&lt;/strong&gt;, with institutions clearing entire groups of works at once rather than evaluating individual pieces separately.&lt;/p&gt;
&lt;p&gt;With our tidy and clean dataset, we can quickly iterate in Deno to ask both broad questions (“What even is &lt;em&gt;in&lt;/em&gt; this collection?”) and very specific ones (“Who created this artwork in a given year?”).&lt;/p&gt;
&lt;h2 id="deeper-exploration-with-interactivity"&gt;Deeper exploration with interactivity&lt;/h2&gt;
&lt;p&gt;So far, we’ve used &lt;strong&gt;static plots&lt;/strong&gt; to explore our data, but Jupyter notebooks support rich, interactive outputs using &lt;strong&gt;HTML, CSS, and JavaScript&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;With Deno, we can add more interactivity to our data exploration by either using &lt;strong&gt;off-the-shelf interactive &lt;a href="https://github.com/manzt/anywidget"&gt;anywidgets&lt;/a&gt;&lt;/strong&gt; by quickly building &lt;strong&gt;custom components&lt;/strong&gt; for visualizing subsets in ways prebuilt tools don’t support. Deno provides direct access to the full web ecosystem, making custom visualizations seamless.&lt;/p&gt;
&lt;p&gt;In this section, we’ll look at:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Prebuilt interactive table &lt;strong&gt;anywidgets&lt;/strong&gt; for exploring data&lt;/li&gt;
&lt;li&gt;Create custom &lt;code&gt;&amp;lt;Gallery /&amp;gt;&lt;/code&gt; component to visualize subsets of the dataset&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="exploring-data-with-dataframe-viewer-anywidgets"&gt;Exploring data with DataFrame viewer anywidgets&lt;/h2&gt;
&lt;p&gt;In Jupyter, “widgets” extend notebook outputs with interactive views and controls for objects in the kernel (i.e., backend). Unlike standard outputs, they consist of both kernel-side and front-end code, communicating directly via custom messages. While the Jupyter Widget ecosystem is largely Python-centric, the &lt;a href="https://github.com/manzt/anywidget"&gt;&lt;strong&gt;anywidget&lt;/strong&gt; project&lt;/a&gt; provides a kernel-agnostic way to create and share these components.&lt;/p&gt;
&lt;p&gt;With anywidget, widgets can be published to &lt;a href="https://jsr.io/"&gt;JSR&lt;/a&gt; and used in the Deno Jupyter kernel. For example, &lt;a href="https://jsr.io/@manzt/jupyter-helper"&gt;jsr:@manzt/jupyter-helper&lt;/a&gt; provides some off-the-shelf anywidgets for interactively viewing Polars data frames.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;agGrid&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;jsr:@manzt/jupyter-helper&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;agGrid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;head&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;200&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// just look at the first 200 items&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/exploring-open-access-art-using-the-deno-jupyter-kernel/images/010-1_62m9scX8q8zpeMppdsV5hg.mp4" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;agGrid&lt;/strong&gt; export renders the &lt;strong&gt;pl.DataFrame&lt;/strong&gt; using the popular &lt;a href="https://www.ag-grid.com/"&gt;AG Grid&lt;/a&gt; library, allowing for interactive sorting, filtering, and pagination. This default view is minimal but can be easily extended with AG Grid’s many features.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;quak&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;jsr:@manzt/jupyter-helper&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;paintings&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;eq&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;painting&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)));&lt;/span&gt;
&lt;span class="nx"&gt;quak&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;paintings&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/exploring-open-access-art-using-the-deno-jupyter-kernel/images/011-1_7gY1tFtpCC_4oi5SN8lAEA.mp4" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;quak&lt;/strong&gt; export renders the &lt;strong&gt;pl.DataFrame&lt;/strong&gt; with the &lt;a href="https://github.com/manzt/quak"&gt;&lt;strong&gt;quak&lt;/strong&gt;&lt;/a&gt; data table viewer. Like &lt;strong&gt;agGrid&lt;/strong&gt;, it also includes summary visualizations above each column, showing 1D distributions, and can scale to much more data (e.g., the entire collection). These 1D summary visualizations are &lt;em&gt;interactive&lt;/em&gt;, enabling &lt;em&gt;cross-filtering&lt;/em&gt; across columns.&lt;/p&gt;
&lt;p&gt;Together, the programmatic and interactive layers enable unique hybrid workflows working with data. Some queries are easier to express in code, while others are more intuitive through direct manipulation. In notebooks, the two approaches come together naturally.&lt;/p&gt;
&lt;p&gt;For example, Polars can be used to subset the data to just public domain paintings (~2k out of ~115k artworks), and then a date range can be selected interactively by &lt;em&gt;brushing&lt;/em&gt; in the UI to explore variation across other columns.&lt;/p&gt;
&lt;h2 id="creating-a-custom-gallery-component"&gt;Creating a custom &lt;code&gt;&amp;lt;Gallery/&amp;gt;&lt;/code&gt; component&lt;/h2&gt;
&lt;p&gt;Deno gives us direct access to the web ecosystem, making it easy to build small, useful UIs for exploring our data in ways that off-the-shelf tools don’t support.&lt;/p&gt;
&lt;p&gt;For example, it would be helpful to actually see a set of artwork in a “gallery view” to provide intuition about what’s in that subset. We can do that since the dataset contains image URLs.&lt;/p&gt;
&lt;p&gt;Let’s create a custom &lt;a href="https://react.dev/learn/writing-markup-with-jsx"&gt;&lt;strong&gt;JSX component&lt;/strong&gt;&lt;/a&gt; that server-side renders (SSR) a gallery view for any dataset subset using the &lt;strong&gt;render&lt;/strong&gt; export from &lt;a href="https://jsr.io/@manzt/jupyter-helper"&gt;jsr:@manzt/jupyter-helper&lt;/a&gt;. This helper simply converts JSX to an HTML string, which we display using the &lt;a href="https://docs.deno.com/api/deno/~/Deno.jupyter.Displayable"&gt;&lt;strong&gt;Deno.jupyter.Displayable&lt;/strong&gt;&lt;/a&gt; interface.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;as&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;npm:react&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;jsr:@manzt/jupyter-helper&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;Gallery&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;100&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;grid&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nx"&gt;gridTemplateColumns&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sb"&gt;`repeat(auto-fill, minmax(&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sb"&gt;px, 1fr))`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nx"&gt;gap&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;4px&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;objects&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;select&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;objectid&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;thumburl&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;title&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;public&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(([&lt;/span&gt;&lt;span class="nx"&gt;objectid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;thumburl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;publicDomain&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;objectid&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;position&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;relative&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;textAlign&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;center&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;
&lt;span class="w"&gt;              &lt;/span&gt;&lt;span class="nx"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sb"&gt;`https://www.nga.gov/collection/art-object-page.&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;objectid&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sb"&gt;.html`&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;              &lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="nx"&gt;display&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;block&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sb"&gt;px`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sb"&gt;px`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="nx"&gt;position&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;relative&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;              &lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;              &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;img&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;thumburl&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="nx"&gt;alt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt;
&lt;span class="w"&gt;                  &lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;100%&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                  &lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;100%&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                  &lt;/span&gt;&lt;span class="nx"&gt;objectFit&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;cover&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                  &lt;/span&gt;&lt;span class="nx"&gt;borderRadius&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;5px&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;
&lt;span class="w"&gt;              &lt;/span&gt;&lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="w"&gt;              &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;publicDomain&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;img&lt;/span&gt;
&lt;span class="w"&gt;                  &lt;/span&gt;&lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;https://mirrors.creativecommons.org/presskit/icons/zero.svg&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;                  &lt;/span&gt;&lt;span class="nx"&gt;alt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Public Domain&amp;quot;&lt;/span&gt;
&lt;span class="w"&gt;                  &lt;/span&gt;&lt;span class="nx"&gt;style&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt;
&lt;span class="w"&gt;                    &lt;/span&gt;&lt;span class="nx"&gt;position&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;absolute&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                    &lt;/span&gt;&lt;span class="nx"&gt;bottom&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;3px&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                    &lt;/span&gt;&lt;span class="nx"&gt;right&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;3px&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                    &lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;20px&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                    &lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;20px&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                    &lt;/span&gt;&lt;span class="nx"&gt;opacity&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;0.60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;                  &lt;/span&gt;&lt;span class="p"&gt;}}&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;              &lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;
&lt;span class="w"&gt;            &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="err"&gt;/a&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;          &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="err"&gt;/div&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="p"&gt;))}&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="err"&gt;/div&amp;gt;&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;strong&gt;Gallery&lt;/strong&gt; is a custom component that displays a grid of artwork thumbnails from a given dataset. Each image &lt;strong&gt;links to its NGA collection page&lt;/strong&gt;, and public domain works are marked with a CC0 icon.&lt;/p&gt;
&lt;p&gt;We can SSR &lt;strong&gt;Gallery&lt;/strong&gt; with our data to better understand a smaller subset, making it easier to explore specific artists, time periods, or categories visually. For example, &lt;strong&gt;a random sample&lt;/strong&gt; from all the collection:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Gallery&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;objects&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/exploring-open-access-art-using-the-deno-jupyter-kernel/images/012-0_-_2C_srE0EGp-0HE.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;Or sample of just paintings:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Gallery&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;objects&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;paintings&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/exploring-open-access-art-using-the-deno-jupyter-kernel/images/013-0_RFL3Dapu3QIwpN2P.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;It’s worth taking a moment to appreciate that in just a few lines of code, we’ve built a &lt;strong&gt;domain-specific utility&lt;/strong&gt; that makes our data more intuitive to explore. This kind of flexibility is powerful and unique to Deno, letting us quickly craft custom utilities that provide deeper insights.&lt;/p&gt;
&lt;p&gt;With our toolkit, let’s take a closer look at the NGA dataset:&lt;/p&gt;
&lt;h2 id="drilling-down-on-when-the-art-was-created"&gt;Drilling down on &lt;em&gt;when&lt;/em&gt; the art was created&lt;/h2&gt;
&lt;p&gt;So far, our data exploration has focused on &lt;strong&gt;high-level summaries&lt;/strong&gt; of the NGA collection by artist and artwork type using static plots. Now, let’s drill down into something potentially more interesting using both our complete toolkit: &lt;em&gt;when&lt;/em&gt; these works were created.&lt;/p&gt;
&lt;p&gt;We’ll start with a stacked histogram to see the overall distribution of artwork types over time, then facet by public domain status to uncover any patterns.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;grid&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;true&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;legend&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;true&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;marks&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rectY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nx"&gt;records&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;year&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;1401&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// 15th century or later&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;binX&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;count&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;year&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nx"&gt;fill&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;        &lt;/span&gt;&lt;span class="nx"&gt;fy&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Public Domain&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Copyrighted&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="p"&gt;}),&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ruleY&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;marginLeft&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;marginRight&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/exploring-open-access-art-using-the-deno-jupyter-kernel/images/014-0_WU1i-imsUsRnWiTe.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;The distribution of artworks with &lt;strong&gt;copyrighted&lt;/strong&gt; and &lt;strong&gt;public domain&lt;/strong&gt; images are noticeably different. Nearly all &lt;strong&gt;copyrighted works appear after 1850&lt;/strong&gt;, while &lt;strong&gt;public domain artworks are more evenly spread&lt;/strong&gt; over time — &lt;em&gt;except&lt;/em&gt; for a &lt;strong&gt;sharp spike in public domain drawings from the 1940s&lt;/strong&gt;, with over 15k artworks added.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;This is a striking anomaly&lt;/strong&gt;. Are they all from the same artist? Why only drawings? Let’s take a closer look.&lt;/p&gt;
&lt;p&gt;We’ll filter down the public domain data to this span.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;let&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;notablePeriod&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;public&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// just public domain&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;year&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1925&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// between 1925 - 1955&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;year&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;lt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1955&lt;/span&gt;&lt;span class="p"&gt;))).&lt;/span&gt;&lt;span class="nx"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;by&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;year&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;plot&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;grid&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;true&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;color&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;legend&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kt"&gt;true&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nx"&gt;marks&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rectY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;notablePeriod&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toRecords&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="nx"&gt;Plot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;binX&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;count&amp;quot;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="ow"&gt;new&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;d&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;year&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;1&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="w"&gt;      &lt;/span&gt;&lt;span class="nx"&gt;fill&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;type&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="p"&gt;}),&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;)],&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/exploring-open-access-art-using-the-deno-jupyter-kernel/images/015-0_wa5EYkPYIidClyna.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;Zooming into the &lt;strong&gt;1925–1955 range&lt;/strong&gt;, we see that almost all the data falls within a much narrower window. Interestingly, the spike is highly concentrated between &lt;strong&gt;1935 and 1942&lt;/strong&gt;, with very little artwork outside this period.&lt;/p&gt;
&lt;p&gt;Narrowing in closer, we can see that in this window there are ~18k individual drawings:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;totalNumberOfDrawings&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;notablePeriod&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;year&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1934&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;year&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;lt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1943&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shape&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;totalNumberOfDrawings&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// 18096&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;made by over 1000 individuals:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;numberOfArtists&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;notablePeriod&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;year&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;gt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1934&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;col&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;year&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;lt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;lit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1943&lt;/span&gt;&lt;span class="p"&gt;)))&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;groupBy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;name&amp;quot;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;len&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;shape&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;numberOfArtists&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="c1"&gt;// 1034&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This gets even more interesting! The artwork is not from just one specific source — there was a &lt;strong&gt;surge of public works between 1935 and 1942&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Let’s use our custom &lt;code&gt;&amp;lt;Gallery /&amp;gt;&lt;/code&gt; view to explore a subset of these works — maybe seeing them will give us some insight.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Gallery&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nx"&gt;objects&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;notablePeriod&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;100&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/exploring-open-access-art-using-the-deno-jupyter-kernel/images/016-0_u40CvXdHxGXBjEOp.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;So all these artworks, despite being from different individuals, have a very similar style and medium. That’s something worth digging into — what might explain this pattern?&lt;/p&gt;
&lt;p&gt;Thanks to our custom &lt;code&gt;&amp;lt;Gallery /&amp;gt;&lt;/code&gt; component, we can click on artworks and view their metadata. Sampling a few, we see that they all belong to the &lt;a href="https://www.nga.gov/features/exhibitions/outliers-and-american-vanguard-artist-biographies/index-of-american-design.html"&gt;“Index of American Design”&lt;/a&gt; collection.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Conceived as an effort to document and preserve American folk and decorative arts, the Index of American Design consists of &lt;strong&gt;18,257&lt;/strong&gt; watercolor renderings created between &lt;strong&gt;1935 and 1942&lt;/strong&gt; as part of a Federal Art Project (FAP) work-relief program. Around 400 artists meticulously recreated textiles, woodcarvings, weathervanes, and other objects from across the U.S., aiming to establish a distinct American visual lineage. The project was ultimately housed at the National Gallery of Art, becoming a widely exhibited visual archive.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;That’s it! We found a &lt;strong&gt;large&lt;/strong&gt; &lt;strong&gt;collection of public works funded by a federal program during the Great Depression&lt;/strong&gt; — clear in both the data and historical context.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Using Deno’s Jupyter kernel, we explored the NGA Open Access dataset, combining static plots, interactive widgets, and custom JSX components to uncover patterns in the data. This led us to a historical insight — the Index of American Design, a public art project from the 1930s.&lt;/p&gt;
&lt;p&gt;With Deno, JSX, and anywidget, we combine data analysis with interactive web-based visualization, making it easy to build domain-specific tools for deeper exploration.&lt;/p&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
</content><category term="anywidget"/><category term="JavaScript"/><category term="kernels"/><category term="visualization"/></entry><entry><title>R in the Browser: Announcing Our WebAssembly Distribution</title><link href="https://blog.jupyter.org/posts/2025/r-in-the-browser-announcing-our-webassembly/" rel="alternate"/><published>2025-02-28T08:31:00+00:00</published><updated>2025-04-25T07:39:00+00:00</updated><author><name>Isabel Paredes</name></author><id>tag:blog.jupyter.org,2025-02-28:/posts/2025/r-in-the-browser-announcing-our-webassembly/</id><summary type="html">&lt;p&gt;R is now available in emscripten-forge, enabling the Xeus-R kernel in JupyterLite.&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;em&gt;R is now available in emscripten-forge, enabling the Xeus-R kernel in JupyterLite.&lt;/em&gt;&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/r-in-the-browser-announcing-our-webassembly/images/001-1_y4YmV8C0L1CkE1Q5JRJLkg.webp" alt="Banner with gradient background and R-lite logo" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;In the past few months, &lt;a href="https://quantstack.net/"&gt;QuantStack&lt;/a&gt; has received funding from the &lt;a href="https://www.gatesfoundation.org/"&gt;&lt;strong&gt;Bill &amp;amp; Melinda Gates Foundation&lt;/strong&gt;&lt;/a&gt; through a grant to &lt;a href="https://coursekata.org/"&gt;CourseKata&lt;/a&gt; to develop support for the R programming language in &lt;a href="https://jupyterlite.readthedocs.io/en/stable/"&gt;JupyterLite&lt;/a&gt; and the &lt;a href="https://emscripten-forge.org/"&gt;Emscripten-forge&lt;/a&gt; distribution for WebAssembly.&lt;/p&gt;
&lt;p&gt;Today, we are thrilled to announce the availability of the R programming language in the Emscripten-Forge distribution for WebAssembly, which enables R workflows in JupyterLite through the Xeus-R Jupyter kernel.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Screenshot of JupyterLite with an R Jupyter notebook in use" src="https://blog.jupyter.org/posts/2025/r-in-the-browser-announcing-our-webassembly/images/002-0_9D50aOr7jhxFnjzo.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;JupyterLite with an R Jupyter notebook in use&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;To experience R in JupyterLite, simply click on the link below:&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;a href="https://isabelparedes.github.io/xeus-r-demo/lab/?path=demo.ipynb"&gt;&lt;img src="https://blog.jupyter.org/posts/2025/r-in-the-browser-announcing-our-webassembly/images/003-0_qOr5KTmon-fiZ37l.webp" alt="Button to access JupyterLite" loading="lazy" data-body-image=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;In this article, we present the details of our efforts to enable R workflows in JupyterLite. We cover the challenges encountered in packaging R and its dependencies for this platform, the solutions we implemented, and the process of handling R mamba packages on the frontend.&lt;/p&gt;
&lt;h2 id="why-webassembly-scaling-scientific-computing-workflows-in-jupyter-to-millions-of-users"&gt;Why WebAssembly? Scaling scientific computing workflows in Jupyter to millions of users&lt;/h2&gt;
&lt;p&gt;The main challenge in scaling Jupyter deployments lies in providing a live computing environment on the server side for each user session.&lt;/p&gt;
&lt;p&gt;While Kubernetes-based JupyterHub deployments have been successfully implemented at a university scale (such as the UC Berkeley Data 8 class, or the JupyterHub deployment of Université Paris Saclay), they demand substantial computing resources and a skilled DevOps team to achieve and maintain this level of scalability.&lt;/p&gt;
&lt;p&gt;In contrast, &lt;a href="https://jupyterlite.readthedocs.io/"&gt;&lt;strong&gt;JupyterLite&lt;/strong&gt;&lt;/a&gt; represents a fundamentally different paradigm. As a browser-based distribution of Jupyter, it runs language kernels directly in the browser, enabling significantly greater scalability and ease of deployment. Notable JupyterLite-based applications include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A JupyterLite console integrated into &lt;a href="http://numpy.org"&gt;&lt;strong&gt;NumPy&lt;/strong&gt;&lt;/a&gt;’s front page, providing immediate access to NumPy functionality without requiring installation.&lt;/li&gt;
&lt;li&gt;A similar console application on &lt;a href="https://live.sympy.org/"&gt;&lt;strong&gt;SymPy&lt;/strong&gt;&lt;/a&gt;’s project page, fully hosted statically.&lt;/li&gt;
&lt;li&gt;The official &lt;a href="https://jupyter.org/try"&gt;&lt;strong&gt;Jupyter&lt;/strong&gt;&lt;/a&gt; website&lt;sup class="footnote-ref"&gt;&lt;a href="#fn1" id="fnref1"&gt;[1]&lt;/a&gt;&lt;/sup&gt;.&lt;/li&gt;
&lt;li&gt;The examples in &lt;a href="https://scikit-learn.org/stable/lite/lab/index.html"&gt;&lt;strong&gt;Scikit-Learn&lt;/strong&gt;&lt;/a&gt;’s documentation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These examples illustrate how WebAssembly can be transformative by providing ready-to-use computing environments for scientific workflows, in documentation, blog posts, and scientific communications. The WebAssembly environments are made available to the hundreds of thousands of monthly visitors of these websites without requiring any computing resources on the backend.&lt;/p&gt;
&lt;figure&gt;
&lt;a href="http://NumPy.org"&gt;&lt;img alt="JupyterLite deployment displayed on the NumPy website" src="https://blog.jupyter.org/posts/2025/r-in-the-browser-announcing-our-webassembly/images/004-0_-531naCHla3pK14Q.jpg" loading="lazy" data-body-image=""&gt;&lt;/a&gt;
&lt;figcaption&gt;JupyterLite deployment displayed on the NumPy website&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure&gt;
&lt;a href="https://live.sympy.org/"&gt;&lt;img alt="JupyterLite deployment displayed on the SymPy website" src="https://blog.jupyter.org/posts/2025/r-in-the-browser-announcing-our-webassembly/images/005-0_vk6bu54D0C7y4k9b.jpg" loading="lazy" data-body-image=""&gt;&lt;/a&gt;
&lt;figcaption&gt;JupyterLite deployment displayed on the SymPy website&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure&gt;
&lt;a href="https://jupyter.org/try"&gt;&lt;img alt="JupyterLite deployment displayed on the Jupyter website" src="https://blog.jupyter.org/posts/2025/r-in-the-browser-announcing-our-webassembly/images/006-0_SKvqpunHcz3i2mBG.webp" loading="lazy" data-body-image=""&gt;&lt;/a&gt;
&lt;figcaption&gt;JupyterLite deployment displayed on the Jupyter website&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="beyond-python-enabling-r-in-the-browser-and-more"&gt;Beyond Python, enabling R in the browser, and more&lt;/h2&gt;
&lt;p&gt;While the initial focus of the JupyterLite team has been on the Python programming language, the JupyterLite infrastructure was designed to be language-agnostic from the outset. The same principle applies to the package management stack we have been contributing to over the past few years, namely, &lt;a href="https://github.com/mamba-org/mamba"&gt;mamba&lt;/a&gt; and &lt;a href="https://conda-forge.org/"&gt;conda-forge&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;When we began targeting the WebAssembly platform, we chose to build our efforts on the mamba and conda-forge ecosystem. This decision allowed us to provide customizable environments for WebAssembly and expand beyond Python. This enabled applications such as the &lt;a href="https://github.com/jupyterlite/terminal"&gt;&lt;strong&gt;JupyterLite terminal&lt;/strong&gt;&lt;/a&gt;, created by Ian Thomas, which comprises a bash-like shell written in TypeScript called &lt;a href="https://github.com/jupyterlite/cockle"&gt;Cockle&lt;/a&gt;, and WebAssembly builds of native shell commands such as cat, grep, ls, and vim. You can read the &lt;a href="https://blog.jupyter.org/posts/2024/jupyterlite-terminal/"&gt;&lt;strong&gt;earlier&lt;/strong&gt; &lt;strong&gt;announcement&lt;/strong&gt;&lt;/a&gt; introducing the JupyterLite terminal.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Today, we are excited to reveal the availability of R in emscripten-forge, enabling Jupyter kernels such as Xeus-R to be used in JupyterLite.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;With the addition of R, emscripten-forge now provides a unified packaging solution for Python, R, and terminal applications for WebAssembly. This covers the scopes of &lt;a href="https://pyodide.org/"&gt;&lt;strong&gt;Pyodide&lt;/strong&gt;&lt;/a&gt; (a Python distribution for WebAssembly), &lt;a href="https://docs.r-wasm.org/"&gt;&lt;strong&gt;WebR&lt;/strong&gt;&lt;/a&gt; (an R distribution for WebAssembly), and &lt;a href="https://sandbox.bio/"&gt;&lt;strong&gt;Sandbox.bio&lt;/strong&gt;&lt;/a&gt; (a shell emulator with WebAssembly commands).&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="building-r-for-emscripten-forge"&gt;Building R for Emscripten-forge&lt;/h2&gt;
&lt;p&gt;Emscripten-forge is a GitHub organization containing recipes to build &lt;strong&gt;conda packages&lt;/strong&gt; for the emscripten-wasm32 platform; it is also the first distribution of conda packages targeting this platform. It is built upon a modernized stack, leveraging &lt;strong&gt;rattler-build&lt;/strong&gt; (the successor to the conda-build package builder) and &lt;strong&gt;mamba&lt;/strong&gt;. The emscripten-forge project, which was created and is still led by Thorsten Beier, is now a team effort covering a broad range of packages.&lt;/p&gt;
&lt;p&gt;In order to build R with emscripten-forge, we first required a toolchain capable of converting Fortran and C/C++ code into WebAssembly. Since R relies on BLAS and LAPACK (which are written in Fortran) and many essential R packages wrap native libraries that use Fortran, this conversion capability was crucial.&lt;/p&gt;
&lt;h2 id="fortran"&gt;Fortran&lt;/h2&gt;
&lt;p&gt;By default, the emscripten-forge toolchain can cross-compile any C/C++ packages into WebAssembly; however, the first challenge in building the R stack was expanding the toolchain to also compile Fortran code. The two compilers that we considered for this task are LFortran and Flang.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://lfortran.org/"&gt;&lt;strong&gt;LFortran&lt;/strong&gt;&lt;/a&gt; is a compiler built on top of LLVM and designed from the ground up as a cross-compiler. Despite its potential, LFortran is still in its early stages compared to Flang and does not yet fully support all Fortran features.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://flang.llvm.org/"&gt;&lt;strong&gt;LLVM Flang&lt;/strong&gt;&lt;/a&gt; is the Fortran compiler of the LLVM project. Unfortunately, it does not support cross-compilation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Working with Serge Guelton and Kerim Birgi, we initially experimented with the LFortran compiler and contributed to addressing issues encountered when building Netlib &lt;a href="https://github.com/Reference-LAPACK/lapack"&gt;LAPACK&lt;/a&gt;. The BLAS implementation from this package served as a valuable testing ground since BLAS is one of the core dependencies for R.&lt;/p&gt;
&lt;p&gt;After careful consideration, we found that Flang, with its ability to compile a wider variety of Fortran projects, brought us closer to building the Fortran components of R to WebAssembly. George Stagg, the main developer of the WebR project, has written a detailed &lt;a href="https://gws.phd/posts/fortran_wasm/"&gt;article&lt;/a&gt; on using Flang to produce WebAssembly, which was adapted to the (then) latest version of LLVM (&lt;a href="https://github.com/r-wasm/llvm-project/blob/wasm/llvm/CMakeLists.txt"&gt;v18&lt;/a&gt;). Inspired by George Stagg’s endeavors, Serge posted upstream contributions to the Flang project (&lt;a href="https://github.com/llvm/llvm-project/pull/99465"&gt;#99465&lt;/a&gt;, &lt;a href="https://github.com/llvm/llvm-project/pull/99822"&gt;#99822&lt;/a&gt;, &lt;a href="https://github.com/llvm/llvm-project/pull/101242"&gt;#101242&lt;/a&gt;, &lt;a href="https://github.com/llvm/llvm-project/pull/105589"&gt;#105589&lt;/a&gt;), resolving issues with 32-bit platforms that were impacting our effort to support WebAssembly. All of these changes will be included in LLVM/Flang 20.0.&lt;/p&gt;
&lt;p&gt;The remaining patches which cannot be merged upstream at this point involve:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;(1) enabling code generation that targets WebAssembly (&lt;a href="https://github.com/llvm/llvm-project/commit/198c0e1e23a52abb3e274ee44223551247f2c38f"&gt;198c0e1&lt;/a&gt;),&lt;/li&gt;
&lt;li&gt;(2) encoding target-specific size definitions for various data types given that the host and target platforms have different architectures (&lt;a href="https://github.com/llvm/llvm-project/commit/1da66cda3652da369f5d1be871c27368a12b55e9"&gt;1da66cd&lt;/a&gt;), and&lt;/li&gt;
&lt;li&gt;(3) disabling support for 128-bit floating-point types (&lt;a href="https://github.com/llvm/llvm-project/commit/f20c7c05db0ed9afb50c0092dad7bc991d933481"&gt;f20c7c0&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A version of (2) that could be contributed upstream is in the works, which would be one step closer to making WebAssembly an official target for Flang. Additionally, (3) will no longer be needed starting with Flang v20.&lt;/p&gt;
&lt;p&gt;These patches were integrated by Axel Obermeier into the Flang build recipe for the conda-forge distribution, making the modified build accessible to everyone. It can be installed on Linux with mamba or micromamba by executing:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;micromamba&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;conda-forge/label/emscripten::flang&lt;span class="w"&gt; &lt;/span&gt;libllvm19&lt;span class="w"&gt; &lt;/span&gt;--no-channel-priority
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The final ingredient for our toolchain involved creating a compatible Fortran runtime library. Since Flang implements its runtime library in C/C++, compiling this library with Emscripten proved to be straightforward. We added a &lt;a href="https://github.com/emscripten-forge/recipes/blob/9b08a19a531bb5e03c7d5147367f6de2acb57e40/recipes/recipes_emscripten/libflang/recipe.yaml"&gt;recipe for libflang&lt;/a&gt; to emscripten-forge, which packages the runtime library and includes all the aforementioned patches.&lt;/p&gt;
&lt;p&gt;In the following example, we invoke Flang on a simple Fortran script, and execute the resulting JavaScript and WebAssembly with NodeJS.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;ls
hello.f90&lt;span class="w"&gt;  &lt;/span&gt;libFortranRuntime.a
&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;cat&lt;span class="w"&gt; &lt;/span&gt;hello.f90
File:&lt;span class="w"&gt; &lt;/span&gt;hello.f90
program&lt;span class="w"&gt; &lt;/span&gt;hello
&lt;span class="w"&gt; &lt;/span&gt;print&lt;span class="w"&gt; &lt;/span&gt;*,&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;&amp;quot;Hello, Fortran!&amp;quot;&lt;/span&gt;
end&lt;span class="w"&gt; &lt;/span&gt;program&lt;span class="w"&gt; &lt;/span&gt;hello
&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;source&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;~/emsdk/emsdk_env.sh
&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;flang-new&lt;span class="w"&gt; &lt;/span&gt;--target&lt;span class="o"&gt;=&lt;/span&gt;wasm32-unknown-emscripten&lt;span class="w"&gt; &lt;/span&gt;-c&lt;span class="w"&gt; &lt;/span&gt;hello.f90&lt;span class="w"&gt; &lt;/span&gt;-o&lt;span class="w"&gt; &lt;/span&gt;hello.o
&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;emcc&lt;span class="w"&gt; &lt;/span&gt;hello.o&lt;span class="w"&gt; &lt;/span&gt;libFortranRuntime.a&lt;span class="w"&gt; &lt;/span&gt;-o&lt;span class="w"&gt; &lt;/span&gt;hello.js
&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;ls
hello.f90&lt;span class="w"&gt;  &lt;/span&gt;hello.js&lt;span class="w"&gt;  &lt;/span&gt;hello.o&lt;span class="w"&gt;  &lt;/span&gt;hello.wasm&lt;span class="w"&gt;  &lt;/span&gt;libFortranRuntime.a
&amp;gt;&lt;span class="w"&gt; &lt;/span&gt;node&lt;span class="w"&gt; &lt;/span&gt;hello.js
Hello,&lt;span class="w"&gt; &lt;/span&gt;Fortran!
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;With a working Fortran-to-WebAssembly toolchain, we managed to compile BLAS and LAPACK (See the &lt;a href="https://github.com/emscripten-forge/recipes/blob/main/recipes/recipes_emscripten/lapack/recipe.yaml"&gt;LAPACK recipe&lt;/a&gt;). But before we could get started with building R, we needed to tackle the remaining R dependencies.&lt;/p&gt;
&lt;h2 id="walking-up-the-stack"&gt;Walking up the stack&lt;/h2&gt;
&lt;p&gt;In R (v4.4), there are a handful of dependencies that are required to provide basic functionality; these are: libiconv, zlib, bzip2, xz, pcre2, and libcurl. Thanks to the packaging efforts led by Thorsten Beier and Wolf Vollprecht, these dependencies are available on emscripten-forge with the exception of libcurl. Because of its socket-based networking architecture and reliance on system-level resource access, libcurl faces fundamental incompatibilities with WebAssembly’s sandboxed environment constraints. Therefore, libcurl had to be disabled in the R source code. As a consequence, downstream R packages which depend on libcurl cannot be ported to WebAssembly until a suitable libcurl replacement is available.&lt;/p&gt;
&lt;p&gt;Apart from the core dependencies, R also requires a BLAS implementation. Although external BLAS libraries can be used with R, the R code base contains linear algebra routines from Netlib BLAS and a subset of LAPACK where both libraries are written in C and Fortran. To simplify configuration, we opted for these internal implementations instead of using external BLAS and LAPACK libraries.&lt;/p&gt;
&lt;p&gt;Furthermore, several key optional dependencies were cross-compiled to WebAssembly to enhance R’s graphical capabilities; these include libpng, libtiff, cairo, and pango, along with their respective subdependencies. One particularly challenging aspect of packaging these libraries was the cross-compilation of glib, which both cairo and pango depend on. Compiling glib was only possible thanks to the efforts of &lt;a href="https://gist.github.com/kleisauke/acfa1c09522705efa5eb0541d2d00887"&gt;Kleis Auke Wolthuizen&lt;/a&gt; whose patches made glib compatible with Emscripten, and Johan Mabille who disabled multi-threading.&lt;/p&gt;
&lt;p&gt;The R dependencies are summarized in the following table:&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="A table summarizing the R dependencies." src="https://blog.jupyter.org/posts/2025/r-in-the-browser-announcing-our-webassembly/images/007-1_9VQSZHRow-lBASg0wxfklg.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Table of R dependencies&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="cross-compilation-of-r"&gt;Cross-compilation of R&lt;/h2&gt;
&lt;p&gt;Although R typically configures and builds seamlessly on most unix platforms, cross-compiling is not straightforward because R uses a bootstrap approach; first it creates a minimal version of R which is then used to run several R scripts to complete the build process. Bootstrapping is a challenge because the built binaries for the target platform (WebAssembly) are not executable (at least not directly) from the host platform. Therefore, the r-base package necessitates two build phases. First, we compile R for the host platform (Linux) with GCC and Flang; this generates the R and Rscript executables needed for the second phase. And then, we cross-compile to WebAssembly with Emscripten and Flang.&lt;/p&gt;
&lt;p&gt;One of the major challenges of this setup was generating the R Data Base (.rdb) and R Data Index (.rdx) files for the internal packages of r-base (base, compiler, grDevices, graphics, grid, methods, parallel, splines, stats, stats4, tools, and utils). To accomplish this, it was necessary to dynamically load some of the internal shared libraries (tools, grDevices, graphics, utils, stats, and methods) which provide essential functionality to generate the data and index files. However, the R executables we created during the first phase of the build are incompatible with the WebAssembly shared libraries. In order to work around this, we temporarily replaced the WebAssembly libraries of the internal packages with the linux shared libraries we built during the first phase (See &lt;a href="https://github.com/emscripten-forge/recipes/blob/9b08a19a531bb5e03c7d5147367f6de2acb57e40/recipes/recipes_emscripten/r-base/cross_libraries.sh"&gt;cross_libraries.sh&lt;/a&gt;). This makeshift solution is also used to cross-compile all other R packages; the setup is carried out by the activation script of the cross-r-base package (See &lt;a href="https://github.com/conda-forge/r-base-feedstock/blob/54c15117f86693d54d69aacdd2fb76f622e31e5a/recipe/activate-cross-r-base.sh#L18"&gt;activate-cross-r-base.sh&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Additionally, the R source code required a few modifications to enable cross-compilation to WebAssembly.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The Emscripten platform was added to select the correct configuration for the platform.&lt;/li&gt;
&lt;li&gt;The dependency on libcurl was removed (as mentioned in the previous section) and as a consequence, the internet package which relies on libcurl was disabled.&lt;/li&gt;
&lt;li&gt;System calls which are not compatible with our WebAssembly environment were disabled.&lt;/li&gt;
&lt;li&gt;Cairo replaced Xlib as the default bitmap type to enable graphics.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The complete list of patches applied to R is available here: &lt;a href="https://github.com/emscripten-forge/recipes/tree/main/recipes/recipes_emscripten/r-base/patches"&gt;r-base patches&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="the-r-package-ecosystem"&gt;The R package ecosystem&lt;/h2&gt;
&lt;p&gt;Building R itself was just the beginning. The next challenge was to provide a wide array of R packages to create a robust development environment. Fortunately, many packages are written in pure R and are available as “noarch” packages on conda-forge, making them directly compatible with emscripten-forge environments. However, for the R packages that require compilation, a package recipe needs to be created and added to emscripten-forge. Thanks to the help of Anutosh Bhat, the following packages have been compiled and are available to use.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;r-askpass     r-digest    r-haven      r-magrittr  r-purrr    r-tidyr
r-base64enc   r-dplyr     r-hexbin     r-mass      r-rcpp     r-tzdb
r-bit         r-ellipsis  r-htmltools  r-matrix    r-readr    r-utf8
r-bit64       r-fansi     r-isoband    r-mgcv      r-rlang    r-vctrs
r-cachem      r-farver    r-jsonlite   r-mime      r-sp       r-vroom
r-cli         r-fastmap   r-later      r-nlme      r-stringi  r-xfun
r-colorspace  r-ggrepel   r-lattice    r-plyr      r-sys      r-yaml
r-data.table  r-glue      r-lazyeval   r-promises  r-tibble
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Most of the time, cross-compiling an R package is very simple because the bulk of the work is handled by r-base. Building a package typically boils down to a single line:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;$R&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;CMD&lt;span class="w"&gt; &lt;/span&gt;INSTALL&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;$R_ARGS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Occasionally, minor patches are applied to the package source code to enable the WebAssembly target platform or to simplify cross-compilation. Some R packages, such as r-nlme, contain Fortran code; for such packages, the custom flang compiler needs to be installed before the package can be cross-compiled. Should any package be needed for your use case, feel free to contribute them to emscripten-forge!&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="xeus-r"&gt;Xeus-R&lt;/h2&gt;
&lt;p&gt;Once a sufficient set of packages is available for the platform, the next step is to provide a development environment for end users. Our chosen tool for this purpose is Jupyter.&lt;/p&gt;
&lt;p&gt;The most popular Jupyter kernel for R is &lt;a href="https://github.com/IRkernel/IRkernel"&gt;IRkernel&lt;/a&gt;, which has been developed over several years. It includes complete ZeroMQ bindings for the R language and comprehensive coverage of the Jupyter protocol. However, since IRkernel is tied to ZeroMQ, we opted to work with the &lt;a href="https://github.com/jupyter-xeus/xeus-r"&gt;Xeus-R&lt;/a&gt; project instead, which was &lt;a href="https://blog.jupyter.org/posts/2024/meet-xeus-r-a-future-proof-jupyter-kernel-for-r/"&gt;announced last year&lt;/a&gt;. Xeus-R was developed by Romain François in collaboration with our team and with JupyterLite in mind. It is built upon the Xeus library, which provides a native implementation of the Jupyter protocol and is adapted to work with the JupyterLite frontend.&lt;/p&gt;
&lt;p&gt;Fortunately, the components of IRkernel responsible for the rich representation of R objects and rich display in Jupyter frontends were split into two separate R packages: &lt;strong&gt;IRdisplay&lt;/strong&gt; and &lt;strong&gt;repr&lt;/strong&gt;. These packages can be reused in Xeus-R. As a result, Xeus-R and IRkernel offer the same rich display functionality, ensuring that Jupyter notebooks created with one kernel will work with the other. However, Xeus-R provides a different implementation of the communication layer through &lt;a href="https://github.com/jupyterlite/xeus"&gt;jupyterlite-xeus&lt;/a&gt;, which enables integration with the JupyterLite stack. This integration was previously implemented for Xeus-Python and Xeus-Lua.&lt;/p&gt;
&lt;p&gt;One key aspect of this integration is the populating of the in-memory file system used by JupyterLite kernels with the required runtime dependencies, particularly shared libraries. This process is done upon bootstrapping the kernel. For this purpose, Anastiasiia Sliusar and Martin Renou developed &lt;a href="https://github.com/emscripten-forge/mambajs"&gt;mambajs&lt;/a&gt;, which, in combination with jupyterlite-xeus, processes conda packages in the frontend and installs them in the kernel filesystem at startup. In WebAssembly, shared libraries need to be handled with special care in order to function as expected. Drawing inspiration from the Python community, we adapted the pioneering work of Pyodide to properly load shared libraries into the filesystem.&lt;/p&gt;
&lt;h2 id="how-to-make-a-deployment-with-custom-packages"&gt;How to make a deployment with custom packages&lt;/h2&gt;
&lt;p&gt;The GitHub repository &lt;a href="https://github.com/jupyterlite/xeus-lite-demo"&gt;https://github.com/jupyterlite/xeus-lite-demo&lt;/a&gt; is a template for creating a JupyterLite deployment on GitHub pages that includes the packages specified in a conda environment.&lt;/p&gt;
&lt;p&gt;The process is as follows:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a new repository from the GitHub template.&lt;/li&gt;
&lt;li&gt;Enable the deployment on GitHub pages from a GitHub action, as shown in the README.&lt;/li&gt;
&lt;li&gt;Edit the environment file to include the desired packages.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For example, to deploy an R kernel with coursekata installed, the environment.yml file would contain the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;xeus-r&lt;/span&gt;
&lt;span class="nt"&gt;channels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;https://repo.mamba.pm/emscripten-forge&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;conda-forge&lt;/span&gt;
&lt;span class="nt"&gt;dependencies&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;xeus-r&lt;/span&gt;
&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="p p-Indicator"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="l l-Scalar l-Scalar-Plain"&gt;r-coursekata&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The deployment linked at the beginning of this article was created with this template.&lt;/p&gt;
&lt;h2 id="how-to-contribute"&gt;How to contribute&lt;/h2&gt;
&lt;p&gt;Contributors are always welcome! New R packages can be requested by opening an issue on emscripten-forge, or added directly by opening a pull request with the desired package recipe. For instructions on how to contribute, please visit &lt;a href="https://emscripten-forge.org/"&gt;https://emscripten-forge.org/&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="what-is-in-the-works"&gt;What is in the works&lt;/h2&gt;
&lt;p&gt;Currently, we are developing the infrastructure to dynamically install emscripten-forge and conda-forge noarch packages in JupyterLite kernel environments. This will apply to all Xeus kernels that make use of these packages, such as Xeus-Python, Xeus-R, and Xeus-Lua. In the case of R, this may be directly bound to install.packages.&lt;/p&gt;
&lt;p&gt;Additionally, we are working on more advanced features for the R kernel, including support for Jupyter interactive widgets and the split of the pure R parts of xeus-r into a separate package, which would facilitate a possible convergence with IRkernel.&lt;/p&gt;
&lt;p&gt;Finally, other language kernels based on the same package management stack are also in the works. Stay tuned for future announcements!&lt;/p&gt;
&lt;hr&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
&lt;h2 id="about-the-author"&gt;About the Author&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Isabel Paredes&lt;/strong&gt;, who led the charge on bringing R to emscripten-forge, is a senior scientific software developer at QuantStack. Prior to working on this project, she focused on porting the Robot Operating System (ROS) framework to WebAssembly.&lt;/p&gt;
&lt;h2 id="acknowledgments"&gt;Acknowledgments&lt;/h2&gt;
&lt;p&gt;This effort brought together several endeavors from many open-source developers.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;JupyterLite&lt;/strong&gt;, the Jupyter distribution that runs entirely in the web browser, was created by Jeremy Tuloup.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Xeus&lt;/strong&gt;, the C++ library implementing the Jupyter kernel protocol, enabling a custom communication layer, and is foundational to kernels like xeus-r, xeus-python, running in JupyterLite, was created by Johan Mabille and is maintained by a broader team including Martin Renou, Sylvain Corlay, and Thorsten Beier, who worked on the first integration with JupyterLite.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Emscripten-forge&lt;/strong&gt;, the distribution of conda packages for WebAssembly, was created by Thorsten Beier, who continues to lead the project. Many recipes were contributed by Isabel Paredes (for the R ecosystem), but also Kerim Birgi, Anutosh Bhat, Martin Renou, Wolf Vollprecht, and Johan Mabille.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Xeus-R&lt;/strong&gt;, the Xeus-based Jupyter kernel for R, was created by Romain François.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;IRDisplay&lt;/strong&gt; and &lt;strong&gt;repr&lt;/strong&gt; are pure R packages providing rich display and rich mime type rendering of many core R types, which are used in xeus-r. These two packages stem from the IRkernel project, a Jupyter kernel for R written in R, which was started by Thomas Kluyver, and has been maintained over the years by Philipp Angerer and Jan Katins.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MambaJS&lt;/strong&gt;, the library enabling the processing of conda packages in the frontend, was developed by Anastasiia Sliusar and Martin Renou.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Conda-forge&lt;/strong&gt;, the main distribution of conda packages, includes a large number of “noarch” recipes, including for R packages, and is developed by a broad community of contributors worldwide.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;WebR&lt;/strong&gt;, an R distribution for WebAssembly, was created by George Stagg. Although not directly used in this project, it documented numerous patches and changes to the Flang compiler that were adapted for this effort.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="funding"&gt;Funding&lt;/h2&gt;
&lt;p&gt;The work by &lt;strong&gt;Isabel Paredes&lt;/strong&gt; and other &lt;strong&gt;QuantStack&lt;/strong&gt; team members on bringing R and Xeus-R to Emscripten-Forge was supported by the &lt;a href="https://www.gatesfoundation.org/"&gt;&lt;strong&gt;Bill &amp;amp; Melinda Gates Foundation&lt;/strong&gt;&lt;/a&gt; through a grant to &lt;strong&gt;CourseKata&lt;/strong&gt;. CourseKata is a nonprofit project dedicated to improving statistics and data science education through interactive, research-backed curricula that integrate professional tools like R and Jupyter notebooks. This grant was part of CourseKata’s broader mission to scale its innovative curriculum, equipping students with the skills and confidence to engage with statistics, data science, and coding in meaningful ways.&lt;/p&gt;
&lt;hr class="footnotes-sep"&gt;
&lt;section class="footnotes"&gt;
&lt;ol class="footnotes-list"&gt;
&lt;li id="fn1" class="footnote-item"&gt;&lt;p&gt;Even though it powers the deployment of Jupyter on the main Jupyter website, JupyterLite is not an officially sanctioned Jupyter project. &lt;a href="#fnref1" class="footnote-backref"&gt;↩︎&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
</content><category term="JupyterLite"/><category term="kernels"/><category term="WebAssembly"/><category term="xeus"/></entry><entry><title>Meet Xeus-R: a future-proof Jupyter kernel for R</title><link href="https://blog.jupyter.org/posts/2024/meet-xeus-r-a-future-proof-jupyter-kernel-for-r/" rel="alternate"/><published>2024-01-22T17:20:00+00:00</published><updated>2024-01-22T17:20:00+00:00</updated><author><name>Romain François</name></author><id>tag:blog.jupyter.org,2024-01-22:/posts/2024/meet-xeus-r-a-future-proof-jupyter-kernel-for-r/</id><summary type="html">&lt;p&gt;The Jupyter ecosystem provides a versatile and user-friendly platform for data analysis and scientific computing, it has democratised access to powerful tools for researchers, scientists, educators, and data professionals.&lt;/p&gt;</summary><content type="html">&lt;figure&gt;
&lt;img alt="Screenshot of a Jupyter notebook with two cells displayed alongside a contextual help panel. The first cell shows the execution of an R command display(head(mtcars, 3)). The output is a nicely formatted table display with 3 rows. The second cell contains is a call to the ggplot function from the ggplot2 package. The output is a scatter plot of the variables hwy and displ, coloured by the class factor. The cursor shows auto completion for ggplot. On the right, contextual help for ggplot." src="https://blog.jupyter.org/posts/2024/meet-xeus-r-a-future-proof-jupyter-kernel-for-r/images/001-1_cFmKZKFycjvG1v_Xub4snQ.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;JupyterLab session with a notebook powered by the Xeus-R kernel for R&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The &lt;em&gt;Jupyter&lt;/em&gt; ecosystem provides a versatile and user-friendly platform for data analysis and scientific computing, it has democratised access to powerful tools for researchers, scientists, educators, and data professionals.&lt;/p&gt;
&lt;p&gt;The name &lt;em&gt;Jupyter&lt;/em&gt;, a blend of &lt;em&gt;Julia&lt;/em&gt;, &lt;em&gt;Python&lt;/em&gt;, and &lt;em&gt;R&lt;/em&gt; has always hinted at its relevance in multiple scientific programming languages and has since conquered new horizons thanks to its flexible and extensible design.&lt;/p&gt;
&lt;p&gt;Underneath the interactive surface of &lt;em&gt;Jupyter&lt;/em&gt; lie the &lt;em&gt;Jupyter&lt;/em&gt; kernels, a set of language specific engines orchestrating the dynamic execution and exploration of code. Kernels implement the &lt;em&gt;Jupyter&lt;/em&gt; protocol, a shared specification of the communication process between notebooks and kernels, defining how messages, commands and outputs are exchanged and processed.&lt;/p&gt;
&lt;p&gt;The &lt;em&gt;Xeus&lt;/em&gt; framework is a central piece of the puzzle, offering a reference to facilitate &lt;em&gt;Jupyter&lt;/em&gt; kernel implementations. The speed, extensibility, and alignment with the official protocol make &lt;em&gt;Xeus&lt;/em&gt; a perfect technology to implement new kernels.&lt;/p&gt;
&lt;h2 id="xeus-r"&gt;Xeus-R&lt;/h2&gt;
&lt;p&gt;Today, we, &lt;em&gt;a collaborative team led by Romain François and supported by QuantStack&lt;/em&gt;, are thrilled to announce the initial release of &lt;em&gt;Xeus-R&lt;/em&gt;, a future-proof &lt;em&gt;Jupyter&lt;/em&gt; kernel for R. &lt;em&gt;Xeus-R&lt;/em&gt; builds upon the components of &lt;em&gt;Xeus&lt;/em&gt; to facilitate the use of &lt;em&gt;R&lt;/em&gt; in &lt;em&gt;Jupyter&lt;/em&gt; notebooks and already supports typical capabilities: &lt;em&gt;R&lt;/em&gt; code execution, inspection, completion, and contextual help.&lt;/p&gt;
&lt;p&gt;The recent advancements in support for &lt;em&gt;WebAssembly&lt;/em&gt; in the &lt;em&gt;R&lt;/em&gt; world led by the &lt;em&gt;WebR&lt;/em&gt; project, the flexible design of Xeus, and the rise of &lt;em&gt;JupyterLite&lt;/em&gt; all contribute to our strong belief that &lt;em&gt;Xeus-R&lt;/em&gt; has the potential to deliver &lt;em&gt;Jupyter&lt;/em&gt; in-browser experience for data scientists using &lt;em&gt;R&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Xeus-R&lt;/em&gt; is currently at the stage of a proof of concept, but we wanted to communicate about it early to broadcast our excitement about its potential, share some of our thoughts, and initiate a conversation.&lt;/p&gt;
&lt;h2 id="relationship-with-irkernel"&gt;Relationship with IRkernel&lt;/h2&gt;
&lt;p&gt;While the &lt;em&gt;IRkernel&lt;/em&gt; project paved the way and is the current reference implementation of a &lt;em&gt;Jupyter&lt;/em&gt; kernel for R, it does not take advantage of the &lt;em&gt;Xeus&lt;/em&gt; infrastructure and includes a complete implementation of the &lt;em&gt;Jupyter&lt;/em&gt; protocol, down to the composition of all of the &lt;em&gt;JSON&lt;/em&gt; messages and most importantly how they are transported through &lt;em&gt;ZeroMQ&lt;/em&gt; sockets.&lt;/p&gt;
&lt;p&gt;In contrast, &lt;em&gt;Xeus-R&lt;/em&gt; fully embraces and leverages the capabilities of &lt;em&gt;Xeus&lt;/em&gt;, while borrowing some higher level concepts from &lt;em&gt;IRkernel&lt;/em&gt; and reusing features from its dependent packages &lt;em&gt;IRdisplay&lt;/em&gt; and &lt;em&gt;repr&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;We believe this path will benefit future development as it gives us the freedom to work on innovations that are specific to the needs of &lt;em&gt;R&lt;/em&gt; users, and let &lt;em&gt;Xeus&lt;/em&gt; absorb evolutions of the &lt;em&gt;Jupyter&lt;/em&gt; protocol.&lt;/p&gt;
&lt;h2 id="key-features"&gt;Key features&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;Xeus-R&lt;/em&gt; implements the basic building blocks of what you would expect from a &lt;em&gt;Jupyter&lt;/em&gt; kernel. The results of a code cell, i.e. the value of its last expression are displayed in the output, taking advantage of &lt;em&gt;ANSI&lt;/em&gt; escape codes for colours as were made popular by the &lt;em&gt;crayon&lt;/em&gt; and later &lt;em&gt;cli&lt;/em&gt; &lt;em&gt;R&lt;/em&gt; packages.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2024/meet-xeus-r-a-future-proof-jupyter-kernel-for-r/images/002-1_XznRckf13HpNy_S7h7-_iA.webp" alt="Screenshot of a Jupyter notebook with 3 cells visible. The first cell [2] contains a line of R code that uses cat and glue to print “hello world” with “world” coloured in green thanks the col_green function from the cli package. The second cell [3] shows the command head(mtcars) which outputs a plain text version of the first 6 rows of the mtcars data frame. The third cell [9] contains R code that loads the tibble package and then prints mtcars as a tibble, therefore benefitting from formatting." loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;Traditional and &lt;em&gt;ggplot2&lt;/em&gt;-powered graphics are captured and displayed as images. The aspect ratio of plots can be controlled by setting the &lt;em&gt;repr.plot.height&lt;/em&gt; and &lt;em&gt;repr.plot.width&lt;/em&gt; options either globally, or locally via the &lt;em&gt;cell_options()&lt;/em&gt; function.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2024/meet-xeus-r-a-future-proof-jupyter-kernel-for-r/images/003-1_oi1bSbjYZg_I_H104v-75g.webp" alt="A Jupyter notebook cell [13] with R code and its output. The code sets options locally with the cell_options() function and then creates a box plot with the following code: boxplot(decrease ~ treatment, data = OrchardSprays, col = “bisque”, log = “y”). The output is a a graphic with 8 boxplots, representing the treatment factor and its levels A to H on the x axis, and the variable decrease on the y axis, with a logarithmic scale." loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2024/meet-xeus-r-a-future-proof-jupyter-kernel-for-r/images/004-1_7bZITs9PxXYWwqgDWEniJg.webp" alt="Screenshot of a Jupyter notebook cell [15] with R code and output. The code is loading the ggplot2 package and then creating a scatterplot with the following code: ggplot(mpg, aes(displ, hwy, colour = class)) + geom_point(). The resulting plot is a scatter plot with displ on the x axis and fwy on the y axis, showing different colored points representing different classes of vehicles from the class factor." loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;Thanks to the scaffolding in place in the &lt;em&gt;IRdisplay&lt;/em&gt; and &lt;em&gt;repr&lt;/em&gt; packages, &lt;em&gt;Xeus-R&lt;/em&gt; is also able to emit richer displays through mime bundles.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2024/meet-xeus-r-a-future-proof-jupyter-kernel-for-r/images/005-1_-T33jRshu16eWh96_OVuvA.webp" alt="Screenshot of a Jupyter notebook with 2 cells with R code. The first cell [16] contains the command display(1:10). The output shows a rich representation of 1:10: the numbers 1 to 10 separated by dots. The second cell [17] also uses the display function to create a rich display of the first 6 rows of the mtcars data frame: display(head(mtcars)). The result presents the data frame as a well formatted table display with alternating shading for rows to improve readability." loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;In contrast with &lt;em&gt;IRkernel&lt;/em&gt;, the rich displays need to be explicitly requested with the &lt;em&gt;display()&lt;/em&gt; function. There are cases however, such as &lt;em&gt;HTML&lt;/em&gt; widgets, where automatic rich display makes the most sense because a text/plain representation is not valuable.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2024/meet-xeus-r-a-future-proof-jupyter-kernel-for-r/images/006-1_5QOitnpbBdDNpQ9ERIILpg.webp" alt="Screenshot of a Jupyter notebook cell [24] showing R code that uses packages htmltools and plotly to create an HTML widget with 2 plotly-powered histograms. The result first shows information messages about conflicts, then shows two typical plotly-powered histograms. The top histogram shows a selection, indicating that the display is about to be zoomed in a smaller value range, to show that the HTML widget can be interacted with." loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Xeus-R&lt;/em&gt; also supports contextual help and includes a basic completion system, based on the internal &lt;em&gt;utils::.getTokenFromLine()&lt;/em&gt; system.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2024/meet-xeus-r-a-future-proof-jupyter-kernel-for-r/images/007-1_jWuiihVGV0_7utFx3Tzvng.webp" alt="Screenshot of a Jupyter notebook interface with an open R code cell and a contextual help panel side by side. On the left side, the code cell is active with the incomplete R function call “rnorm(“ being typed, and an auto-completion tooltip showing the options “n=”, “mean=”, “sd=”. The tooltip also shows a repetition of the function name “rnorm”. On the right side, the contextual help panel shows the documentation for the rnorm function." loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;h2 id="installation-and-getting-started"&gt;Installation and Getting Started&lt;/h2&gt;
&lt;p&gt;At the time of writing this article, &lt;em&gt;Xeus-R&lt;/em&gt; is only available and tested to work on Unix-based systems. We consciously decided to focus initial efforts on features rather than platform comprehensiveness, but we should be able to fix this soon enough.&lt;/p&gt;
&lt;p&gt;The easiest way to get up and running with &lt;em&gt;Xeus-R&lt;/em&gt; is to install it from conda-forge:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mamba&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;xeus-r
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Instructions to build from source are available in the github repository for &lt;em&gt;Xeus-R&lt;/em&gt;: &lt;a href="https://github.com/jupyter-xeus/xeus-r"&gt;https://github.com/jupyter-xeus/xeus-r&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="looking-ahead-jupyterlite-integration"&gt;Looking ahead: JupyterLite Integration&lt;/h2&gt;
&lt;p&gt;Another benefit of a &lt;em&gt;Xeus&lt;/em&gt;-based approach is that it has been designed in a way that supports in-browser experience to power &lt;em&gt;JupyterLite&lt;/em&gt;. Together with the recent developments around &lt;em&gt;WebR&lt;/em&gt;, we can envision &lt;em&gt;R&lt;/em&gt; becoming a first-class citizen in the &lt;em&gt;JupyterLite&lt;/em&gt; world.&lt;/p&gt;
&lt;p&gt;This is an exciting vision and will serve as our North Star ⭐️ for future developments of &lt;em&gt;Xeus-R&lt;/em&gt;.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Join us in welcoming &lt;em&gt;Xeus-R&lt;/em&gt;, a &lt;em&gt;Jupyter&lt;/em&gt; kernel for &lt;em&gt;R&lt;/em&gt; that leverages the robust foundation of &lt;em&gt;Xeus&lt;/em&gt; architecture. &lt;em&gt;R&lt;/em&gt; is a language of paramount importance for Data Science and Scientific Computing and it rightfully deserves its place as a first-class citizen within the &lt;em&gt;Jupyter&lt;/em&gt; ecosystem.&lt;/p&gt;
&lt;p&gt;We firmly believe that &lt;em&gt;Xeus-R&lt;/em&gt; has the potential to become a reference implementation for an &lt;em&gt;R&lt;/em&gt; kernel, well positioned to tackle the challenges of the ever-evolving landscape of in-browser Scientific Computing, a promising future led by the &lt;em&gt;JupyterLite&lt;/em&gt; and &lt;em&gt;WebR&lt;/em&gt; projects.&lt;/p&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
&lt;h2 id="acknowledgements"&gt;Acknowledgements&lt;/h2&gt;
&lt;p&gt;The work by Romain François on Xeus-R was funded by &lt;a href="https://twitter.com/QuantStack"&gt;QuantStack&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="author-bio"&gt;Author Bio&lt;/h2&gt;
&lt;p&gt;&lt;a href="http://www.linkedin.com/in/romain-francois"&gt;Romain François&lt;/a&gt; is a prominent figure in the &lt;em&gt;R&lt;/em&gt; community, recognised for his longstanding contributions to &lt;em&gt;R&lt;/em&gt; programming and Data Analysis. With a profound passion for open-source software and commitment to advancing the capabilities of &lt;em&gt;R&lt;/em&gt;, he has earned a well-deserved reputation as a respected expert.&lt;/p&gt;
&lt;p&gt;Romain’s expertise encompasses a wide spectrum of &lt;em&gt;R&lt;/em&gt;-related fields, including package development, data manipulation, and interoperability with other programming languages. He is widely recognized for his work on packages like &lt;em&gt;dplyr&lt;/em&gt;, which has become a cornerstone for efficient data manipulation in &lt;em&gt;R&lt;/em&gt;, and for his contributions to &lt;em&gt;Rcpp&lt;/em&gt;, a library that bridges the power of &lt;em&gt;C++&lt;/em&gt; with &lt;em&gt;R&lt;/em&gt; for optimizing &lt;em&gt;R&lt;/em&gt; packages and enhancing performance.&lt;/p&gt;
</content><category term="kernels"/><category term="xeus"/></entry><entry><title>Plug your application into the Jupyter world</title><link href="https://blog.jupyter.org/posts/2023/plug-your-application-into-the-jupyter-world/" rel="alternate"/><published>2023-10-23T06:09:00+00:00</published><updated>2023-10-23T06:09:00+00:00</updated><author><name>David Brochart</name></author><id>tag:blog.jupyter.org,2023-10-23:/posts/2023/plug-your-application-into-the-jupyter-world/</id><summary type="html">&lt;p&gt;Kernels are a simple but powerful abstraction in the Jupyter architecture. They encapsulate language interpreters and make them accessible through a standardized interface. This is the key to Jupyter’s remarkable versatility, with over 100 supported languages.&lt;/p&gt;</summary><content type="html">&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2023/plug-your-application-into-the-jupyter-world/images/001-1_ENzq7i52UtqxESs4UTKBYw.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;Kernels are a simple but powerful abstraction in the Jupyter architecture. They encapsulate language interpreters and make them accessible through a standardized interface. This is the key to Jupyter’s remarkable versatility, with over 100 supported languages. Embedding a kernel in your custom application can seamlessly expose it to the Jupyter ecosystem. Not only can you attach JupyterLab to your program for e.g. state inspection, as you would do with a debugger, but you can truly extend your application with all the power of the Jupyter ecosystem.&lt;/p&gt;
&lt;h2 id="applications-gui-and-api"&gt;Applications: GUI and API&lt;/h2&gt;
&lt;p&gt;Several applications such as &lt;a href="https://www.freecad.org/"&gt;FreeCAD&lt;/a&gt;, &lt;a href="https://docs.blender.org/api/current/"&gt;Blender&lt;/a&gt;, or &lt;a href="https://docs.qgis.org/3.28/en/docs/pyqgis_developer_cookbook/index.html"&gt;QGIS&lt;/a&gt; provide a Python API to access their functionalities programmatically, and include an embedded Python console which allows using this API from within the application. Users can both use the graphical user interface and operate on the application in a scripted fashion depending on their needs.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Python consoles in FreeCAD, Blender, and QGIS (from left to right)." src="https://blog.jupyter.org/posts/2023/plug-your-application-into-the-jupyter-world/images/002-1_EMYG_XFNokXREwsUa9pbFA.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Python consoles in FreeCAD, Blender, and QGIS (from left to right).&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;If you think about it, these are the kinds of workflows that Jupyter has always been about, but Jupyter has evolved in the opposite direction. Instead of adding scripting to GUIs, Jupyter added GUIs to scripting. At first, Jupyter was IPython, a console for interactive computing. Then it went to the Web and became IPython Notebook, renamed to Jupyter Notebook. With the browser it became possible to display richer content and create small GUIs, using Jupyter Widgets. Then JupyterLab was created and allowed to create fully-fledged desktop-like applications in the browser, like 3-D CAD modelers.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="JupyterLab showing notebooks using JupyterCAD and ipyleaflet." src="https://blog.jupyter.org/posts/2023/plug-your-application-into-the-jupyter-world/images/003-1_m4WwlNYiIvMeZu1eXhrl7Q.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;JupyterLab showing notebooks using JupyterCAD and ipyleaflet.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Jupyter put a lot of attention on building a good experience interacting with the Python REPL, which is not the main focus of domain-specific desktop applications. The Python console embedded in desktop applications is often quite raw. Allowing users to connect from Jupyter can enable a much better experience.&lt;/p&gt;
&lt;p&gt;What if there was a bridge that allowed you to connect both worlds, your application on one side and Jupyter on the other side? What is the common denominator allowing code to interact with an application, while also being shared with Jupyter? In the Jupyter infrastructure, we call it a kernel.&lt;/p&gt;
&lt;h2 id="jupyter-kernels"&gt;Jupyter kernels&lt;/h2&gt;
&lt;p&gt;Kernels provide a standardized way to expose language interpreters to applications, in a language-agnostic fashion. You can think of it as a server that accepts requests such as “execute this piece of code” and that replies with a result. The result is actually a data representation, it can be as simple as “3” for an input of “1+2”, or a complex interactive plot. A kernel usually lives in a separate process on your machine, but it can also run in the same process, or even remotely on another machine. Someone wanting to connect to this kernel will need the connection information such as the IP address and the ports of the different communication “channels”. It is stored in what is called a connection file.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="The Jupyter kernel protocol allows clients to interact with different languages." src="https://blog.jupyter.org/posts/2023/plug-your-application-into-the-jupyter-world/images/004-1_ywYEVpCKlbL6aBEGERsXSw.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;The Jupyter kernel protocol allows clients to interact with different languages.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Anyone who has access to this connection file can then execute code in the kernel. This is “shared code”, meaning that every client to this kernel eventually runs code in the same interpreter. If one client sets a variable “a=1”, other clients will see this variable. They are all running the “same program”. If the kernel runs in the same process as the application, then the kernel can interact directly with it. This way of sharing the execution engine serves as a bridge between the application and Jupyter.&lt;/p&gt;
&lt;p&gt;Now it is just a matter of exposing the connection file so that e.g. JupyterLab can see it. The application launching the kernel can save the connection file to a specific directory, and give the path to JupyterLab. And that’s it, JupyterLab can run a notebook using this kernel, allowing it to interact with the application.&lt;/p&gt;
&lt;h2 id="getting-started"&gt;Getting started&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://github.com/jupyter-xeus/xeus-qt-python"&gt;xeus-qt-python&lt;/a&gt; repository is a great place to start and see how to embed a Python kernel inside a Qt application. Under the hood, it uses &lt;a href="https://github.com/jupyter-xeus/xeus-qt"&gt;xeus-qt&lt;/a&gt;, an integration of the &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;xeus&lt;/a&gt; kernel architecture in the Qt event loop. The Qt application actually runs JupyterLab in a Qt WebEngine window. Users can run code in a notebook and interact with the application, which in turn can interact with the notebook. Here, we create a Qt button from a notebook. When clicking on the button, a callback prints a message in the notebook. This demonstrates a two-way binding between the Qt application and JupyterLab.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Example of a Qt application embedding JupyterLab." src="https://blog.jupyter.org/posts/2023/plug-your-application-into-the-jupyter-world/images/005-1_FTlpril_YV5W6-xYelNrtA.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Example of a Qt application embedding JupyterLab.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;a href="https://github.com/Slicer/SlicerJupyter"&gt;SlicerJupyter&lt;/a&gt; from Kitware was one of the first applications to take advantage of this approach. You can read more in this &lt;a href="https://blog.jupyter.org/posts/2020/slicerjupyter-a-3d-slicer-kernel-for-interactive/"&gt;blog post&lt;/a&gt;. We hope that this technology will unlock a new brand of use-cases and allow applications to reach a new audience through the Jupyter ecosystem. Please reach out to us if you need help!&lt;/p&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
&lt;h3 id="about-the-author"&gt;About the author&lt;/h3&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2023/plug-your-application-into-the-jupyter-world/images/006-1_gGWqElhixsQA-cGOzWcb7w.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://twitter.com/davidbrochart"&gt;&lt;strong&gt;David Brochart&lt;/strong&gt;&lt;/a&gt; is a technical director at QuantStack. He mostly works on the Jupyter backend stack. He contributed to the development of real-time collaboration in JupyterLab, and created the &lt;a href="https://davidbrochart.github.io/jupyverse/"&gt;Jupyverse&lt;/a&gt; project, a next-generation implementation of the Jupyter server.&lt;/p&gt;
&lt;h3 id="acknowledgments"&gt;Acknowledgments&lt;/h3&gt;
&lt;p&gt;This work was made possible thanks to several contributors. &lt;a href="https://twitter.com/mari_meir"&gt;&lt;strong&gt;Mariana Meireles&lt;/strong&gt;&lt;/a&gt; was the initial author of &lt;a href="https://github.com/jupyter-xeus/xeus-qt"&gt;xeus-qt&lt;/a&gt;. &lt;a href="https://twitter.com/ThorstenBeier"&gt;&lt;strong&gt;Thorsten Beier&lt;/strong&gt;&lt;/a&gt; is a scientific software developer at QuantStack and contributes to the &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;xeus&lt;/a&gt; kernel ecosystem. He is the initial creator of the &lt;a href="https://github.com/jupyter-xeus/xeus-qt-python"&gt;xeus-qt-python&lt;/a&gt; demonstration. &lt;a href="https://twitter.com/JohanMabille"&gt;&lt;strong&gt;Johan Mabille&lt;/strong&gt;&lt;/a&gt; is a technical director at QuantStack and he is the main author of &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;xeus&lt;/a&gt;. &lt;strong&gt;Afshin Darian&lt;/strong&gt; is a technical director at QuantStack and worked on the UI in JupyterLab 4.0 allowing to use an external kernel.&lt;/p&gt;
</content><category term="kernels"/><category term="xeus"/></entry><entry><title>Bringing Modern JavaScript to the Jupyter Notebook</title><link href="https://blog.jupyter.org/posts/2023/bringing-modern-javascript-to-the-jupyter-notebook/" rel="alternate"/><published>2023-09-24T03:34:00+00:00</published><updated>2024-02-13T16:02:00+00:00</updated><author><name>Kyle Kelley</name></author><id>tag:blog.jupyter.org,2023-09-24:/posts/2023/bringing-modern-javascript-to-the-jupyter-notebook/</id><summary type="html">&lt;p&gt;The Deno kernel is the freshest runtime for Jupyter&lt;/p&gt;
</summary><content type="html">&lt;figure&gt;
&lt;img alt="Visualizing Data via Deno, TypeScript, and VegaLite in JupyterLab" src="https://blog.jupyter.org/posts/2023/bringing-modern-javascript-to-the-jupyter-notebook/images/001-1_dioQ00ymlsIb1PPH_SBdjg.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Visualizing Data via Deno, TypeScript, and VegaLite in JupyterLab&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;I never expected &lt;a href="https://deno.com/blog/v1.37"&gt;this&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;using modern JS, TS, and npm in jupyter notebooks&lt;/p&gt;
&lt;p&gt;👇&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2023/bringing-modern-javascript-to-the-jupyter-notebook/images/009-F6k0IzXbQAA1afQ.jpg" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;— &lt;a href="https://x.com/deno_land"&gt;Deno (@deno_land)&lt;/a&gt;, &lt;a href="https://x.com/deno_land/status/1704978299615957200"&gt;September 21, 2023&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;&lt;a href="https://deno.land"&gt;Deno&lt;/a&gt; brings TypeScript, JavaScript, npm, and ES Modules to Jupyter with an easy to install kernel.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The Deno Kernel is the first language runtime with a builtin jupyter kernel.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;There’s no better time to &lt;a href="https://docs.deno.com/runtime/manual/getting_started/installation"&gt;get started with Deno&lt;/a&gt; than now. Once deno is installed, run the &lt;a href="https://docs.deno.com/runtime/manual/tools/jupyter"&gt;deno jupyter kernel installation&lt;/a&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;deno&lt;span class="w"&gt; &lt;/span&gt;jupyter&lt;span class="w"&gt; &lt;/span&gt;--unstable&lt;span class="w"&gt; &lt;/span&gt;--install
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;figure&gt;
&lt;img alt="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!" src="https://blog.jupyter.org/posts/2023/bringing-modern-javascript-to-the-jupyter-notebook/images/002-1__KUkFmq1lO3H-tx4XJPNew.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Enabling Deno in VS Code&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Since Deno supports web standards like &lt;code&gt;fetch&lt;/code&gt; out of the box, loading data is simple and easy.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="That’s so fetch" src="https://blog.jupyter.org/posts/2023/bringing-modern-javascript-to-the-jupyter-notebook/images/003-1_ndB49_FE9Mq8-9YSNFLuWw.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;That’s so fetch&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Not only is this a fast &amp;amp; secure runtime, it’s fun. The timing is great too — &lt;a href="https://platform.noteable.io/blog/dataframes-answers-for-solutions"&gt;DataFrames&lt;/a&gt; aren’t just for &lt;a href="https://dataframes.juliadata.org/stable/"&gt;Julia&lt;/a&gt;, &lt;a href="https://pandas.pydata.org/"&gt;Python&lt;/a&gt;, &lt;a href="https://cran.r-project.org/doc/manuals/r-release/R-intro.html#Data-frames"&gt;R&lt;/a&gt;, and &lt;a href="https://www.pola.rs/"&gt;Rust&lt;/a&gt;. &lt;a href="https://github.com/pola-rs/nodejs-polars"&gt;Polars provides DataFrames for JavaScript&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Manipulating DataFrames in JavaScript" src="https://blog.jupyter.org/posts/2023/bringing-modern-javascript-to-the-jupyter-notebook/images/004-1_m6aEUA3UifW-qNnPu8etPw.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Manipulating DataFrames in JavaScript&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;What’s surprising me is how easily I can use &lt;a href="https://github.com/rgbkrk/denotebooks/blob/main/10.2_Polar%20DataFrames.ipynb"&gt;D3 with DataFrames&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="D3 and Polars playing well together in a notebook" src="https://blog.jupyter.org/posts/2023/bringing-modern-javascript-to-the-jupyter-notebook/images/005-1_BBPR6Od9aEwZanntimfkTA.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;D3 and Polars playing well together in a notebook&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;We can draw plots directly to a canvas.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2023/bringing-modern-javascript-to-the-jupyter-notebook/images/006-1_ZF4Q_S9RVCcf_fLe191kQw.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;as well as use any library that emits SVG&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2023/bringing-modern-javascript-to-the-jupyter-notebook/images/007-1_i8svfV32WtGxOxKCQv0-UA.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;This enables a broad range of JavaScript developers and data professionals to iterate in a notebook &lt;strong&gt;writing documentation that runs&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;If you want to explore and visualize data with JavaScript/TypeScript, check out &lt;a href="https://deno.com"&gt;Deno&lt;/a&gt; and their &lt;a href="https://docs.deno.com/runtime/manual/tools/jupyter"&gt;docs on getting started with Jupyter&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you know Rust, come &lt;a href="https://github.com/denoland/deno"&gt;hack on Deno&lt;/a&gt;. 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.&lt;/p&gt;
&lt;p&gt;You can also contribute by &lt;a href="https://github.com/denoland/deno/issues"&gt;filing bugs&lt;/a&gt;, writing notebooks, and sharing the Deno kernel with others.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Jupyter Denos" src="https://blog.jupyter.org/posts/2023/bringing-modern-javascript-to-the-jupyter-notebook/images/008-1_Lq2UGOudjDsPyzNFtHXr2Q.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Jupyter Denos&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Happy Notebooking!&lt;/p&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
</content><category term="JavaScript"/><category term="kernels"/></entry><entry><title>A Jupyter kernel for GNU Octave</title><link href="https://blog.jupyter.org/posts/2023/a-jupyter-kernel-for-gnu-octave/" rel="alternate"/><published>2023-01-11T17:33:00+00:00</published><updated>2023-01-11T17:33:00+00:00</updated><author><name>Giulio Girardi</name></author><id>tag:blog.jupyter.org,2023-01-11:/posts/2023/a-jupyter-kernel-for-gnu-octave/</id><summary type="html">&lt;p&gt;Today, we are happy to announce the xeus-octave project, a Jupyter kernel for GNU Octave.&lt;/p&gt;
</summary><content type="html">&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2023/a-jupyter-kernel-for-gnu-octave/images/001-0__HZJpXD-awr4mPDG.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;GNU Octave is a long-standing member of the scientific computing ecosystem, featuring a mathematics-oriented syntax with built-in 2D/3D plotting and visualization tools, and compatible with the Matlab syntax. It is a natural candidate for high-quality integration in the Jupyter ecosystem.&lt;/p&gt;
&lt;p&gt;Jupyter has been devised with language agnosticism in mind since it was spun off from the IPython project. The Kernel (the part of the infrastructure responsible for executing the code input by the user) is a key extension point to Jupyter, and dozens of language kernels exist in the ecosystem.&lt;/p&gt;
&lt;p&gt;Prior art on Jupyter / GNU Octave integration includes the &lt;a href="https://github.com/Calysto/octave_kernel"&gt;Calysto/Octave_kernel&lt;/a&gt; project by Steven Silvester (who is also a core Jupyter maintainer and the co-creator of JupyterLab). This existing kernel is part of the family of kernels built on top of the &lt;a href="https://github.com/ipython/ipykernel"&gt;ipykernel&lt;/a&gt; reference implementation of the Jupyter protocol, in Python.&lt;/p&gt;
&lt;p&gt;Today, we are happy to announce the &lt;a href="https://github.com/jupyter-xeus/xeus-octave/"&gt;xeus-octave&lt;/a&gt; project, a Jupyter kernel for GNU Octave. Xeus-octave was created by &lt;a href="http://rapgenic.it/"&gt;Giulio Girardi&lt;/a&gt;, recently joined by &lt;a href="https://twitter.com/AntoineProuvost"&gt;Antoine Prouvost&lt;/a&gt; — and has been incorporated into the Project Jupyter governance.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2023/a-jupyter-kernel-for-gnu-octave/images/002-0__YEF9gl4rxnapBiz.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;Xeus-octave is built upon the &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;Xeus&lt;/a&gt; library, a C++ implementation of the Jupyter kernel protocol that enables fast development of new kernels using programming languages’ native APIs, unlocking new possibilities without parsing standard outputs or requiring a Python interpreter at runtime. After all, a Jupyter kernel is merely an executable providing a well-defined communication protocol. It is not bound to Python APIs.&lt;/p&gt;
&lt;h2 id="a-fully-featured-kernel"&gt;A fully-featured kernel&lt;/h2&gt;
&lt;p&gt;We strove to make the xeus-octave kernel as complete as possible for this first iteration.&lt;/p&gt;
&lt;h3 id="multiple-graphical-toolkits"&gt;Multiple graphical toolkits&lt;/h3&gt;
&lt;h4 id="notebook"&gt;Notebook&lt;/h4&gt;
&lt;p&gt;A &lt;code&gt;notebook&lt;/code&gt; Octave graphical toolkit can be used to render plots natively, and present the figure as an image in the notebook.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Screenshot of GNU Octave in action in Jupyter with the native Octave plots" src="https://blog.jupyter.org/posts/2023/a-jupyter-kernel-for-gnu-octave/images/003-0_0tfvTOYDrjvK6SyO.jpg" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;The classic Octave sombrero plot rendered as an image inside the notebook&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h4 id="plotly"&gt;Plotly&lt;/h4&gt;
&lt;p&gt;An experimental &lt;code&gt;plotly&lt;/code&gt; Octave graphical toolkit can also use &lt;a href="https://plotly.com/"&gt;Plotly&lt;/a&gt; to render code in the browser, with dynamic views, zooms, and hover tooltips.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Screenshot of GNU Octave in action in Jupyter with the Plotly plots" src="https://blog.jupyter.org/posts/2023/a-jupyter-kernel-for-gnu-octave/images/004-0_ZT86_erLnKUyRvP4.jpg" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Multiple plots rendered in a single plotly figure&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h3 id="rich-display"&gt;Rich display&lt;/h3&gt;
&lt;p&gt;The kernel binds with the C++ interface of GNU Octave to provide a complete Octave experience. Having access to the exact internal type of the objects, xeus-octave can present data with rich output.&lt;/p&gt;
&lt;p&gt;Matrices can be presented as HTML or LaTeX tables.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2023/a-jupyter-kernel-for-gnu-octave/images/005-0_015CLZOO-yfxSRSe.webp" alt="Screenshot of GNU Octave in action in Jupyter with the rich rendering of matrices" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;Symbolic expressions can be presented as LaTeX formulas.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2023/a-jupyter-kernel-for-gnu-octave/images/006-0_U-Nxc_9FqhxARiGF.webp" alt="Screenshot of GNU Octave in action in Jupyter with the rich rendering of equations" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;Structured data can be visualized as interactive tree views&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2023/a-jupyter-kernel-for-gnu-octave/images/007-0_oshl__rdb1-OtfCM.webp" alt="Screenshot of GNU Octave in action in Jupyter with the rich rendering of Octave structured data as interactive tree views." loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;h3 id="interactive-help"&gt;Interactive help&lt;/h3&gt;
&lt;p&gt;Formatted help, extracted from the GNU Octave reference manual, can be queried using the &lt;code&gt;?&lt;/code&gt; syntax.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2023/a-jupyter-kernel-for-gnu-octave/images/008-0_zQcXBUjgbwqY0IHG.webp" alt="Screenshot of GNU Octave in action in Jupyter with the interactive help displayed in an output cell" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;h2 id="trying-it-online"&gt;Trying it online&lt;/h2&gt;
&lt;p&gt;You can try the new Jupyter kernel for GNU Octave by clicking on the link below:&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;a href="https://mybinder.org/v2/gh/jupyter-xeus/xeus-octave/stable?urlpath=/lab/tree/notebooks/xeus-octave.ipynb"&gt;&lt;img src="https://blog.jupyter.org/posts/2023/a-jupyter-kernel-for-gnu-octave/images/009-0_SDB4IuVwEGuk2yz1.webp" alt="Logo of Binder" loading="lazy" data-body-image=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The Binder linked above includes examples of notebooks in the fields of Electronics, demonstrating the usability of xeus-octave in real-life complex scenarios.&lt;/p&gt;
&lt;p&gt;This interactive demo is also featured on the Jupyter website at &lt;a href="https://jupyter.org/try#kernels"&gt;https://jupyter.org/try#kernels&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="installing-xeus-octave"&gt;Installing xeus-octave&lt;/h2&gt;
&lt;p&gt;Xeus-octave has been packaged on conda-forge and can be installed with mamba or conda.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;$&lt;span class="w"&gt; &lt;/span&gt;mamba&lt;span class="w"&gt; &lt;/span&gt;install&lt;span class="w"&gt; &lt;/span&gt;xeus-octave&lt;span class="w"&gt; &lt;/span&gt;-c&lt;span class="w"&gt; &lt;/span&gt;conda-forge
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="future-work"&gt;Future Work&lt;/h2&gt;
&lt;p&gt;In future iterations, we will work towards consolidating the xeus-octave experience, by adding cell magics and improving the Plotly integration.&lt;/p&gt;
&lt;p&gt;A major ongoing development is the implementation of an Octave backend for Jupyter interactive widgets, based on the &lt;a href="https://github.com/jupyter-xeus/xwidgets"&gt;xwidgets&lt;/a&gt; project. Combined with &lt;a href="https://github.com/voila-dashboards/voila"&gt;Voilà&lt;/a&gt;, it will be possible to use GNU Octave to create standalone web dashboards.&lt;/p&gt;
&lt;p&gt;Another ongoing endeavor is to port a growing portion of the scientific computing stack to WebAssembly (using the emscripten-forge project). Producing a Wasm build of GNU Octave will enable its use with &lt;a href="https://github.com/jupyterlite/jupyterlite"&gt;Jupyterlite&lt;/a&gt;, enabling large-scale deployments on websites, blogs, and arbitrary web pages without any need for scalable cloud infrastructure.&lt;/p&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
&lt;h2 id="about-the-authors"&gt;About the authors&lt;/h2&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2023/a-jupyter-kernel-for-gnu-octave/images/010-1_h3ZtdyQicGecxGFPkc3tYQ.jpeg" alt="Headshot of Antoine Prouvost" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://twitter.com/AntoineProuvost"&gt;Antoine Prouvost&lt;/a&gt; is a Scientific Software Engineer at &lt;a href="https://twitter.com/QuantStack"&gt;QuantStack&lt;/a&gt; and a xeus-octave maintainer. Previously, Antoine was researching Machine Learning and Combinatorial Optimization at the &lt;a href="https://twitter.com/DS4DM"&gt;DS4DM&lt;/a&gt; research chair and &lt;a href="https://twitter.com/MILAMontreal"&gt;Mila&lt;/a&gt;.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2023/a-jupyter-kernel-for-gnu-octave/images/011-1_vUpNORkYEpszm-vTZoSXwg.jpeg" alt="Headshot of Giulio Girardi" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://rapgenic.it/"&gt;Giulio Girardi&lt;/a&gt; is a Master’s degree student in Electronic Engineering at the &lt;a href="https://twitter.com/UniPadova"&gt;UNIPD&lt;/a&gt;, currently working as an Electronic Engineer at &lt;a href="http://protechgroup.it/"&gt;Protech Engineering&lt;/a&gt;. Giulio is the creator and a maintainer of the xeus-octave project.&lt;/p&gt;
</content><category term="kernels"/><category term="xeus"/></entry><entry><title>Xeus-Lite</title><link href="https://blog.jupyter.org/posts/2021/xeus-lite/" rel="alternate"/><published>2021-10-25T09:40:00+00:00</published><updated>2021-10-25T09:40:00+00:00</updated><author><name>Thorsten Beier</name></author><id>tag:blog.jupyter.org,2021-10-25:/posts/2021/xeus-lite/</id><summary type="html">&lt;p&gt;JupyterLite + Xeus = ❤️️&lt;/p&gt;
</summary><content type="html">&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/xeus-lite/images/001-1_PUlJi6czJovO90t-Dsgt5g.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;JupyterLite is a &lt;a href="https://jupyter.org/"&gt;JupyterLab&lt;/a&gt; distribution that runs entirely in the web browser, backed by in-browser language kernels. &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;Xeus&lt;/a&gt; is C++ library for writing &lt;a href="https://jupyter.org/"&gt;Jupyter&lt;/a&gt; kernels. In this blogpost we show how these two can work together.&lt;/p&gt;
&lt;h2 id="jupyterlite"&gt;JupyterLite&lt;/h2&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/xeus-lite/images/002-1_dbJO26hiSR8EFygX1rnqrA.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;With vanilla Jupyter, kernels are running in separate processes. The communication between the kernels and the client is achieved with &lt;a href="https://zeromq.org/"&gt;ZeroMQ&lt;/a&gt;. In contrast to this, JupyterLite runs entirely in the browser, including the language kernels. The following kernels are already implemented in the JupyterLite framework:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;JavaScript Kernel&lt;/li&gt;
&lt;li&gt;P5 Kernel: Since P5 is a JavaScript library, it is easy to provide a P5 kernel running in the browser.&lt;/li&gt;
&lt;li&gt;A Python kernel based on &lt;a href="https://github.com/pyodide/pyodide"&gt;pyodide&lt;/a&gt; called pyolite: While the two JavaScript based kernels are trivial to implement as in-browser kernels, &lt;a href="https://github.com/pyodide/pyodide"&gt;pyodide&lt;/a&gt; is a Python interpreter compiled to WebAssembly via Emscripten. Not only Python itself has been compiled to WebAssembly, but also the whole Scientific Stack including packages like: Numpy, Scipy, Pandas and many more. An overview of packages can be found &lt;a href="https://github.com/pyodide/pyodide/tree/main/packages"&gt;here&lt;/a&gt;. Furthermore any pure Python package can be installed from within pyolite.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Since JupyterLite runs entirely in the browser, it is &lt;a href="https://jupyterlite.github.io/demo/lab/index.html"&gt;very easy to try it out&lt;/a&gt;!&lt;/p&gt;
&lt;h2 id="xeus"&gt;Xeus&lt;/h2&gt;
&lt;p class="standalone-image"&gt;&lt;a href="https://xeus.readthedocs.io/en/latest/?badge=latest"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/xeus-lite/images/003-1_c-fyt4I1GOXnrq3tkexaGA.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/jupyter-xeus/xeus"&gt;Xeus&lt;/a&gt; is C++ library for writing &lt;a href="https://jupyter.org/"&gt;Jupyter&lt;/a&gt; kernels. It is not a kernel but a library that simplifies the process of writing kernels. &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;Xeus&lt;/a&gt; implements the &lt;a href="https://jupyter-client.readthedocs.io/en/stable/messaging.html"&gt;Jupyter messaging protocol&lt;/a&gt;, so that kernel authors only need to implement a handful of methods related to the actual interpreter, like executing pieces of code and auto-completing.&lt;br&gt;
With the help of Xeus, it is very easy to write Jupyter kernels . In fact, &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;Xeus&lt;/a&gt; has already been used for making several &lt;a href="https://jupyter.org/"&gt;language kernels&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/QuantStack/xeus-cling"&gt;xeus-cling&lt;/a&gt; is a Xeus-based C++ kernel.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jupyter-xeus/xeus-python"&gt;xeus-python&lt;/a&gt; is a Xeus-based Python kernel.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jupyter-xeus/xeus-lua"&gt;xeus-lua&lt;/a&gt; is a Xeus-based Lua kernel.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jupyter-xeus/xeus-sql"&gt;xeus-sql&lt;/a&gt; / &lt;a href="https://github.com/jupyter-xeus/xeus-sqlite"&gt;xeus-sqlite&lt;/a&gt; are Xeus-based kernel for SQL / SQLite databases.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jupyter-xeus/xeus-robot"&gt;xeus-robot&lt;/a&gt; is a Jupyter kernel for the &lt;a href="https://robotframework.org/"&gt;Robot Framework&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gitlab.com/lfortran/lfortran/-/merge_requests/514"&gt;LFortran&lt;/a&gt; is a modern interactive Fortran compiler with a Xeus-based Jupyter kernel.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Since it is very easy to write Xeus based kernels for Jupyter, we also want to leverage Xeus for writing JupyterLite kernels. This has been the main motivation for &lt;a href="https://blog.jupyter.org/posts/2021/xeus-2-0/"&gt;Xeus 2.0&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="xeus-architecture"&gt;Xeus Architecture&lt;/h2&gt;
&lt;p&gt;Xeus is has three extension points as depicted below&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/xeus-lite/images/004-1_CTgb-wk-_TMWVhDzB-Yx7g.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;em&gt;&lt;strong&gt;Server&lt;/strong&gt;&lt;/em&gt; is the middleware component responsible for receiving and sending messages to the Jupyter client. The default server it is built upon ZeroMQ and handles the concurrency model of the application.&lt;br&gt;
As we will see later, a custom server is needed to connect Xeus with JupyterLite.&lt;/li&gt;
&lt;li&gt;The &lt;em&gt;&lt;strong&gt;Interpreter&lt;/strong&gt;&lt;/em&gt; provides the interface that kernel authors must implement.&lt;/li&gt;
&lt;li&gt;The &lt;em&gt;&lt;strong&gt;Debugger&lt;/strong&gt;&lt;/em&gt; provides the interface that can to be implemented when the kernel shall have &lt;a href="https://blog.jupyter.org/posts/2020/a-visual-debugger-for-jupyter/"&gt;debug capabilities&lt;/a&gt;, but we do not yet support this for Xeus-JupyterLite-Kernels.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="jupyterlite-xeus-kernels"&gt;JupyterLite Xeus-Kernels&lt;/h2&gt;
&lt;p&gt;Traditionally, the Jupyter kernel and the Client to the Jupyter kernel run in separate processes as depicted below:&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/xeus-lite/images/005-1_jHLLHjTjNWlV0e38GjvACw.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;The communication between the kernels and the client (ie the Jupyter-server) are done with inter-process communication via &lt;a href="https://zeromq.org/"&gt;ZeroMQ&lt;/a&gt;. But with JupyterLite the &lt;a href="https://jupyterlite.readthedocs.io/en/latest/"&gt;kernel runs directly in the browser&lt;/a&gt;. In that case, ZeroMQ is not required anymore to communicate with the frontend. This was the motivation for &lt;a href="https://blog.jupyter.org/posts/2021/xeus-2-0/"&gt;Xeus 2.0&lt;/a&gt;, where it is possible to build Xeus without ZeroMQ. To implement JupyterLite Kernels with Xeus, we need to implement a custom Server which handles the &lt;a href="https://emscripten.org/"&gt;Emscripten&lt;/a&gt;/&lt;a href="https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html"&gt;Embind&lt;/a&gt;-based communication layer&lt;/p&gt;
&lt;p&gt;The overall architecture is best described with the picture below: The C++ Xeus-Kernel is compiled to WebAssembly with &lt;a href="https://emscripten.org/"&gt;Emscripten&lt;/a&gt; / &lt;a href="https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html"&gt;Embind&lt;/a&gt;. The WebAssembly compiled code runs in a dedicated WebWorker thread. The WebWorker communicates via Message Passing with a thin layer of TypeScript which implements the &lt;a href="https://github.com/jupyterlite/jupyterlite/blob/d94d472fcdfb5ce760820a6a9cd2c6ea6fc84014/packages/kernel/src/tokens.ts#L45"&gt;IKernel&lt;/a&gt; API of JupyterLite. The communication between JupyterLite and the JupyterLite k ernel is done entirely in JavaScript.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/xeus-lite/images/006-1_AwkYyHKDxj0_EYitMAxZ5Q.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;The C++ code needed to compile an existing xeus-kernel to WebAssembly is very minimal:&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/xeus-lite/images/007-1_Qdv9gVF_oO9n2nLffY35SQ.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;Furthermore one needs a thin layer of TypeScript / JavaScript to implement the JupyterLite &lt;a href="https://github.com/jupyterlite/jupyterlite/blob/d94d472fcdfb5ce760820a6a9cd2c6ea6fc84014/packages/kernel/src/tokens.ts#L45"&gt;IKernel API&lt;/a&gt;. A good example of this code is given in the &lt;a href="https://github.com/jupyterlite/xeus-lua-kernel"&gt;JupyterLite Xeus-Lua repository&lt;/a&gt;. While most of the repositories code is boilerplate, one needs to provide a simple &lt;a href="https://github.com/DerThorsten/jupyterlite_xeus_lua/blob/main/Dockerfile"&gt;Dockerfile&lt;/a&gt; which compiles the Xeus-Kernel to WebAssembly.&lt;/p&gt;
&lt;h2 id="xeus-lua"&gt;Xeus-Lua&lt;/h2&gt;
&lt;p class="standalone-image"&gt;&lt;a href="https://github.com/jupyter-xeus/xeus-lua"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/xeus-lite/images/008-1_XjZ84G9Ftb3krekpiqBuiw.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;We recently released a &lt;a href="https://blog.jupyter.org/posts/2021/from-jupyter-to-the-moon/"&gt;Xeus based Lua kernel&lt;/a&gt;. Even though its worthwhile to have Xeus-Lua kernel for vanilla Jupyter, the main purpose of Xeus-Lua was to experiment with Xeus-based JupyterLite kernels.&lt;br&gt;
We choose Lua as the first language to try out Xeus-based JupyterLite kernels since Lua is easy to compile to WebAssembly.&lt;br&gt;
A JupyterLite instance with Xeus-Lua included can be found &lt;a href="https://jupyterlite.github.io/demo/lab/"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Xeus-Lua has built in support for interactive widgets" src="https://blog.jupyter.org/posts/2021/xeus-lite/images/009-1_Iwg6iPSZmr5o1ZozOlJXDQ.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Xeus-Lua has built in support for interactive widgets&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="xeus-wren"&gt;Xeus-Wren&lt;/h2&gt;
&lt;p class="standalone-image"&gt;&lt;a href="https://github.com/DerThorsten/xeus-wren"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/xeus-lite/images/010-1_AaO7Or9i6ZDmYR3PNGXh9Q.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Wren is relatively new “&lt;a href="https://wren.io/"&gt;Classy Little scripting Language&lt;/a&gt;” created by the author of the great book &lt;a href="https://craftinginterpreters.com/"&gt;“Crafting Interpreters”&lt;/a&gt;. Wren can be described with the following:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://wren.io/"&gt;Think Smalltalk in a Lua-sized package with a dash of Erlang and wrapped up in a familiar, modern syntax&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;We choose Wren as a second language to experiment with Xeus + JupyterLite since it is small, simple to compile to WebAssembly and easy to embed in C++. A JupyterLite instance with Xeus-Wren included can be found &lt;a href="https://jupyterlite.github.io/demo/lab?path=xeus-wren%2Fiwren.ipynb"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Xeus-Wren has built in support for displaying data of various MIME-types" src="https://blog.jupyter.org/posts/2021/xeus-lite/images/011-1_b-X9cmzXfq7NIXeEwfEzow.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Xeus-Wren has built in support for displaying data of various MIME-types&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="outlook"&gt;Outlook&lt;/h2&gt;
&lt;p&gt;There are many languages which can be compiled to WebAssembly like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Julia: &lt;a href="https://github.com/Keno/julia-wasm"&gt;https://github.com/Keno/julia-wasm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Octave: &lt;a href="https://news.ycombinator.com/item?id=22926120"&gt;https://news.ycombinator.com/item?id=22926120&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;C++: &lt;a href="https://github.com/binji/wasm-clang"&gt;https://github.com/binji/wasm-clang&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Python: &lt;a href="https://github.com/pyodide/pyodide"&gt;https://github.com/pyodide/pyodide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also databases as sqlite can be compiled to WebAssembly:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Sqlite: &lt;a href="https://github.com/sql-js/sql.js/"&gt;https://github.com/sql-js/sql.js/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Our goal is to provide Xeus-based JupyterLite kernels for these projects to make the JupyterLite ecosystem even more powerful.&lt;/p&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
&lt;h2 id="acknowledgements"&gt;Acknowledgements&lt;/h2&gt;
&lt;p&gt;We like to thank&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://twitter.com/jtpio"&gt;Jeremy Tuloup&lt;/a&gt;, &lt;a href="https://twitter.com/mad_tandon"&gt;Madhur Tandon&lt;/a&gt;, &lt;a href="https://twitter.com/martinrenou"&gt;Martin Renou&lt;/a&gt;, and &lt;a href="https://github.com/bollwyvl"&gt;Nicholas Bollweg&lt;/a&gt; for their work on JupyterLite.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/johanmabille"&gt;Johan Mabille&lt;/a&gt; for Xeus and his help implementing the Xeus-Emscripten server.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="about-the-author"&gt;About the Author&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://twitter.com/thorstenbeier"&gt;Thorsten Beier&lt;/a&gt; is a Scientific Software Engineer at &lt;a href="https://quantstack.net/"&gt;QuantStack&lt;/a&gt;. Before joining &lt;a href="https://quantstack.net/"&gt;QuantStack&lt;/a&gt;, he graduated in computer science at the University of Heidelberg and worked at the &lt;a href="https://www.embl.org/"&gt;EMBL&lt;/a&gt;. As an open source developer, Thorsten worked on a variety of projects, from &lt;a href="https://github.com/DerThorsten/nifty"&gt;nifty&lt;/a&gt; and &lt;a href="https://github.com/ukoethe/vigra"&gt;vigra&lt;/a&gt; in C++ to &lt;a href="https://github.com/inferno-pytorch/inferno"&gt;inferno&lt;/a&gt;, &lt;a href="https://kipoi.org/"&gt;kipoi&lt;/a&gt; and &lt;a href="https://www.ilastik.org/"&gt;ilastik&lt;/a&gt; in Python.&lt;/p&gt;
</content><category term="JupyterLite"/><category term="kernels"/><category term="WebAssembly"/><category term="xeus"/></entry><entry><title>Xeus 2.0</title><link href="https://blog.jupyter.org/posts/2021/xeus-2-0/" rel="alternate"/><published>2021-09-28T09:41:00+00:00</published><updated>2021-09-28T09:41:00+00:00</updated><author><name>Johan Mabille</name></author><id>tag:blog.jupyter.org,2021-09-28:/posts/2021/xeus-2-0/</id><summary type="html">&lt;p&gt;Announcing a major release of the Xeus library&lt;/p&gt;
</summary><content type="html">&lt;p&gt;We have just released &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;Xeus&lt;/a&gt; 2. This is a major release of the library. While it includes backward-incompatible changes, they are very limited and upgrading your kernels should be relatively easy.&lt;/p&gt;
&lt;h2 id="how-to-upgrade-xeus-based-kernels"&gt;How to upgrade Xeus-based kernels&lt;/h2&gt;
&lt;p&gt;Let’s illustrate that with the code of a simple kernel before and after upgrading to Version 2. Most typically, only the kernel’s main file will have to be updated:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gh"&gt;diff --git a/example/src/main.cpp b/example/src/main.cpp&lt;/span&gt;
&lt;span class="gh"&gt;index 29de437..eb8fdba 100644&lt;/span&gt;
&lt;span class="gd"&gt;--- a/example/src/main.cpp&lt;/span&gt;
&lt;span class="gi"&gt;+++ b/example/src/main.cpp&lt;/span&gt;
&lt;span class="gu"&gt;@@ -21,12 +21,14 @@ int main(int argc, char* argv[])&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;    std::string file_name = (argc == 1) ? &amp;quot;connection.json&amp;quot; : argv[2];
&lt;span class="w"&gt; &lt;/span&gt;    xeus::xconfiguration config = xeus::load_configuration(file_name);

&lt;span class="gi"&gt;+    auto context = xeus::make_context&amp;lt;zmq::context_t&amp;gt;();&lt;/span&gt;
&lt;span class="gi"&gt;+&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;    // Create interpreter instance
&lt;span class="w"&gt; &lt;/span&gt;    using interpreter_ptr = std::unique_ptr&amp;lt;custom::custom_interpreter&amp;gt;;
&lt;span class="w"&gt; &lt;/span&gt;    interpreter_ptr interpreter = interpreter_ptr(new custom::custom_interpreter());

&lt;span class="w"&gt; &lt;/span&gt;    // Create kernel instance and start it
&lt;span class="gd"&gt;-    xeus::xkernel kernel(config, xeus::get_user_name(), std::move(interpreter), xeus::make_xserver_zmq);&lt;/span&gt;
&lt;span class="gi"&gt;+    xeus::xkernel kernel(config, xeus::get_user_name(), std::move(context), std::move(interpreter), xeus::make_xserver_zmq);&lt;/span&gt;
&lt;span class="w"&gt; &lt;/span&gt;    kernel.start();

&lt;span class="w"&gt; &lt;/span&gt;    return 0;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The first change is that you now have to instantiate and pass an additional argument to the kernel constructor: the &lt;em&gt;context&lt;/em&gt;. Fortunately, Xeus provides a function to build such a context object, making the update straightforward. We will detail the reason for this change in the next section.&lt;/p&gt;
&lt;p&gt;The second change is that the kernel constructor now &lt;em&gt;requires&lt;/em&gt; a function to build the server while a default value was provided for it in Xeus 1.x. Again, the motivations for this change will be detailed in the next section. Finally the functions for building the servers have moved to different headers.&lt;/p&gt;
&lt;p&gt;To summarize, here is the list of the breaking changes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The kernel’s constructor now requires an additional argument, the context. Xeus provides a function to easily instantiate it.&lt;/li&gt;
&lt;li&gt;The order of kernel’s constructor arguments has changed, and the function for building the server is now required.&lt;/li&gt;
&lt;li&gt;The functions for building the servers have moved to the headers where the corresponding servers are defined.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="motivation-for-these-changes"&gt;Motivation for these changes&lt;/h2&gt;
&lt;p&gt;When we created &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;Xeus&lt;/a&gt;, kernels were expected to run in separate processes. The communication between the kernels and the client was achieved with the &lt;a href="https://zeromq.org/"&gt;ZeroMQ&lt;/a&gt; middleware framework, and it was natural to heavily rely on it in Xeus.&lt;/p&gt;
&lt;p&gt;Recent &lt;a href="https://blog.jupyter.org/posts/2021/jupyterlite-jupyter-webassembly-python/"&gt;developments&lt;/a&gt; have pushed in a different direction, where the &lt;a href="https://jupyterlite.readthedocs.io/en/latest/"&gt;kernel can run directly in the browser&lt;/a&gt;. In that case, a middleware library is not required anymore to communicate with the frontend. The architecture of Xeus was not suitable for this new kind of kernels. An update was required so that it is possible to build Xeus without the dependency on ZeroMQ.&lt;/p&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
&lt;h2 id="about-the-developers"&gt;About the developers&lt;/h2&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/xeus-2-0/images/001-0_tHIyMRx_JbgkU2xy.jpeg" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Johan Mabille&lt;/strong&gt; is a scientific software developer at QuantStack. Johan is a co-author of Xeus, and developed the debugger extension to xeus-python.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/xeus-2-0/images/002-0_zUMSbNcno1BZSfjO.jpeg" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sylvain Corlay&lt;/strong&gt; is the founder and CEO of QuantStack, and a core Jupyter developer. He co-authored Xeus and xeus-python.&lt;/p&gt;
</content><category term="kernels"/><category term="releases"/><category term="xeus"/></entry><entry><title>From Jupyter to the Moon</title><link href="https://blog.jupyter.org/posts/2021/from-jupyter-to-the-moon/" rel="alternate"/><published>2021-09-24T12:24:00+00:00</published><updated>2021-09-24T12:24:00+00:00</updated><author><name>Thorsten Beier</name></author><id>tag:blog.jupyter.org,2021-09-24:/posts/2021/from-jupyter-to-the-moon/</id><summary type="html">&lt;p&gt;A new Jupyter kernel for Lua based on Xeus&lt;/p&gt;
</summary><content type="html">&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/from-jupyter-to-the-moon/images/001-1_Or2bu8twFwywgACqLOE9AA.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Jupyter architecture in a nutshell" src="https://blog.jupyter.org/posts/2021/from-jupyter-to-the-moon/images/002-0_jvG9j3sKufQRiuLl.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;&lt;a href="https://jupyter.org/"&gt;Jupyter&lt;/a&gt; architecture in a nutshell&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;A key principle in Jupyter’s design is &lt;em&gt;&lt;strong&gt;language agnosticism&lt;/strong&gt;&lt;/em&gt;, and one of the main extension points of the Jupyter ecosystem is the &lt;em&gt;&lt;strong&gt;kernel&lt;/strong&gt;&lt;/em&gt;, the part of the architecture responsible for executing the user’s code.&lt;/p&gt;
&lt;p&gt;In the end, a Jupyter kernel is merely an executable implementing a well-defined inter-process communication protocol.&lt;/p&gt;
&lt;p&gt;A reference implementation of the kernel is ipykernel, which provides the default Python kernel, and utilities to build other language kernels. Another reference implementation of the protocol is &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;Xeus&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="xeus"&gt;Xeus&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://github.com/jupyter-xeus/xeus"&gt;Xeus&lt;/a&gt; is C++ library for writing &lt;a href="https://jupyter.org/"&gt;Jupyter&lt;/a&gt; kernels. It is not a kernel but a library that simplifies the process of writing kernels. &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;Xeus&lt;/a&gt; implements the &lt;a href="https://jupyter-client.readthedocs.io/en/stable/messaging.html"&gt;Jupyter messaging protocol&lt;/a&gt;, so that kernel authors only need to implement a handful of methods related to the actual interpreter, like executing pieces of code and auto-completing. There is a long &lt;a href="https://github.com/dbohdan/embedded-scripting-languages"&gt;list of scripting languages&lt;/a&gt; which can be embedded in C/C++. With the help of Xeus, it is very easy to write kernels for such languages. In fact, &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;Xeus&lt;/a&gt; has already been used for making several &lt;a href="https://jupyter.org/"&gt;language kernels&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/QuantStack/xeus-cling"&gt;xeus-cling&lt;/a&gt; is a Xeus-based C++ kernel.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jupyter-xeus/xeus-python"&gt;xeus-python&lt;/a&gt; is a Xeus-based Python kernel.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jupyter-xeus/xeus-sql"&gt;xeus-sql&lt;/a&gt; / &lt;a href="https://github.com/jupyter-xeus/xeus-sqlite"&gt;xeus-sqlite&lt;/a&gt; are Xeus-based kernel for SQL / SQLite databases.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jupyter-xeus/xeus-robot"&gt;xeus-robot&lt;/a&gt; is a Jupyter kernel for the &lt;a href="https://robotframework.org/"&gt;Robot Framework&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://gitlab.com/lfortran/lfortran/-/merge_requests/514"&gt;LFortran&lt;/a&gt; is a modern interactive Fortran compiler with a Xeus-based Jupyter kernel.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="xwidgets"&gt;xwidgets&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://github.com/jupyter-xeus/xwidgets"&gt;xwidget&lt;/a&gt; library is a C++ implementation of the &lt;a href="https://ipywidgets.readthedocs.io/en/latest/"&gt;Jupyter Interactive Widget protocol&lt;/a&gt;. Xwidgets were initially developed for xeus-cling, the Xeus C++ kernel, but any Xeus-based kernel can reuse these components.&lt;/p&gt;
&lt;h2 id="a-xeus-based-lua-kernel"&gt;A xeus-based Lua kernel&lt;/h2&gt;
&lt;p&gt;Today, I am pleased to announce the release of &lt;a href="https://github.com/jupyter-xeus/xeus-lua"&gt;xeus-lua&lt;/a&gt;, a new &lt;a href="https://jupyter.org/"&gt;Jupyter&lt;/a&gt; kernel for &lt;a href="https://www.lua.org/"&gt;Lua&lt;/a&gt; based on &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;Xeus&lt;/a&gt;.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/from-jupyter-to-the-moon/images/003-0_xQYvimlGgIZuuZC2.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;h2 id="lua"&gt;Lua&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://www.lua.org/"&gt;Lua&lt;/a&gt;, which means “Moon” in Portuguese, is a lightweight embeddable scripting language written in C. While Python is one of the leading scripting languages for scientific application, &lt;a href="https://www.lua.org/"&gt;Lua&lt;/a&gt; is the leading scripting language used in games / game engines. The &lt;a href="https://en.wikipedia.org/wiki/Category:Lua_(programming_language)-scripted_video_games"&gt;list of video games using Lua&lt;/a&gt; is long and includes triple-a games like Crisys and Farcry. Not only games rely on Lua, but &lt;a href="https://en.wikipedia.org/wiki/List_of_applications_using_Lua"&gt;also applications like Adobe Photoshop Lightroom&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="sol2"&gt;Sol2&lt;/h2&gt;
&lt;figure&gt;
&lt;img alt="With the Sol2 library, Lua can be embedded into C++ in a very elegant way." src="https://blog.jupyter.org/posts/2021/from-jupyter-to-the-moon/images/004-0_qDdOEdX0PhOKNTMJ.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;With the &lt;a href="https://github.com/ThePhD/sol2"&gt;Sol2&lt;/a&gt; library, Lua can be embedded into C++ in a very elegant way.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;While Lua itself can be embedded in a C++ application quite easy, it is even easier when using &lt;a href="https://github.com/ThePhD/sol2"&gt;Sol2&lt;/a&gt;. &lt;a href="https://github.com/ThePhD/sol2"&gt;Sol2&lt;/a&gt; is a C++ library that simplifies the usage of Lua from C++. Furthermore &lt;a href="https://github.com/ThePhD/sol2"&gt;Sol2&lt;/a&gt; can be used to expose C++ classes to Lua, in a similar fashion as &lt;a href="https://github.com/pybind/pybind11"&gt;pybind11&lt;/a&gt; can be used to expose C++ classes to Python.&lt;/p&gt;
&lt;h2 id="xeus-lua"&gt;Xeus-lua&lt;/h2&gt;
&lt;figure&gt;
&lt;img alt="The compulsory “Hello, World!” from xeus-lua. This blog-post would be incomplete without it." src="https://blog.jupyter.org/posts/2021/from-jupyter-to-the-moon/images/005-0_Rw3rs6Cdj5FEfAQf.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;The compulsory “Hello, World!” from xeus-lua. This blog-post would be incomplete without it.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;I am pleased to announce &lt;a href="https://github.com/jupyter-xeus/xeus-lua"&gt;xeus-lua&lt;/a&gt;, a new Jupyter kernel for the Lua language based on &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;Xeus&lt;/a&gt;. Using &lt;a href="https://github.com/ThePhD/sol2"&gt;Sol2&lt;/a&gt; and &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;Xeus&lt;/a&gt;, it was very easy to implement a feature rich kernel using modern C++. With the help of &lt;a href="https://github.com/ThePhD/sol2"&gt;Sol2&lt;/a&gt;, it was trivial to expose the xwidgets classes to Lua such that we can use the widgets within &lt;a href="https://github.com/jupyter-xeus/xeus-lua"&gt;xeus-lua&lt;/a&gt; notebooks.&lt;/p&gt;
&lt;h2 id="but-why-a-lua-kernel"&gt;But why a Lua kernel?&lt;/h2&gt;
&lt;p&gt;While &lt;a href="https://www.lua.org/"&gt;Lua&lt;/a&gt; might not be the hippest language in 2021, there are multiple reasons while I choose to implement such a &lt;a href="https://www.lua.org/"&gt;Lua&lt;/a&gt; kernel, and why such a kernel can be useful:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Writing a &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;Xeus&lt;/a&gt;-based kernel is the best way to learn and familiarize oneself with the &lt;a href="https://github.com/jupyter-xeus"&gt;xeus ecosystem&lt;/a&gt;. And since Lua is so easy to build and embed, Lua and Xeus are perfect match. Implementing this kernel gave me great insights into Xeus and Jupyter itself.&lt;/li&gt;
&lt;li&gt;Learning &lt;a href="https://www.lua.org/"&gt;Lua&lt;/a&gt; with &lt;a href="https://github.com/jupyter-xeus/xeus-lua"&gt;xeus-lua&lt;/a&gt; is fun! Before writing &lt;a href="https://github.com/jupyter-xeus/xeus-lua"&gt;xeus-lua&lt;/a&gt;, I had zero Lua experience. While implementing xeus-lua I learned &lt;a href="https://www.lua.org/"&gt;Lua&lt;/a&gt; from within Jupyter by playing around with xwidgets from within Lua — this was a very joyful experience.&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://github.com/jupyter-xeus/xeus-lua"&gt;xeus-lua&lt;/a&gt; implementation might serve as reference for future kernel authors. In particular the &lt;a href="https://github.com/jupyter-xeus/xeus-lua/blob/main/src/xwidgets.cpp"&gt;integration of xwidgets in xeus-lua&lt;/a&gt; might be useful for future implementations.&lt;/li&gt;
&lt;li&gt;Since Lua is so easy to build, &lt;a href="https://github.com/jupyter-xeus/xeus-lua"&gt;xeus-lua&lt;/a&gt; can be built for WebAssembly and will be integrated in &lt;a href="https://jupyterlite.readthedocs.io/en/latest/"&gt;JupyterLite&lt;/a&gt; — &lt;strong&gt;stay tuned!&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="features"&gt;Features&lt;/h2&gt;
&lt;p&gt;Obviously &lt;a href="https://github.com/jupyter-xeus/xeus-lua"&gt;xeus-lua&lt;/a&gt; supports the execution of code.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Simple code execution" src="https://blog.jupyter.org/posts/2021/from-jupyter-to-the-moon/images/006-0_AzW845V1EKlvxO2j.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Simple code execution&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Streams are redirected to the notebooks output&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Redirection of streams" src="https://blog.jupyter.org/posts/2021/from-jupyter-to-the-moon/images/007-0_A-2SpNknQua_D73o.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Redirection of streams&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Errors messages are shown in the notebooks output&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Error Handling" src="https://blog.jupyter.org/posts/2021/from-jupyter-to-the-moon/images/008-0_yMSCAFt70y43daKm.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Error Handling&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Input streams are redirected to the notebooks input system&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="User Input" src="https://blog.jupyter.org/posts/2021/from-jupyter-to-the-moon/images/009-0_Pfa9ASycXFejuZKp.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;User Input&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Statements can be auto-completed with a press of tab&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Code Completion" src="https://blog.jupyter.org/posts/2021/from-jupyter-to-the-moon/images/010-0_dQfGwr6PtuQaSUAb.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Code Completion&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Data of different sources as Latex, JSON and html can be displayed.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Display Data" src="https://blog.jupyter.org/posts/2021/from-jupyter-to-the-moon/images/011-0_tHhXDPzcThHTqor5.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Display Data&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Interactive widgets can be added to the notebook!&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Widgets" src="https://blog.jupyter.org/posts/2021/from-jupyter-to-the-moon/images/012-0_066MCiSNqv21zJOS.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Widgets&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;We can feed the widgets with data!&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Binary buffers for widgets" src="https://blog.jupyter.org/posts/2021/from-jupyter-to-the-moon/images/013-0_ArP2iU5tKYDHvvZd.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Binary buffers for widgets&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="try-it-out"&gt;Try It Out&lt;/h2&gt;
&lt;p&gt;You can try it right now with &lt;a href="https://mybinder.org/"&gt;binder&lt;/a&gt;, without the need of installing anything on your computer, just by clicking on &lt;a href="https://mybinder.org/v2/gh/jupyter-xeus/xeus-lua/main?urlpath=/lab/tree/notebooks/game_of_life.ipynb"&gt;&lt;strong&gt;this link&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;a href="https://mybinder.org/v2/gh/jupyter-xeus/xeus-lua/main?urlpath=/lab/tree/notebooks/game_of_life.ipynb"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/from-jupyter-to-the-moon/images/014-0_NiFI9An8ZGVDSYyG.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="other-lua-kernels"&gt;Other Lua kernels&lt;/h2&gt;
&lt;p&gt;There are several &lt;a href="https://www.lua.org/"&gt;Lua&lt;/a&gt; kernels available:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/tomstitt/lupyter"&gt;lupyter&lt;/a&gt;: A Python based implementation of a Lua Jupyter kernel. The heavy lifting is done in a C-extension.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/guysv/ilua"&gt;ILua&lt;/a&gt;: A feature rich implementation. Ilua is implemented in Python and does the communication with Lua via IPC.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/pakozm/IPyLua"&gt;IPyLua&lt;/a&gt;: IPyLua is a pure Lua implementation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;While these implementations are feature rich and work well, none of the above supports interactive widgets. Since &lt;a href="https://github.com/jupyter-xeus/xeus-lua"&gt;xeus-lua&lt;/a&gt; is based on &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;Xeus&lt;/a&gt;, we can reuse components from the Xeus ecosystem like &lt;a href="https://github.com/jupyter-xeus/xwidgets"&gt;xwidgets&lt;/a&gt; with minimal effort.&lt;/p&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
&lt;h2 id="acknowledgments"&gt;Acknowledgments&lt;/h2&gt;
&lt;p&gt;We are grateful to &lt;a href="https://twitter.com/juliettetaka?lang=en"&gt;Juliette Taka&lt;/a&gt; for the illustration.&lt;/p&gt;
&lt;h2 id="about-the-author"&gt;About the Author&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://quantstack.net/thorsten.html"&gt;Thorsten Beier&lt;/a&gt; is a Scientific Software Engineer at &lt;a href="https://quantstack.net/"&gt;QuantStack&lt;/a&gt;. Before joining &lt;a href="https://quantstack.net/"&gt;QuantStack&lt;/a&gt;, he graduated in computer science at the University of Heidelberg and worked at the &lt;a href="https://www.embl.org/"&gt;EMBL&lt;/a&gt;. As an open source developer, Thorsten worked on a variety of projects, from &lt;a href="https://github.com/DerThorsten/nifty"&gt;nifty&lt;/a&gt;, and &lt;a href="https://github.com/ukoethe/vigra"&gt;vigra&lt;/a&gt; in C++ to &lt;a href="https://github.com/inferno-pytorch/inferno"&gt;inferno&lt;/a&gt;, &lt;a href="https://kipoi.org/"&gt;kipoi&lt;/a&gt; and &lt;a href="https://www.ilastik.org/"&gt;ilastik&lt;/a&gt; in Python.&lt;/p&gt;
</content><category term="kernels"/><category term="xeus"/></entry><entry><title>Enabling the JupyterLab debugger with ipykernel</title><link href="https://blog.jupyter.org/posts/2021/enabling-the-jupyterlab-debugger-with-ipykernel/" rel="alternate"/><published>2021-05-13T11:45:00+00:00</published><updated>2021-06-02T14:59:00+00:00</updated><author><name>Sylvain Corlay</name></author><id>tag:blog.jupyter.org,2021-05-13:/posts/2021/enabling-the-jupyterlab-debugger-with-ipykernel/</id><summary type="html">&lt;p&gt;Support for the Jupyter Debugger Protocol just landed in ipykernel&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;em&gt;Support for the Jupyter Debugger Protocol just landed in ipykernel&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;JupyterLab 3.0 includes a visual debugger that allows to interactively set breakpoints, step into functions, and inspect variables with any Jupyter kernel that implements the Jupyter debugger protocol.&lt;/p&gt;
&lt;p&gt;The first two language kernels to implement the new protocol were &lt;a href="https://github.com/jupyter-xeus/xeus-python/"&gt;xeus-python&lt;/a&gt; (a Python kernel) and &lt;a href="https://github.com/jupyter-xeus/xeus-robot/"&gt;xeus-robot&lt;/a&gt; (a kernel for Robot Framework). Unfortunately, the reference Python kernel, &lt;a href="https://github.com/ipython/ipykernel"&gt;&lt;strong&gt;ipykernel&lt;/strong&gt;&lt;/a&gt;, did not support debugging yet, &lt;em&gt;until now&lt;/em&gt;!&lt;/p&gt;
&lt;p&gt;Today, we are pleased to announce that debugging support landed in ipykernel, and will be available in the next major release, ipykernel 6.0. Pre-releases including the ipykernel debugger are available.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Debugging with ipykernel" src="https://blog.jupyter.org/posts/2021/enabling-the-jupyterlab-debugger-with-ipykernel/images/001-1_jSQWLvCYoV-L-kp_lTkRKg.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Debugging with ipykernel&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="what-will-change-with-ipykernel-60"&gt;What will change with ipykernel 6.0?&lt;/h2&gt;
&lt;p&gt;Enabling support for debugging in ipykernel required important changes in the code base regarding the concurrency model of the kernel. The main change is that the processing of messages on the “control channel” now happens in a different thread, allowing for the processing to happen while user code is running.&lt;/p&gt;
&lt;p&gt;Ipykernel 6.0 includes several other updates. Tornado coroutines were dropped in favor of native coroutines. The Matplotlib inline backend was split into a separate package, and ipykernel depends on &lt;a href="https://github.com/microsoft/debugpy"&gt;debugpy&lt;/a&gt;, an implementation of the Debug Adapter Protocol for Python.&lt;/p&gt;
&lt;p&gt;If you are interested in testing out the new features, check out the beta release!&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pip install ipykernel --pre
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="try-it-now"&gt;Try it now!&lt;/h2&gt;
&lt;p&gt;Thanks to &lt;a href="https://mybinder.org/"&gt;MyBinder&lt;/a&gt;, you can also try it out without the need of installing anything on your computer. Just follow this link:&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;a href="https://mybinder.org/v2/gist/SylvainCorlay/a6405bbdfa9d58a670a67f3a47741bd2/HEAD?urlpath=doc%2Ftree%2Fdebugger.ipynb"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/enabling-the-jupyterlab-debugger-with-ipykernel/images/002-0_rELNpt0w5qbk_GQn.jpg" alt="" loading="lazy" data-body-image=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="what-about-the-future"&gt;What about the future?&lt;/h2&gt;
&lt;p&gt;A lot of new features are in the works with the JupyterLab debugger.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;JupyterLab 3.1 will include several usability improvements to the debugger.&lt;/li&gt;
&lt;li&gt;It will also add the ability to submit code for execution when stopped at a breakpoint.&lt;/li&gt;
&lt;li&gt;We are working on a richer variable explorer, using Jupyter’s rich display system to enable the rich-rendering of variables in the explorer, to &lt;em&gt;e.g.&lt;/em&gt; render dataframes as tables.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Finally, we also plan on adding debugging support to other language kernels.&lt;/p&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
&lt;h2 id="acknowledgements"&gt;Acknowledgements&lt;/h2&gt;
&lt;p&gt;The work of Johan and Sylvain at &lt;a href="https://twitter.com/QuantStack"&gt;QuantStack&lt;/a&gt; on the debugger support in ipykernel was funded by &lt;a href="https://www.twosigma.com/"&gt;Two Sigma&lt;/a&gt;. We are grateful to Min Ragan Kelley and Matthias Bussonnier, who reviewed the pull requests on debugger support.&lt;/p&gt;
&lt;h2 id="about-the-authors"&gt;About the authors&lt;/h2&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/enabling-the-jupyterlab-debugger-with-ipykernel/images/003-1_8_HgQuq5_HXhLXSdfGnhrA.jpeg" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://twitter.com/JohanMabille"&gt;Johan Mabille&lt;/a&gt; is a scientific software developer at QuantStack.&lt;/p&gt;
&lt;p&gt;Johan is very active in the Jupyter ecosystem, as the creator of &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;xeus&lt;/a&gt;, a C++ implementation of the Jupyter protocol, and several language kernels, such as &lt;a href="https://github.com/jupyter-xeus/xeus-python"&gt;xeus-python&lt;/a&gt;, &lt;a href="https://github.com/jupyter-xeus/xeus-cling"&gt;xeus-cling&lt;/a&gt;, and &lt;a href="https://github.com/jupyter-xeus/xeus-robot"&gt;xeus-robot&lt;/a&gt;. Johan also made contributions to the Jupyter widgets ecosystem and to JupyterLab.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/enabling-the-jupyterlab-debugger-with-ipykernel/images/004-1_LpuIpGQIDYMhv5IBthmwcA.jpeg" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://twitter.com/SylvainCorlay"&gt;Sylvain Corlay&lt;/a&gt; is the founder and CEO of QuantStack.&lt;/p&gt;
&lt;p&gt;As an open-source developer, Sylvain is very active in the Jupyter project with contributions in several components of the stack, including widgets, kernels, nbconvert, and others. He is also a steering committee member of the project.&lt;/p&gt;
&lt;p&gt;Sylvain also does volunteer work for the community, as member of board of directors of NumFOCUS, co-organizer of the &lt;a href="https://www.meetup.com/pyData-paris"&gt;PyData Paris Meetup&lt;/a&gt;, and vice-chair of JupyterCon 2020.&lt;/p&gt;
</content><category term="debugging"/><category term="IPython"/><category term="JupyterLab"/><category term="kernels"/></entry><entry><title>Abracadabra! Bringing the magics to xeus-python</title><link href="https://blog.jupyter.org/posts/2021/abracadabra-bringing-the-magics-to-xeus-python/" rel="alternate"/><published>2021-02-18T13:30:00+00:00</published><updated>2021-02-18T14:06:00+00:00</updated><author><name>Martin Renou</name></author><id>tag:blog.jupyter.org,2021-02-18:/posts/2021/abracadabra-bringing-the-magics-to-xeus-python/</id><summary type="html">&lt;p&gt;Last year, we set ourselves to implement a visual debugger for JupyterLab. This endeavor required major developments in the JupyterLab front-end, in core-Jupyter protocols, and on the kernel side (the part of the Jupyter infrastructure responsible for executing the code).&lt;/p&gt;</summary><content type="html">&lt;p&gt;Last year, we set ourselves to implement a &lt;strong&gt;visual debugger for JupyterLab&lt;/strong&gt;. This endeavor required major developments in the JupyterLab front-end, in core-Jupyter protocols, and on the kernel side (the part of the Jupyter infrastructure responsible for executing the code).&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;a href="https://github.com/jupyter-xeus/xeus-python"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/abracadabra-bringing-the-magics-to-xeus-python/images/001-0_B0kK-zNJr0Suisyv.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For kernel-side development, we decided to start with the &lt;a href="https://blog.jupyter.org/posts/2019/a-new-python-kernel-for-jupyter/"&gt;&lt;strong&gt;xeus-python&lt;/strong&gt; kernel&lt;/a&gt;, a lightweight implementation of a Jupyter kernel for the Python programming language. Based on &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;&lt;strong&gt;xeus&lt;/strong&gt;&lt;/a&gt;, xeus-python has a flexible concurrency model that was required to &lt;em&gt;e.g.&lt;/em&gt; add breakpoints while executing code.&lt;/p&gt;
&lt;p&gt;Unfortunately, xeus-python did not provide all ipykernel features (magics, Matplotlib support, &lt;em&gt;etc.&lt;/em&gt;). Furthermore, many notebooks depend on IPython, as they import it explicitely or make use of the IPython configuration system.&lt;/p&gt;
&lt;p&gt;Today, we are proud to announce that xeus-python supports 100% of the IPython magics! This was achieved by leveraging the core IPython package. This is getting us closer to feature parity with ipykernel.&lt;/p&gt;
&lt;h2 id="magics"&gt;Magics&lt;/h2&gt;
&lt;p&gt;xeus-python now supports all magics that IPython provides and even user-defined magics!&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Support for builtin IPython magics and user-defined magics" src="https://blog.jupyter.org/posts/2021/abracadabra-bringing-the-magics-to-xeus-python/images/002-1_PTiGVyDsazc_ziz6Bk4EnA.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Support for builtin IPython magics and user-defined magics&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="matplotlib"&gt;Matplotlib&lt;/h2&gt;
&lt;p&gt;Most Matplotlib back-ends are now supported by xeus-python, allowing you to show static plots with the inline back-end or interactive plots with &lt;a href="https://github.com/matplotlib/ipympl"&gt;ipympl&lt;/a&gt; in your Notebook:&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Matplotlib inline back-end and ipympl interactive back-end" src="https://blog.jupyter.org/posts/2021/abracadabra-bringing-the-magics-to-xeus-python/images/003-1_cmnPUKlhHHwUf8PZhNQx2g.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Matplotlib inline back-end and ipympl interactive back-end&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="extending"&gt;Extending&lt;/h2&gt;
&lt;p&gt;IPython has a rich configuration system that you can tweak in order to get an enhanced Notebook experience. Xeus-python now supports any configuration you setup for IPython:&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Automatically import NumPy in the IPython settings" src="https://blog.jupyter.org/posts/2021/abracadabra-bringing-the-magics-to-xeus-python/images/004-1_bB5hiXIbVAlV3kX9KJfLfg.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Automatically import NumPy in the IPython settings&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="visual-debugging"&gt;Visual Debugging&lt;/h2&gt;
&lt;p&gt;The latest JupyterLab version introduced a visual debugger in its interface. xeus-python was the first Jupyter kernel to add support for it!&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Stepping into Python code in JupyterLab with the visual debugger" src="https://blog.jupyter.org/posts/2021/abracadabra-bringing-the-magics-to-xeus-python/images/005-1_efZAtaJQqeirAZoEqbxvdw.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Stepping into Python code in JupyterLab with the visual debugger&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;xeus-python is not the only Jupyter kernel that supports debugging anymore: &lt;a href="https://github.com/jupyter-xeus/xeus-robot"&gt;xeus-robot&lt;/a&gt; is a xeus-based Jupyter kernel for the &lt;a href="https://robotframework.org/"&gt;RobotFramework&lt;/a&gt; language that supports the JupyterLab visual debugger.&lt;/p&gt;
&lt;h2 id="try-it-online"&gt;Try it online&lt;/h2&gt;
&lt;p&gt;Thanks to &lt;a href="https://mybinder.org/"&gt;MyBinder&lt;/a&gt;, you can try it out without the need of installing anything on your computer. Just follow this link:&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;a href="https://mybinder.org/v2/gh/jupyter-xeus/xeus-python/stable?urlpath=/lab/tree/notebooks/xeus-python.ipynb"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/abracadabra-bringing-the-magics-to-xeus-python/images/006-0_2sBOFFsk_322apCe.jpg" alt="" loading="lazy" data-body-image=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="installation"&gt;Installation&lt;/h2&gt;
&lt;p&gt;You can install the latest xeus-python version using mamba or conda:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mamba install xeus-python -c conda-forge
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Or&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;conda install xeus-python -c conda-forge
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;You can also compile it yourself, instructions can be found in the repository:&lt;br&gt;
&lt;a href="https://github.com/jupyter-xeus/xeus-python"&gt;https://github.com/jupyter-xeus/xeus-python&lt;/a&gt;&lt;/p&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
&lt;h2 id="acknowledgments"&gt;Acknowledgments&lt;/h2&gt;
&lt;p&gt;My work on &lt;a href="https://github.com/QuantStack/xeus"&gt;xeus&lt;/a&gt; and &lt;a href="https://github.com/QuantStack/xeus-python"&gt;xeus-python&lt;/a&gt; at &lt;a href="https://twitter.com/QuantStack"&gt;&lt;strong&gt;QuantStack&lt;/strong&gt;&lt;/a&gt; was funded by &lt;a href="https://www.techatbloomberg.com/"&gt;&lt;strong&gt;Bloomberg&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="about-the-author"&gt;About the Author&lt;/h2&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/abracadabra-bringing-the-magics-to-xeus-python/images/007-0_5XdymjYwzZe-hvy8.jpg" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;My name is &lt;a href="https://twitter.com/martinRenou"&gt;Martin Renou&lt;/a&gt;, I am a Scientific Software Engineer at &lt;a href="https://quantstack.net/"&gt;&lt;strong&gt;QuantStack&lt;/strong&gt;&lt;/a&gt;. Before joining QuantStack, I studied at the aerospace engineering school &lt;a href="https://www.isae-supaero.fr/en"&gt;SUPAERO&lt;/a&gt; in Toulouse, France. I also worked at Logilab in Paris, France and Enthought in Cambridge, UK. As an open-source developer at QuantStack, I work on a variety of projects, from &lt;a href="https://github.com/QuantStack/xtensor"&gt;xtensor&lt;/a&gt; and &lt;a href="https://github.com/QuantStack/xeus-python/"&gt;xeus-python&lt;/a&gt; in C++ to &lt;a href="https://github.com/jupyter-widgets/ipyleaflet"&gt;ipyleaflet&lt;/a&gt; and &lt;a href="https://github.com/bqplot/bqplot"&gt;bqplot&lt;/a&gt; in Python and JavaScript/TypeScript.&lt;/p&gt;
</content><category term="IPython"/><category term="kernels"/><category term="xeus"/></entry><entry><title>An SQL solution for Jupyter</title><link href="https://blog.jupyter.org/posts/2021/an-sql-solution-for-jupyter/" rel="alternate"/><published>2021-02-03T12:03:00+00:00</published><updated>2023-01-10T18:33:00+00:00</updated><author><name>Mariana Meireles</name></author><id>tag:blog.jupyter.org,2021-02-03:/posts/2021/an-sql-solution-for-jupyter/</id><summary type="html">&lt;p&gt;xeus-sql: A xeus-sqlite sequel&lt;/p&gt;
</summary><content type="html">&lt;p&gt;A few months ago we released &lt;a href="https://github.com/jupyter-xeus/xeus-sqlite"&gt;xeus-sqlite&lt;/a&gt;, a Jupyter kernel that allows users to make SQLite queries directly from the notebook. With the needs of the Jupyter data science community in mind we decided to expand on this project.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="RDBMSes supported by xeus-sql" src="https://blog.jupyter.org/posts/2021/an-sql-solution-for-jupyter/images/001-1_tbfa_AWoqb-yB1Tk6Uq3ng.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;RDBMSes supported by xeus-sql&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Today, we’re happy to announce the next step of this endeavour, bringing you &lt;a href="https://github.com/jupyter-xeus/xeus-sql"&gt;&lt;strong&gt;xeus-sql&lt;/strong&gt;&lt;/a&gt; a general-purpose database access tool for Jupyter, which allows you to make SQL queries on many different databases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MySQL&lt;/li&gt;
&lt;li&gt;PostgreSQL&lt;/li&gt;
&lt;li&gt;SQLite3&lt;/li&gt;
&lt;li&gt;DB2&lt;/li&gt;
&lt;li&gt;Oracle&lt;/li&gt;
&lt;li&gt;Firebird&lt;/li&gt;
&lt;li&gt;and any database with an ODBC driver.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To offer all these integrations we rely on the &lt;a href="http://soci.sourceforge.net/"&gt;SOCI&lt;/a&gt; library as the backbone of the project. SOCI abstracts all the different database connections and query details behind a unified C++ API. xeus-sql uses SOCI and &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;xeus&lt;/a&gt; to expose SQL functionalities to Jupyter.&lt;/p&gt;
&lt;p&gt;Xeus-sql, as well as the MySQL, PostgreSQL and SQLite3 backends of SOCI are available on conda-forge, meaning you can install them easily with &lt;strong&gt;conda&lt;/strong&gt; or &lt;a href="https://github.com/mamba-org/mamba"&gt;&lt;strong&gt;mamba&lt;/strong&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# Installing xeus-sql and the mysql backend
mamba install xeus-sql soci-mysql -c conda-forge
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# Installing xeus-sql and the postgresql backend
mamba install xeus-sql soci-postgresql -c conda-forge
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;# Installing xeus-sql and the sqlite backend
mamba install xeus-sql soci-sqlite -c conda-forge
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;There are idiosyncrasies between these different SQL backends which we detail in the xeus-sql &lt;a href="http://xeus-sql.readthedocs.io/en/latest/"&gt;documentation&lt;/a&gt; and &lt;a href="https://github.com/jupyter-xeus/xeus-sql/tree/master/examples"&gt;examples&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="visualizing-your-queries"&gt;Visualizing your queries&lt;/h2&gt;
&lt;figure&gt;
&lt;img alt="HTML and text table visualizations for different Jupyter interfaces" src="https://blog.jupyter.org/posts/2021/an-sql-solution-for-jupyter/images/002-1_1cl12TkS8uqKDgXvZCJQtQ.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;HTML and text table visualizations for different Jupyter interfaces&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;You’re probably familiar with visualizing your SQL tables and query results in the form of… tables, of course. Jupyter’s rich display system offers the option of showing them in rich-text display or plain-text display depending on which application you’re using.&lt;/p&gt;
&lt;p&gt;Beyond displaying queries with tables, you can now easily create &lt;a href="https://vega.github.io/vega-lite/"&gt;Vega-Lite&lt;/a&gt; graphs from your query results directly in the notebook:&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Running a series of examples on a notebook" src="https://blog.jupyter.org/posts/2021/an-sql-solution-for-jupyter/images/003-1_pyLtQiOV5uzGk-VKAVyD4Q.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Running a series of examples on a notebook&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;To support this feature xeus-sql relies on &lt;a href="https://github.com/Quantstack/xvega"&gt;xvega&lt;/a&gt;, a C++ backend to vega, and custom Jupyter magics for plotting through a mini-language implemented in the &lt;a href="https://github.com/jupyter-xeus/xvega-bindings/"&gt;xvega-bindings&lt;/a&gt; utility library. Besides using the mini-language you can directly provide the JSON specification for your visualization, thanks to contributions by &lt;a href="https://github.com/wangfenjin"&gt;Wang Fenjin&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Vega-Lite is a powerful library and there are many different visualizations you can create from your relational data using xeus-sql. You can see some other examples below:&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Examples of different visualizations generated with xeus-sql and xvega-lite by Wang Fenjin" src="https://blog.jupyter.org/posts/2021/an-sql-solution-for-jupyter/images/004-1_Rh5QEx6ntJHJ7gSpxgp29A.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;&lt;a href="https://github.com/wangfenjin/xeus-tidb/blob/develop/examples/TiDB.ipynb"&gt;Examples&lt;/a&gt; of different visualizations generated with xeus-sql and xvega-lite by Wang Fenjin&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;We’re looking forward to exchange with users and learn more about their use cases for xeus-sql and xvega, so if you have any questions please drop them on the public &lt;a href="https://gitter.im/QuantStack/Lobby"&gt;QuantStack chat&lt;/a&gt;, or open an issue at the project’s &lt;a href="https://github.com/jupyter-xeus/xeus-sql"&gt;GitHub page&lt;/a&gt;. As always, contributions are welcome!&lt;/p&gt;
&lt;h2 id="try-it-online"&gt;Try it online!&lt;/h2&gt;
&lt;p&gt;You can try the stable version on Binder without the need of installing anything on your computer just by clicking on the image below:&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;a href="https://mybinder.org/v2/gh/jupyter-xeus/xeus-sql/stable?urlpath=lab/tree/examples/XVega%20operations.ipynb"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/an-sql-solution-for-jupyter/images/005-0_cZCb7p2dP8Y27P7P.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
&lt;h2 id="acknowledgements"&gt;Acknowledgements&lt;/h2&gt;
&lt;p&gt;We are grateful to &lt;a href="https://github.com/wangfenjin"&gt;Wang Fenjin&lt;/a&gt; for his contributions with respect to the use of vega specs in xeus-sql. The plotting mini-language was built upon the xvega library by &lt;a href="https://twitter.com/mad_tandon"&gt;Madhur Tandon&lt;/a&gt;. We are also grateful to the &lt;a href="https://github.com/SOCI/soci/"&gt;SOCI&lt;/a&gt; contributors for their awesome package that made this work possible.&lt;/p&gt;
&lt;h2 id="about-the-author"&gt;About the author&lt;/h2&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/an-sql-solution-for-jupyter/images/006-1_S-w69baox7Q1D997a5yKNw.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;My name is &lt;a href="https://twitter.com/mari_meir"&gt;Mariana Meireles&lt;/a&gt; and I’m a software developer working for &lt;a href="http://quantstack.net/"&gt;QuantStack&lt;/a&gt;. I care deeply about the impacts that technology has in the world and try my best to be the change I want to see by contributing to open source projects that stand upon libre and diverse standards.&lt;/p&gt;
</content><category term="kernels"/><category term="xeus"/></entry><entry><title>Robotic Process Automation with JupyterLab</title><link href="https://blog.jupyter.org/posts/2021/robotic-process-automation-with-jupyterlab/" rel="alternate"/><published>2021-01-18T10:36:00+00:00</published><updated>2021-01-18T10:36:00+00:00</updated><author><name>Martin Renou</name></author><id>tag:blog.jupyter.org,2021-01-18:/posts/2021/robotic-process-automation-with-jupyterlab/</id><summary type="html">&lt;p&gt;Introducing a new Jupyter kernel for Robot Framework&lt;/p&gt;
</summary><content type="html">&lt;p&gt;Robotic Process Automation (RPA) differs from classical automation tools in that the actions to automate can be developed by observing a user perform a task in a graphical user interface, across multiple applications.&lt;/p&gt;
&lt;p&gt;It is a means to lower the entry barrier of process automation and enable the use of tools that don’t provide a programmatic interface.&lt;/p&gt;
&lt;p&gt;Most typically, RPA developers will use a mixed approach between textual programming and performing actions manually. The resulting programs are typically called software &lt;em&gt;robots&lt;/em&gt;. Therefore, interactive computing tools like Jupyter are a natural environment for RPA, as the interactive nature of Jupyter allows for quick iterations and trial-and-errors when developing such robots.&lt;/p&gt;
&lt;p&gt;While many RPA tools are commercial software, &lt;a href="https://robotframework.org/"&gt;Robot Framework&lt;/a&gt; and the tooling developed by &lt;a href="https://robocorp.com/"&gt;Robocorp&lt;/a&gt; provide an open-source RPA programming language, with a high-level syntax, extensible with Python plugins. It has a rich ecosystem of libraries and tools that are developed as separate projects.&lt;/p&gt;
&lt;h2 id="robot-framework-and-project-jupyter"&gt;Robot Framework and Project Jupyter&lt;/h2&gt;
&lt;p&gt;Today, we are happy to announce the first release of &lt;a href="https://github.com/jupyter-xeus/xeus-robot"&gt;&lt;strong&gt;xeus-robot&lt;/strong&gt;&lt;/a&gt;, a Jupyter kernel for &lt;a href="https://robotframework.org/"&gt;Robot Framework&lt;/a&gt; based on &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;xeus&lt;/a&gt;, supporting the new JupyterLab 3.0 visual debugger, auto-completion, and much more!&lt;/p&gt;
&lt;p&gt;But before we dive into xeus-robot, we should recognize the earlier work by &lt;a href="https://github.com/bollwyvl"&gt;Nick Bollweg&lt;/a&gt; and &lt;a href="https://github.com/datakurre"&gt;Asko Soukka&lt;/a&gt;, who developed two Jupyter kernels for Robot Framework, &lt;a href="https://github.com/gtri/irobotframework"&gt;irobotframework&lt;/a&gt;, and &lt;a href="https://github.com/robots-from-jupyter/robotkernel"&gt;robotkernel&lt;/a&gt;, and gave an &lt;a href="https://www.youtube.com/watch?v=rbYF_RmiAR8"&gt;amazing talk&lt;/a&gt; together at &lt;a href="https://robocon.io/"&gt;RoboCon&lt;/a&gt; in 2019!&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The motivation for us to reboot this effort with a kernel based on xeus was to enable the &lt;strong&gt;JupyterLab Visual Debugger&lt;/strong&gt; for this kernel. This requires a different concurrency model than that of ipykernel, which underlies both irobotframework and robotkernel. In the end, we were able to provide the same features and more, including e.g. code completion in Python cells, debugging etc.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="diving-into-xeus-robot"&gt;Diving into Xeus-robot&lt;/h2&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/robotic-process-automation-with-jupyterlab/images/001-1_3HNfLnwDpXNZ6n6HPD2lXQ.webp" alt="Xeus robot logo" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/jupyter-xeus/xeus-robot"&gt;xeus-robot&lt;/a&gt; is a reboot of the already existing robotkernel, based on xeus.&lt;/p&gt;
&lt;p&gt;Like most language kernels, &lt;a href="https://github.com/jupyter-xeus/xeus-robot"&gt;xeus-robot&lt;/a&gt; supports code completion, inspection, error handling, etc. It also allows using Python cells to define custom robot keywords in Python, those Python cells support code completion as well.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Code completion in Robot framework" src="https://blog.jupyter.org/posts/2021/robotic-process-automation-with-jupyterlab/images/002-1_OPqkYEI78eT1dj5P6WEeXg.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Code Completion in Robot Framework&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;By using the libraries robotframework-seleniumlibrary and robotframework-seleniumscreenshots, you can even complete the selection of elements on the page you are currently testing!&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="RPA code completion" src="https://blog.jupyter.org/posts/2021/robotic-process-automation-with-jupyterlab/images/003-1_Z-aWN6goZH_1YcabAYj2fQ.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Code completion with an action of the user in the UI.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The &lt;code&gt;%%python&lt;/code&gt; cell magic makes it possible to extend Robotframework with Python modules in the notebook.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Robot Framework extenions in Python" src="https://blog.jupyter.org/posts/2021/robotic-process-automation-with-jupyterlab/images/004-1_TSiSmKHJOGE0PQ_c7alv1w.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Extending RobotFramework with Python, and code completion in Python cells&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Widget-based UIs are provided to test Robotframework “keywords”.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Robot Framework and Jupyter widgets" src="https://blog.jupyter.org/posts/2021/robotic-process-automation-with-jupyterlab/images/005-1_nyXQAQivNvV23xvS_1KCYQ.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Testing Robot Framework “keywords” with Jupyter widgets&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Last but not least, xeus-robot comes with full support for the JupyterLab Visual Debugger! After the xeus-python kernel, it is the second Jupyter kernel to support the Jupyter Debugger Protocol! We hope that many more will come.&lt;/p&gt;
&lt;p&gt;You can set breakpoints, step in defined keywords (the equivalent of functions), inspect variables, and see the callstack, as shown below.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="JupyterLab Visual Debugger" src="https://blog.jupyter.org/posts/2021/robotic-process-automation-with-jupyterlab/images/006-1_EFxI8mzCwYwnK9DB_xGxTQ.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;The JupyterLab Visual Debugger in action with Robot Framework&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="installing-xeus-robot"&gt;Installing xeus-robot&lt;/h2&gt;
&lt;p&gt;Xeus-robot is available for all platforms on conda-forge, and can be installed with conda or mamba.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mamba install xeus-robot -c conda-forge
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;The &lt;code&gt;jupyterlab-robotmode&lt;/code&gt; package, which provides JupyterLab syntax highlighting for Robot Framework will also be installed as a dependency.&lt;/p&gt;
&lt;p&gt;For your conda installation, we recommend starting from &lt;strong&gt;mambaforge&lt;/strong&gt; or &lt;strong&gt;miniforge&lt;/strong&gt; which are available for download &lt;a href="https://github.com/conda-forge/miniforge"&gt;&lt;strong&gt;here&lt;/strong&gt;&lt;/a&gt;, and default to the conda-forge channel (making the &lt;code&gt;-c conda-forge&lt;/code&gt; argument unnecessary).&lt;/p&gt;
&lt;h2 id="try-it-online"&gt;Try it online&lt;/h2&gt;
&lt;p&gt;Thanks to &lt;a href="https://mybinder.org/"&gt;MyBinder&lt;/a&gt;, you can try it out without the need of installing anything on your computer. Just follow this link:&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;a href="https://mybinder.org/v2/gh/jupyter-xeus/xeus-robot/stable?urlpath=/lab/tree/notebooks/xrobot.ipynb"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/robotic-process-automation-with-jupyterlab/images/007-0_TQpdhVZSAnE-XOrm.jpg" alt="&amp;quot;Launch binder&amp;quot; badge" loading="lazy" data-body-image=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
&lt;h2 id="acknowledgments"&gt;Acknowledgments&lt;/h2&gt;
&lt;p class="standalone-image"&gt;&lt;a href="https://robocorp.com/"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/robotic-process-automation-with-jupyterlab/images/008-1_E9XGge6uWrbmvndUoZ1Qug.webp" alt="Robocorp logo" loading="lazy" data-body-image=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The work on xeus-robot by &lt;a href="https://twitter.com/QuantStack"&gt;QuantStack&lt;/a&gt; was funded by &lt;a href="https://robocorp.com/"&gt;Robocorp&lt;/a&gt;, and is part of their initiative to create an open-source RPA ecosystem. Beyond the xeus-robot kernel, Robocorp also funds the integration of Robot Framework with &lt;a href="https://marketplace.visualstudio.com/items?itemName=robocorp.robocorp-code"&gt;Visual Studio Code&lt;/a&gt;, &lt;a href="https://rpaframework.org/"&gt;RPA Framework&lt;/a&gt;, and other development to push the Robot Framework project forward.&lt;/p&gt;
&lt;p&gt;The implementation of the debugger in xeus-robot relies on &lt;a href="https://github.com/robocorp/robotframework-lsp"&gt;robotframework-lsp&lt;/a&gt; by &lt;a href="https://twitter.com/fabiofz"&gt;Fabio Zadrozny&lt;/a&gt; and we want to thank him for his help in integrating it in xeus-robot.&lt;/p&gt;
&lt;h2 id="about-the-authors"&gt;About the authors&lt;/h2&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/robotic-process-automation-with-jupyterlab/images/009-1_zwPmx9pH4pkXOxowHQOsuQ.jpeg" alt="Martin Renou" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Martin Renou&lt;/strong&gt; is a scientific software developer at QuantStack. He is the creator of the xeus-python and xeus-robot kernels.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2021/robotic-process-automation-with-jupyterlab/images/010-1_YQZupQRMB6JJfhM_byi2KA.jpeg" alt="Johan Mabille" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Johan Mabille&lt;/strong&gt; is a scientific software developer at QuantStack. He is a co-author of the xeus project, and developed the debugger extensions to xeus-python and xeus-robot. He also co-authored the front-end for the JupyterLab visual debugger.&lt;/p&gt;
</content><category term="debugging"/><category term="JupyterLab"/><category term="kernels"/><category term="xeus"/></entry><entry><title>SlicerJupyter: a 3D Slicer kernel for interactive publications</title><link href="https://blog.jupyter.org/posts/2020/slicerjupyter-a-3d-slicer-kernel-for-interactive/" rel="alternate"/><published>2020-07-08T16:29:00+00:00</published><updated>2020-07-08T16:58:00+00:00</updated><author><name>Jean-Christophe Fillion-Robin</name></author><id>tag:blog.jupyter.org,2020-07-08:/posts/2020/slicerjupyter-a-3d-slicer-kernel-for-interactive/</id><summary type="html">&lt;p&gt;Use Jupyter and 3D Slicer kernel to implement biomedical data processing workflows in a notebook.&lt;/p&gt;</summary><content type="html">&lt;p&gt;&lt;em&gt;Use Jupyter and 3D Slicer kernel to implement biomedical data processing workflows in a notebook.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;The Jupyter ecosystem is a powerful platform for exploratory computational science, and now it can connect with some of the deep and rich domain-specific desktop applications that have decades of feature development already invested in them. With the integration of &lt;a href="https://www.slicer.org/"&gt;3D Slicer&lt;/a&gt; with Jupyter through the &lt;a href="https://github.com/jupyter-xeus/xeus-python"&gt;xeus-python&lt;/a&gt;’s interpreter, we demonstrate how a &lt;a href="https://www.qt.io/"&gt;Qt-based&lt;/a&gt; graphical desktop application with 3D visualization provided by &lt;a href="https://vtk.org/"&gt;Visualization Toolkit (VTK)&lt;/a&gt;, image processing provided by the &lt;a href="https://itk.org/"&gt;Insight Toolkit (ITK)&lt;/a&gt;, can be used through a Jupyter notebook. This approach is available on the &lt;a href="https://github.com/Slicer/SlicerJupyter"&gt;SlicerJupyter&lt;/a&gt; GitHub repository and could be extended to other applications that embed Python, such as Blender, FreeCAD, or ParaView.&lt;/p&gt;
&lt;p&gt;This xeus-python integration is beneficial both for the Jupyter ecosystem and desktop applications. Features that have been developed for decades for desktop applications become readily available for Jupyter users without learning a new working environment or redeveloping features. For a desktop application, the Jupyter notebook can serve as a way to create reproducible data processing workflows, scientific publications, and maintainable tutorials without requiring local software installation. From Jupyter, you can now quickly create simple medical imaging applications with extremely rich interactivity from 3D Slicer. Read below for a discussion of the features available and the history of the project.&lt;/p&gt;
&lt;h2 id="powerful-medical-imaging-capabilities-available-through-jupyter"&gt;Powerful Medical Imaging Capabilities Available Through Jupyter&lt;/h2&gt;
&lt;p&gt;3D Slicer (or Slicer for short) is a C++ desktop application that uses Qt, ITK, and VTK libraries for visualization and medical image analysis. Slicer’s embedded Python interpreter makes all its features accessible with the Python programming language. Slicer has a simple built-in console to run Python commands interactively and can run Python scripts from files, but these are not as convenient as cell-base interactive notebooks, which have become popular among data scientists and researchers in recent years.&lt;/p&gt;
&lt;p&gt;By integrating the xeus-python kernel, we can use a Slicer process as a Jupyter kernel. xeus-python leverages the &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;xeus&lt;/a&gt; C++ implementation of the Jupyter kernel protocol. xeus-python is &lt;a href="https://blog.jupyter.org/posts/2019/a-new-python-kernel-for-jupyter/"&gt;an alternative to ipykernel&lt;/a&gt;, which can be used with a vanilla CPython interpreter, interfacing to standard CPython Jupyter widgets like &lt;a href="https://github.com/InsightSoftwareConsortium/itkwidgets"&gt;itkwidgets&lt;/a&gt;, but it can also be coupled with custom interpreters and GUI event loops, like the Slicer interpreter and its Qt event loop. This allows you to represent a complete scene in Medical Reality Markup Language, MRML, Slicer’s internal data structure. The kernel exposes the full medical imaging API and representation of your data in a meaningful way for Python developers, allowing access through standard Python ecosystem formats such as pandas dataframes and NumPy arrays in the Notebook.&lt;/p&gt;
&lt;h3 id="interactivity-levels"&gt;Interactivity Levels&lt;/h3&gt;
&lt;p&gt;You can also use Jupyter interactive widgets (sliders, buttons, etc.) to control Slicer, modify data, or adjust processing and visualization parameters. Interactivity can be implemented at different levels.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Level 1&lt;/strong&gt;: Standard Jupyter widgets display application specific objects by automatic conversion of application-specific data objects to standard Python objects. For example, Slicer markup fiducial lists are displayed as a nicely formatted table and model nodes are rendered as 3D objects.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Level 2&lt;/strong&gt;: Static image widgets display content that the desktop application renders. These widgets can be made interactive by modifying data and rendering parameters using additional standard widgets. This makes rich visualization capabilities — sophisticated rendering various data types, rendering of very large data sets, etc. directly available in Jupyter.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Level 3&lt;/strong&gt;: Dynamic viewer widgets display 2D and 3D views rendered by the desktop application. Mouse and keyboard events are forwarded to the desktop application that allows zooming/rotating views, and to utilize all 3D interactions implemented in the desktop such as placing annotations, making measurements, or segmenting images the same way as if it was done on the desktop appication’s screen. This is implemented in the Slicer Jupyter kernel using &lt;a href="https://ipycanvas.readthedocs.io/en/latest/"&gt;ipycanvas&lt;/a&gt; and &lt;a href="https://github.com/mwcraig/ipyevents"&gt;ipyevents&lt;/a&gt; packages.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Level 4&lt;/strong&gt;: Full desktop graphical user interface integration. Users can see parts of the application window rendered in notebook cells, including standard desktop widgets (sliders, menus, etc.). It is implemented using noVNC and TigerVNC in Slicer Jupyter. This is particularly useful when the application runs on a remote server.&lt;/li&gt;
&lt;/ul&gt;
&lt;figure&gt;
&lt;iframe src="https://www.youtube-nocookie.com/embed/oZ3_cRXX2QM" title="Medical image processing in your web browser using Jupyter notebooks and 3D Slicer" width="560" height="315" style="aspect-ratio: 560 / 315" loading="lazy" allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen&gt;&lt;/iframe&gt;
&lt;figcaption&gt;
&lt;p&gt;Video demonstrating how to run 3D Slicer using Binder&lt;/p&gt;
&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;These interactive tools allow developers to implement complete data processing workflows in a notebook, even if certain steps require manual user inputs such as segmenting 3D regions or setting seed points.&lt;/p&gt;
&lt;h3 id="try-it-online"&gt;Try it online!&lt;/h3&gt;
&lt;p&gt;Since Jupyter notebooks can be used from any web browser, it can essentially turn any desktop application to a web application. By setting up a remote Jupyter server, users do not have to install anything on their computers. We have set up a demonstration of this using Binder (&lt;a href="http://www.mybinder.org"&gt;www.mybinder.org&lt;/a&gt;) that anybody can try at &lt;a href="https://mybinder.org/v2/gh/Slicer/SlicerNotebooks/master"&gt;https://mybinder.org/v2/gh/Slicer/SlicerNotebooks/master&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;
&lt;a href="https://mybinder.org/v2/gh/Slicer/SlicerNotebooks/master"&gt;&lt;img alt="Click on the binder image to launch the demo" src="https://blog.jupyter.org/posts/2020/slicerjupyter-a-3d-slicer-kernel-for-interactive/images/001-0_powLrWNrbtb0dRWs.webp" loading="lazy" data-body-image=""&gt;&lt;/a&gt;
&lt;figcaption&gt;Click on the binder image to launch the demo&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The docker image that installs and configures Slicer and all dependencies (ipycanvas, ipyevents, VNC, etc.) is available at &lt;a href="https://github.com/Slicer/SlicerDocker/tree/master/slicer-notebook"&gt;https://github.com/Slicer/SlicerDocker/tree/master/slicer-notebook&lt;/a&gt;. For deployment to non-technical users, applications can be deployed using Voilà (&lt;a href="https://voila.readthedocs.io/"&gt;https://voila.readthedocs.io/&lt;/a&gt;), which only shows relevant content and interactive widgets, so the notebook looks like a simple dynamic web page.&lt;/p&gt;
&lt;p&gt;The current implementation is already stable and offers a wide range of features, but there is still room for design and performance improvements. For example, we could not implement fully automatic conversion of application-specific data objects to displayable Python objects (due to complex implementation of display hooks); xeus-python debugger’s threading model needs to be improved to allow using it without locking the application’s main thread; and dynamic viewer widget’s performance (level 3 interaction) could be optimized to achieve higher refresh rates.&lt;/p&gt;
&lt;h2 id="history-of-slicer-and-this-integration"&gt;History of Slicer and this integration&lt;/h2&gt;
&lt;p&gt;Built over two decades with support from the NIH and a worldwide open source developer community, 3D Slicer is a unique, multi-platform desktop application for analysis, integration, and visualization of medical images that is heavily used by researchers globally for basic and applied research in a wide range of topics. The 3D Slicer Community includes physician-scientists with disease-specific knowledge of clinical challenges, computer scientists and physicists who develop novel algorithms, imaging informatics researchers, software engineers with the ability to understand clinical problems and create reliable tools, and application engineers with the multidisciplinary skills to deploy these tools in a range of cancer research settings. Slicer is maintained by Kitware, Inc., and the NAMIC consortium, and has an active open source software community. Slicer is used in hospitals and by researchers, with more than 10k academic citations and more than 150k downloads in the last year alone.&lt;/p&gt;
&lt;figure&gt;
&lt;a href="https://download.slicer.org"&gt;&lt;img alt="Click on the image to download 3D Slicer" src="https://blog.jupyter.org/posts/2020/slicerjupyter-a-3d-slicer-kernel-for-interactive/images/002-1_ePhHKkjqV-AW0mvDkaeurw.webp" loading="lazy" data-body-image=""&gt;&lt;/a&gt;
&lt;figcaption&gt;Click on the image to download 3D Slicer&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;It can be used for image processing workflows on 2D, 3D, and 4D images. What makes Slicer so useful is its huge set of community contributed modules that extend its functionality, as well as its ability to read DICOM and a wide array of exotic file formats.&lt;/p&gt;
&lt;p&gt;Slicer has been scriptable in Python for well over a decade, but a robust &lt;a href="https://github.com/Slicer/SlicerJupyter"&gt;SlicerJupyter&lt;/a&gt; extension is born from significant development effort by the community. The idea for this integration dates back to SciPy in 2014, when Jean-Christophe Fillion-Robin of Kitware organized a sprint intended to integrate Slicer and an IPython notebook, motivated by the dream of creating interactive and fun tutorials for Slicer. Mike Sarahan and Jean-Christophe created this proof of concept &lt;a href="https://github.com/commontk/QEmbedIPython#qt-embed-ipython"&gt;https://github.com/commontk/QEmbedIPython#qt-embed-ipython&lt;/a&gt;, but it was far from usable. In 2015 Matt McCormick of Kitware, created the &lt;a href="https://github.com/Slicer/SlicerDocker"&gt;SlicerDocker&lt;/a&gt; repository to support headless builds and rendering in a Docker image. Then in June 2018, while attending the Slicer Project Week, Andras Lasso (Queen’s University) and Jean-Christophe learned about Xeus, a C++ implementation of the Jupyter kernel protocol developed by QuantStack that would help streamline the integration of Slicer with Jupyter. To support this effort, Andras and Jean-Christophe created the &lt;a href="https://github.com/Slicer/SlicerJupyter"&gt;Slicer/SlicerJupyter&lt;/a&gt; GitHub repository. They also contributed changes to Xeus to support this new integration paradigm where the event loop of the kernel is driven by a Qt-based Desktop application (see &lt;a href="https://github.com/jupyter-xeus/xeus/pull/63"&gt;here&lt;/a&gt;). Building on this foundation, Isaiah Norton, then working at Brigham and Women’s Hospital, contributed additional improvements like a better auto-completion using jedi (see &lt;a href="https://github.com/Slicer/SlicerJupyter/pull/12"&gt;https://github.com/Slicer/SlicerJupyter/pull/12&lt;/a&gt;) as well as integration with Binder. More recently, Jean-Christophe and Sylvain Corlay (QuantStack) met after the Slicer project week while attending SciPy in Austin. Following the creation of a new project called xeus-python (started by Martin Renou at QuantStack), we took the integration of Jupyter and Slicer to the next level by adding support for improved interactive use and MRML data node visualization directly in the notebook.&lt;/p&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
&lt;h2 id="about-the-authors"&gt;About the authors&lt;/h2&gt;
&lt;p&gt;&lt;em&gt;Alphabetically ordered&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sylvain Corlay&lt;/strong&gt; is the founder and CEO of QuantStack, and a core Jupyter developer. He co-authored xeus and xeus-python.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Sylvain Corlay" src="https://blog.jupyter.org/posts/2020/slicerjupyter-a-3d-slicer-kernel-for-interactive/images/003-1_DKAhOe_Y4JdGYkgi9jHBSQ.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Sylvain Corlay&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Jean-Christophe Fillion-Robin&lt;/strong&gt; is an open-source enthusiast, original author of the SlicerJupyter extension and a principal engineer at Kitware Inc where he leads the development of “3D Slicer” based commercial applications. J-Christophe also maintains &lt;a href="https://scikit-build.org"&gt;scikit-build&lt;/a&gt;, an improved build system generator for CPython C/C++/Fortran/Cython extensions.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Jean-Christophe Fillion-Robin" src="https://blog.jupyter.org/posts/2020/slicerjupyter-a-3d-slicer-kernel-for-interactive/images/004-1_slg9clPxU3DhL4W2pE2kCA.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Jean-Christophe Fillion-Robin&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Mike Grauer&lt;/strong&gt; is a Technical Leader on the data and analytics team at Kitware. He is specialized in building scalable server-side processing frameworks that enable scientific workflows over web platforms.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Mike Grauer" src="https://blog.jupyter.org/posts/2020/slicerjupyter-a-3d-slicer-kernel-for-interactive/images/005-1_SuBw-BD8efPla8tfd98RUg.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Mike Grauer&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Andras Lasso&lt;/strong&gt; is an original author of the SlicerJupyter extension, Senior Research Engineer and Associate Director of the Laboratory for Percutaneous Surgery at Queen’s University.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Andras Lasso" src="https://blog.jupyter.org/posts/2020/slicerjupyter-a-3d-slicer-kernel-for-interactive/images/006-1_kINpFRIt94iHaxTA90zncQ.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Andras Lasso&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Matt McCormick&lt;/strong&gt; is an open source, medical imaging researcher working at Kitware Inc. Matt is an active, contributing member of scientific open source software efforts such as the Insight Toolkit (ITK) and scientific Python (SciPy) communities, and maintains the Jupyter 3D widget, &lt;a href="https://github.com/InsightSoftwareConsortium/itkwidgets"&gt;itkwidgets&lt;/a&gt;.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Matt McCormick" src="https://blog.jupyter.org/posts/2020/slicerjupyter-a-3d-slicer-kernel-for-interactive/images/007-1_Pm17Os2v8Kf_GiZQw1G_ZQ.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Matt McCormick&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Isaiah Norton&lt;/strong&gt; is a Senior Software Developer at TileDB, Inc. with experience in digital pathology and image-guided surgical navigation.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Isaiah Norton" src="https://blog.jupyter.org/posts/2020/slicerjupyter-a-3d-slicer-kernel-for-interactive/images/008-1_eR4Y9MX-2lcRsXEKodCJrQ.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Isaiah Norton&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Steve Pieper&lt;/strong&gt; is a Chief Architect and active developer of the 3D Slicer application for well over a decade. He is CEO of Isomics, Inc, where he uses a range of software technologies to perform medical imaging research with leading universities and companies.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Steve Pieper" src="https://blog.jupyter.org/posts/2020/slicerjupyter-a-3d-slicer-kernel-for-interactive/images/009-1_aNwZz5TLENXuS2WQRb_N9w.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Steve Pieper&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Martin Renou&lt;/strong&gt; is a scientific software developer at QuantStack. He is the original author of xeus-python, the xeus-based Python kernel, and contributed to the new concurrency model used for the debugger.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Martin Renou" src="https://blog.jupyter.org/posts/2020/slicerjupyter-a-3d-slicer-kernel-for-interactive/images/010-1_Cy9QfZytimqXQut2-bdcIA.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Martin Renou&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Mike Sarahan&lt;/strong&gt; is a software engineer at RStudio, PBC working on bringing language ecosystems together. He is passionate about making software work for data scientists in ways that are easy to maintain and improve.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Mike Sarahan" src="https://blog.jupyter.org/posts/2020/slicerjupyter-a-3d-slicer-kernel-for-interactive/images/011-1_YKNdPIBH39iFBIL9nD_kfg.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Mike Sarahan&lt;/figcaption&gt;
&lt;/figure&gt;
</content><category term="kernels"/><category term="science"/><category term="visualization"/><category term="xeus"/></entry><entry><title>A Jupyter kernel for SQLite</title><link href="https://blog.jupyter.org/posts/2020/a-jupyter-kernel-for-sqlite/" rel="alternate"/><published>2020-06-11T08:42:00+00:00</published><updated>2020-12-30T15:29:00+00:00</updated><author><name>Mariana Meireles</name></author><id>tag:blog.jupyter.org,2020-06-11:/posts/2020/a-jupyter-kernel-for-sqlite/</id><summary type="html">&lt;p&gt;While it is well known in the Python scientific computing community, Jupyter is in fact a language-agnostic development environment. High-quality language kernels exist for the main languages of data sciences, such as Python, C++, R or Julia.&lt;/p&gt;</summary><content type="html">&lt;p&gt;While it is well known in the Python scientific computing community, Jupyter is in fact a language-agnostic development environment. High-quality language kernels exist for the main languages of data sciences, such as &lt;a href="https://github.com/jupyter-xeus/xeus-python"&gt;Python&lt;/a&gt;, &lt;a href="https://github.com/jupyter-xeus/xeus-cling"&gt;C++&lt;/a&gt;, &lt;a href="https://github.com/JuniperKernel/JuniperKernel"&gt;R&lt;/a&gt; or &lt;a href="https://github.com/JuliaLang/IJulia.jl"&gt;Julia&lt;/a&gt;.&lt;br&gt;
But another important tool for data science is the SQL family of programming languages. Today, we announce the release of a Jupyter kernel for SQLite.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2020/a-jupyter-kernel-for-sqlite/images/001-1_pzPTGCJVgIO10N7OwOGWKw.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;This new kernel allows the user to use the complete SQLite syntax as well as some extra operations such as opening or closing a database file, or visualizing the data in different ways using Jupyter magics.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="HTML and Text table visualizations for different Jupyter interfaces" src="https://blog.jupyter.org/posts/2020/a-jupyter-kernel-for-sqlite/images/002-1_Pj5UkLChFO3BIMx7NIDRdA.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;HTML and Text table visualizations for different Jupyter interfaces&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;To make the task of implementing a new Kernel for Jupyter easier, we make use of &lt;a href="https://github.com/jupyter-xeus/xeus"&gt;&lt;strong&gt;Xeus&lt;/strong&gt;&lt;/a&gt;, a library providing a solid implementation of the Jupyter kernel protocol, so that we can focus on implementing the language-specific parts of the kernel.&lt;/p&gt;
&lt;p&gt;As a connection between SQLite’s native C implementation and C++ we’re using SRombauts’ library &lt;a href="https://github.com/SRombauts/SQLiteCpp"&gt;&lt;strong&gt;SQLiteCpp&lt;/strong&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="current-state"&gt;Current state&lt;/h2&gt;
&lt;p&gt;xeus-SQLite is still under active development but it offers a fully functional SQLite interface and magics to perform higher-level operations that are outside of the scope of the SQL syntax, such as creating, opening, or closing SQLite databases. Some of the things you can do with xeus-SQLite are creating a new database, loading it, backing it up or deleting it. You can also check if a table exists, set and reset keys of a database and get information about it. You can find more about the use of these methods in SQLite’s &lt;a href="https://xeus-sqlite.readthedocs.io/en/latest/"&gt;documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;xeus-SQLite provides rich HTML display of tables in the Jupyter Notebook and Jupyter Lab. For the Jupyter Console we make use of the &lt;a href="https://github.com/p-ranav/tabulate"&gt;&lt;strong&gt;tabulate&lt;/strong&gt;&lt;/a&gt; library for textual display.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Different commands being executed on xeus-SQLite" src="https://blog.jupyter.org/posts/2020/a-jupyter-kernel-for-sqlite/images/003-1_BIDimBvS_g8QH5fuHS_QRQ.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Different commands being executed on xeus-SQLite&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="the-future"&gt;The future&lt;/h2&gt;
&lt;p&gt;For the future of xeus-SQLite we want to create an intuitive form of visualizing data: creating plots, graphs, charts, maps and much more from your SQLite query results, all in the same notebook. Currently we’re exploring the use of &lt;a href="https://vega.github.io/vega/"&gt;&lt;strong&gt;Vega&lt;/strong&gt;&lt;/a&gt; in xeus-SQLite, a declarative language for creating interactive visualization designs and can do bar plots using jupyter magics:&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="SQLite query result with bar and table outputs for same query" src="https://blog.jupyter.org/posts/2020/a-jupyter-kernel-for-sqlite/images/004-1_eWZyoVvu5c_k_Yerv1eT-A.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;SQLite query result with bar and table outputs for same query&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;This feature is still in very early stages and being developed in this &lt;a href="https://github.com/jupyter-xeus/xeus-sqlite/tree/vega-visualization"&gt;branch&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;We also plan on producing a static build of xeus-SQLite bundling xeus and the SQLite library into a single executable that can be easily distributed.&lt;/p&gt;
&lt;h2 id="try-it-online"&gt;Try it online!&lt;/h2&gt;
&lt;p&gt;You can try the stable version without the need of installing anything on your computer just by clicking on the image below:&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;a href="https://mybinder.org/v2/gh/jupyter-xeus/xeus-sqlite/stable"&gt;&lt;img src="https://blog.jupyter.org/posts/2020/a-jupyter-kernel-for-sqlite/images/005-1_wiJsOB9OWiAGwuaoycfc0w.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This won’t grant you access to the experimental branch where we’re testing, if you’re interested in trying it please check the &lt;a href="https://github.com/jupyter-xeus/xeus-sqlite#installation"&gt;installation&lt;/a&gt; guide and make sure you’re in the right &lt;a href="https://github.com/jupyter-xeus/xeus-sqlite/tree/vega-visualization"&gt;branch&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="installation"&gt;Installation&lt;/h2&gt;
&lt;p&gt;Note that you first need to have Jupyter installed on your computer. You can install &lt;code&gt;xeus-sqlite&lt;/code&gt; using mamba:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;mamba install xeus-sqlite -c conda-forge
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Or conda:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;conda install xeus-sqlite -c conda-forge
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
&lt;h2 id="about-the-author"&gt;About the author&lt;/h2&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2020/a-jupyter-kernel-for-sqlite/images/006-1_S-w69baox7Q1D997a5yKNw.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
&lt;p&gt;My name is &lt;a href="https://twitter.com/mari_meir"&gt;Mariana Meireles&lt;/a&gt; and I’m a software developer working for &lt;a href="http://quantstack.net/"&gt;QuantStack&lt;/a&gt;. I care deeply about the impacts that technology has in the world and try my best to be the change I want to see by contributing to open source projects that stand upon libre and diverse standards.&lt;/p&gt;
&lt;p&gt;Prior to QuantStack I worked as a developer on the PySide team at the Qt Company and as a web performance developer at Mozilla.&lt;/p&gt;
</content><category term="kernels"/><category term="xeus"/></entry><entry><title>A visual debugger for Jupyter</title><link href="https://blog.jupyter.org/posts/2020/a-visual-debugger-for-jupyter/" rel="alternate"/><published>2020-03-25T15:53:00+00:00</published><updated>2020-03-26T09:12:00+00:00</updated><author><name>Project Jupyter</name></author><id>tag:blog.jupyter.org,2020-03-25:/posts/2020/a-visual-debugger-for-jupyter/</id><summary type="html">&lt;p&gt;Most of the progress made in software projects comes from incrementalism. The ability to quickly see the outcome of an execution and iterate has been one of the main reasons for the success of Jupyter, especially in scientific exploratory workflows.&lt;/p&gt;</summary><content type="html">&lt;p&gt;Most of the progress made in software projects comes from &lt;em&gt;incrementalism&lt;/em&gt;. The ability to quickly see the outcome of an execution and iterate has been one of the main reasons for the success of Jupyter, especially in scientific exploratory workflows.&lt;/p&gt;
&lt;p&gt;Jupyter users like to &lt;em&gt;experiment&lt;/em&gt; in the notebook, and to use the notebook as an interactive communication tool. However, for more classical software development tasks such as the refactoring of a large codebase, they often switch to general-purpose IDEs.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="The JupyterLab environment." src="https://blog.jupyter.org/posts/2020/a-visual-debugger-for-jupyter/images/001-1_u8y-ggU2O513KjXdGbdEuQ.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;The JupyterLab environment.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The Jupyter project has made strides in the past few years towards filling that gap, notably with the &lt;strong&gt;JupyterLab&lt;/strong&gt; project, which enables a richer UI including a file browser, text editors, consoles, notebooks, and a rich layout system.&lt;/p&gt;
&lt;p&gt;However, a missing piece (which has remained one of the main reasons for users to switch to a different tool) is a &lt;strong&gt;visual debugger&lt;/strong&gt;. This feature has long been requested by users, especially those accustomed to general-purpose development environments.&lt;/p&gt;
&lt;h2 id="a-debugger-for-jupyter"&gt;A debugger for Jupyter&lt;/h2&gt;
&lt;p&gt;Today, after several months of development, we are glad to announce the first public release of the Jupyter visual debugger!&lt;/p&gt;
&lt;p&gt;This is just the first release, but we can already set breakpoints in notebook cells and source files, inspect variables, navigate the call stack and more.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Screencast of the JupyterLab visual debugger in action" src="https://blog.jupyter.org/posts/2020/a-visual-debugger-for-jupyter/images/002-1_NP0bYBdrhwgpJpKDhPLWrQ.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Screencast of the JupyterLab visual debugger in action&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="try-the-debugger-on-binder"&gt;Try the debugger on binder&lt;/h2&gt;
&lt;p&gt;You can also try the debugger online with binder. Just click on the binder link:&lt;/p&gt;
&lt;figure&gt;
&lt;a href="https://mybinder.org/v2/gh/jupyterlab/debugger/stable?urlpath=/lab/tree/examples/index.ipynb"&gt;&lt;img alt="Click on the binder link to launch the demo" src="https://blog.jupyter.org/posts/2020/a-visual-debugger-for-jupyter/images/003-1_NbZ_56IL0J-q0V32qgiq3A.webp" loading="lazy" data-body-image=""&gt;&lt;/a&gt;
&lt;figcaption&gt;Click on the binder link to launch the demo&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="installation"&gt;Installation&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The debugger &lt;em&gt;&lt;strong&gt;front-end&lt;/strong&gt;&lt;/em&gt; can be installed as a JupyterLab extension.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;jupyter&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;labextension&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;install&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;@jupyterlab&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;debugger&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;The debugger front-end will be included in JupyterLab by default in a future release.&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In the &lt;em&gt;&lt;strong&gt;back-end&lt;/strong&gt;&lt;/em&gt;, a kernel implementing the &lt;strong&gt;Jupyter Debug Protocol&lt;/strong&gt; (which will be detailed in the next section) is required. The only kernel implementing this protocol, for now, is &lt;code&gt;xeus-python&lt;/code&gt; a new Jupyter kernel for the Python programming language. (Support for the debugger protocol in ipykernel is also on the roadmap).&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;conda install xeus-python -c conda-forge
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Once xeus-python and the debugger extension are installed, you should be all set to use the Jupyter visual debugger!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Depending on the platform, PyPI wheels are available for xeus-python, but they are still &lt;em&gt;&lt;strong&gt;experimental&lt;/strong&gt;&lt;/em&gt;.&lt;/p&gt;
&lt;h2 id="the-jupyter-debug-protocol"&gt;The Jupyter Debug Protocol&lt;/h2&gt;
&lt;h3 id="new-message-types-for-the-control-and-iopub-channels"&gt;New message types for the Control and IOPub channels&lt;/h3&gt;
&lt;p&gt;Jupyter kernels (the part of the infrastructure that executes the user’s code) communicate with the rest of the infrastructure with a &lt;a href="https://jupyter-client.readthedocs.io/en/stable/messaging.html"&gt;well-specified inter-process communication protocol&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Several communication channels exist, such as&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the &lt;strong&gt;Shell&lt;/strong&gt; channel, which is a request/reply channel for e.g. execution requests&lt;/li&gt;
&lt;li&gt;the &lt;strong&gt;IOPub&lt;/strong&gt; channel, which is a one-directional communication channel from the kernel to the client, and is used e.g. to forward the content of the standard output streams (stdout and stderr).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;strong&gt;Control&lt;/strong&gt; channel is similar to Shell but operates on a separate socket so that &lt;em&gt;&lt;strong&gt;messages are not queued behind execution requests&lt;/strong&gt;&lt;/em&gt;, and have a higher priority. Control was already used for Interrupt and Shutdown requests, and we decided to use the same channel for the commands sent to the debugger.&lt;/p&gt;
&lt;p&gt;Two message types were added to the protocol:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the &lt;code&gt;debug_[request/reply]&lt;/code&gt; to request specific actions to be performed by the debugger such as adding a breakpoint or stepping into a code, which is sent to the &lt;strong&gt;Control&lt;/strong&gt; channel.&lt;/li&gt;
&lt;li&gt;the &lt;code&gt;debug_event&lt;/code&gt; uni-directional message used by debugging kernels to send debugging events to the front-end. Debug events are sent over the IOPub channel.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="extending-the-debug-adapter-protocol"&gt;Extending the Debug Adapter Protocol&lt;/h3&gt;
&lt;p&gt;A key principle to the Jupyter design is the &lt;strong&gt;agnosticism to the programming language&lt;/strong&gt;. It is important for the Jupyter debug protocol to be adaptable to other kernel implementations.&lt;/p&gt;
&lt;p&gt;A popular standard for debugging is Microsoft’s “&lt;strong&gt;Debug Adapter Protocol&lt;/strong&gt;” (DAP) which is a JSON-based protocol underlying the debugger of Visual Studio Code and for which there already exist multiple language back-ends.&lt;/p&gt;
&lt;p&gt;It was therefore natural for us to use the DAP messages over the &lt;code&gt;debug_[request/reply]&lt;/code&gt; and &lt;code&gt;debug_event&lt;/code&gt; messages that we just added.&lt;/p&gt;
&lt;p&gt;However, it was not quite &lt;em&gt;sufficient&lt;/em&gt; in the case of Jupyter. Indeed&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In order to support page reloading, or a client connecting at a later stage, Jupyter kernels must store the state of the debugger (breakpoints, whether the debugger is currently stopped). The front-end can request that state over with a &lt;code&gt;debug_request&lt;/code&gt; message.&lt;/li&gt;
&lt;li&gt;In order to support the debugging of notebook cells and of Jupyter consoles, which are not based on source files, we also needed messages to submit code to the debugger to which breakpoints can be added.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Besides these two differences, the content of the debug requests and replies corresponds to the debug adapter protocol.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;All these extensions to the Jupyter kernel protocol have been proposed for inclusion in the official specification. The JEP (Jupyter Enhancement Proposal) can be found &lt;a href="https://github.com/jupyter/enhancement-proposals/pull/47"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="xeus-python-the-first-jupyter-kernel-to-support-debugging"&gt;Xeus-python, the first Jupyter Kernel to support debugging&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://github.com/QuantStack/xeus"&gt;Xeus&lt;/a&gt; is a C++ implementation of the Jupyter kernel protocol. It is not a kernel by itself but a library that helps kernel authoring. &lt;a href="https://github.com/QuantStack/xeus"&gt;Xeus&lt;/a&gt; is useful when developing a kernel for a language that has a C or a C++API (like Python, Lua, or SQL). It takes the cumbersome task of implementing the &lt;a href="https://jupyter-client.readthedocs.io/en/stable/messaging.html"&gt;Jupyter messaging protocol&lt;/a&gt; for the kernel author to focus on the core interpreter tasks: executing code, inspecting, etc.&lt;/p&gt;
&lt;p&gt;Several kernels have been developed with xeus, including the popular &lt;a href="https://github.com/jupyter-xeus/xeus-cling"&gt;xeus-cling&lt;/a&gt; kernel for the C++ programming language, based on the cling C++ interpreter from CERN. The &lt;a href="https://github.com/jupyter-xeus/xeus-python.git"&gt;xeus-python&lt;/a&gt; kernel is an alternative Python kernel to ipykernel, based on xeus. The first release of the xeus-python kernel was announced on this blog earlier this year: &lt;a href="https://blog.jupyter.org/posts/2019/a-new-python-kernel-for-jupyter/"&gt;A new Python kernel for Jupyter&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Xeus-python was an appropriate choice for this first implementation of the debugging protocol because&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;it has a &lt;strong&gt;pluggable concurrency model&lt;/strong&gt;, which allowed running the processing of the Control channel in a different thread.&lt;/li&gt;
&lt;li&gt;it has a &lt;strong&gt;lighter-weight codebase&lt;/strong&gt; which made it a convenient sandbox to iterate upon. Implementing the first version of the protocol in ipykernel would have required more significant refactoring and consensus building at an early stage.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="the-roadmap-of-xeus-python"&gt;The roadmap of Xeus-python&lt;/h3&gt;
&lt;p&gt;The short-term roadmap for xeus-python includes&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;adding support for IPython magics in xeus-python, which is the main missing feature with respect to ipykernel.&lt;/li&gt;
&lt;li&gt;improving the PyPI wheels of xeus-python.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="what-about-other-kernels"&gt;What about other kernels?&lt;/h3&gt;
&lt;p&gt;The work in the front-end is valid for any kernel implementing the extended kernel protocol.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;We will be working in 2020 to enable debugging with as many kernels as possible.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This will soon be the case for other xeus-based kernels which share a large part of the implementation with xeus-python, such as xeus-cling.&lt;/p&gt;
&lt;h2 id="diving-into-the-debugger-front-end-architecture"&gt;Diving into the debugger front-end architecture&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://github.com/jupyterlab/debugger"&gt;debugger extension for JupyterLab&lt;/a&gt; provides what users would typically expect from an IDE:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;a sidebar with a variable explorer, a list of breakpoints, a source preview and the possibility to navigate the call stack&lt;/li&gt;
&lt;li&gt;the ability to set breakpoints directly next to the code, namely in code cells and code consoles&lt;/li&gt;
&lt;li&gt;visual markers to indicate where the current execution has stopped&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When working with Jupyter notebooks, the state of the execution is kept in the kernel. But a cell can be executed and then deleted from the notebook. What should happen when a user wants to step in deleted code?&lt;/p&gt;
&lt;p&gt;The extension supports that particular use case and enables retrieving a read-only view of the previously executed cell.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Stepping into a deleted cell" src="https://blog.jupyter.org/posts/2020/a-visual-debugger-for-jupyter/images/004-0_gsIleEb7Q-sq05f0.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Stepping into a deleted cell&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Consoles and files also have support for debugging.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Debugging code consoles in JupyterLab" src="https://blog.jupyter.org/posts/2020/a-visual-debugger-for-jupyter/images/005-0_G5-dLqkhH5CEvQQv.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Debugging code consoles in JupyterLab&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;figure&gt;
&lt;img alt="Debugging files in JupyterLab" src="https://blog.jupyter.org/posts/2020/a-visual-debugger-for-jupyter/images/006-0_ZejsDIpKOEPDgoTs.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Debugging files in JupyterLab&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Debugging can be enabled on a notebook level, which lets users debug a notebook and work on a different one at the same time.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Debugging multiple notebooks simultaneously" src="https://blog.jupyter.org/posts/2020/a-visual-debugger-for-jupyter/images/007-0_EtApkSznZEY-GJhA.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Debugging multiple notebooks simultaneously&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Variables can be inspected using a tree viewer and a table viewer:&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="The variable explorer" src="https://blog.jupyter.org/posts/2020/a-visual-debugger-for-jupyter/images/008-0_9pVDg58cTz5Yezw8.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;The variable explorer&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;The debugger extension for JupyterLab has been designed to work with any kernel that supports debugging.&lt;/p&gt;
&lt;p&gt;By relying on the Debug Adapter Protocol, the debugger extension abstracts away language-specific features and provides a consistent debugging interface to the user.&lt;/p&gt;
&lt;p&gt;The following diagram shows how the debug messages flow between the user, the JupyterLab extension and the kernel during a debugging session.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Using the Debug Adapter Protocol in the debugger extension (source)" src="https://blog.jupyter.org/posts/2020/a-visual-debugger-for-jupyter/images/009-0_fwLQQWxKtGUiMpq1.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Using the Debug Adapter Protocol in the debugger extension (&lt;a href="https://github.com/jupyterlab/debugger/issues/64"&gt;source&lt;/a&gt;)&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;h2 id="future-developments"&gt;Future developments&lt;/h2&gt;
&lt;p&gt;In 2020, we plan on making major improvements to the debugger experience:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Support for rich mime type rendering in the variable explorer.&lt;/li&gt;
&lt;li&gt;Support for conditional breakpoints in the UI.&lt;/li&gt;
&lt;li&gt;General improvements of the debugger user experience.&lt;/li&gt;
&lt;li&gt;Enable the debugging of &lt;a href="https://github.com/voila-dashboards/voila/"&gt;Voilà dashboards&lt;/a&gt;, from the JupyterLab Voilà preview extension.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
&lt;h2 id="acknowledgements"&gt;Acknowledgements&lt;/h2&gt;
&lt;p&gt;The JupyterLab debugger is the result of the collaboration and coordination of developers from several institutions, including QuantStack, Two Sigma, and Bloomberg.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The work on both the front-end and the back-end at &lt;a href="https://twitter.com/QuantStack"&gt;&lt;strong&gt;QuantStack&lt;/strong&gt;&lt;/a&gt; by &lt;a href="https://twitter.com/jtpio"&gt;&lt;strong&gt;Jeremy Tuloup&lt;/strong&gt;&lt;/a&gt;, &lt;a href="https://twitter.com/johanmabille"&gt;&lt;strong&gt;Johan Mabille&lt;/strong&gt;&lt;/a&gt;, &lt;a href="https://twitter.com/martinRenou"&gt;&lt;strong&gt;Martin Renou&lt;/strong&gt;&lt;/a&gt;, and &lt;a href="https://twitter.com/SylvainCorlay"&gt;&lt;strong&gt;Sylvain Corlay&lt;/strong&gt;&lt;/a&gt;, was funded by &lt;a href="https://twitter.com/techatbloomberg"&gt;&lt;strong&gt;Bloomberg&lt;/strong&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;The work on the Jupyter debugger by &lt;strong&gt;Borys Palka&lt;/strong&gt; and &lt;a href="https://twitter.com/micronova"&gt;&lt;strong&gt;Afshin Darian&lt;/strong&gt;&lt;/a&gt; was made possible by &lt;a href="https://twitter.com/twosigma"&gt;&lt;strong&gt;Two Sigma&lt;/strong&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="about-the-developers"&gt;About the developers&lt;/h2&gt;
&lt;figure&gt;
&lt;img alt="Jeremy Tuloup" src="https://blog.jupyter.org/posts/2020/a-visual-debugger-for-jupyter/images/010-1_4RE97odgcRtRruh0najsVg.jpg" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Jeremy Tuloup&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Jeremy Tuloup&lt;/strong&gt; is a Scientific Software developer at QuantStack. He authored a large part of the front-end of the JupyterLab debugger.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Borys Palka" src="https://blog.jupyter.org/posts/2020/a-visual-debugger-for-jupyter/images/011-1_IJw8VB7Sq8v4FwUgP7DY_Q.jpeg" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Borys Palka&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Borys Palka&lt;/strong&gt; is a software developer at Codete. He authored a large part of the front-end of the JupyterLab debugger.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Johan Mabille" src="https://blog.jupyter.org/posts/2020/a-visual-debugger-for-jupyter/images/012-1_y5KkUTTgNArZGajQWW38EA.jpeg" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Johan Mabille&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Johan Mabille&lt;/strong&gt; is a scientific software developer at QuantStack. Johan is a co-author of xeus, and developed the debugger extension to xeus-python. He also authored a large part of the debugger front-end.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Martin Renou" src="https://blog.jupyter.org/posts/2020/a-visual-debugger-for-jupyter/images/013-1_GafIA37eUPz6XQDTKS6D8A.jpeg" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Martin Renou&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Martin Renou&lt;/strong&gt; is a scientific software developer at QuantStack. He is the original author of xeus-python, the xeus-based Python kernel, and contributed to the new concurrency model used for the debugger.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Afshin Darian" src="https://blog.jupyter.org/posts/2020/a-visual-debugger-for-jupyter/images/014-1_FEspm1Hcty29Jxwpb-cHXw.jpeg" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Afshin Darian&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Afshin Darian&lt;/strong&gt; is a software developer at Two Sigma, and one of the authors of JupyterLab.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="Sylvain Corlay" src="https://blog.jupyter.org/posts/2020/a-visual-debugger-for-jupyter/images/015-1_aSY0NNigA16fvOHVZCOaeQ.jpeg" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;Sylvain Corlay&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;&lt;strong&gt;Sylvain Corlay&lt;/strong&gt; is the founder and CEO of QuantStack, and a core Jupyter developer. He co-authored xeus and xeus-python.&lt;/p&gt;
&lt;p class="standalone-image"&gt;&lt;img src="https://blog.jupyter.org/posts/2020/a-visual-debugger-for-jupyter/images/016-1_Trh8fKqP0c_4Vvnzmu5SvA.webp" alt="" loading="lazy" data-body-image=""&gt;&lt;/p&gt;
</content><category term="debugging"/><category term="JupyterLab"/><category term="kernels"/><category term="xeus"/></entry><entry><title>Xeus is now a Jupyter subproject</title><link href="https://blog.jupyter.org/posts/2020/xeus-is-now-a-jupyter-subproject/" rel="alternate"/><published>2020-02-04T12:08:00+00:00</published><updated>2020-02-08T13:30:00+00:00</updated><author><name>Johan Mabille</name></author><id>tag:blog.jupyter.org,2020-02-04:/posts/2020/xeus-is-now-a-jupyter-subproject/</id><summary type="html">&lt;p&gt;The Xeus project has been incorporated as a Jupyter subproject.&lt;/p&gt;
</summary><content type="html">&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;It is a great pleasure to announce that the Xeus project has been incorporated as a Jupyter subproject. Xeus will now be subject to the &lt;a href="https://github.com/jupyter/governance/blob/master/governance.md"&gt;Jupyter governance&lt;/a&gt; and &lt;a href="https://github.com/jupyter/governance/blob/master/conduct/code_of_conduct.md"&gt;code of conduct&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For reference, the Jupyter Enhancement Proposal (JEP) for the Xeus incorporation is available &lt;a href="https://github.com/jupyter/enhancement-proposals/pull/44"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="what-is-xeus"&gt;What is Xeus?&lt;/h2&gt;
&lt;p&gt;The &lt;a href="https://github.com/jupyter-xeus/xeus/"&gt;Xeus&lt;/a&gt; project is a C++ implementation of the Jupyter kernel protocol. Xeus is not a kernel, but a library meant to facilitate the authoring of kernels.&lt;br&gt;
Several Jupyter kernels have been created with Xeus:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://github.com/jupyter-xeus/xeus-cling"&gt;xeus-cling&lt;/a&gt;, a kernel for the C++ programming language, based on the Cling C++ interpreter. The &lt;a href="https://github.com/root-project/cling"&gt;cling&lt;/a&gt; project comes from CERN and is at the foundation of the &lt;a href="https://github.com/root-project/root.git"&gt;ROOT&lt;/a&gt; project.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="The xeus-cling Jupyter kernel for the C++ programming language." src="https://blog.jupyter.org/posts/2020/xeus-is-now-a-jupyter-subproject/images/001-0_SSdFFWmES-6AW8Yo.webp" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;The xeus-cling Jupyter kernel for the C++ programming language.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://github.com/jupyter-xeus/xeus-python"&gt;xeus-python&lt;/a&gt;, a kernel for the Python programming language, embedding the Python interpreter.&lt;/p&gt;
&lt;figure&gt;
&lt;img alt="The xeus-python Jupyter kernel for the Python programming language" src="https://blog.jupyter.org/posts/2020/xeus-is-now-a-jupyter-subproject/images/002-0_Mh5cOdG7YWJxrFSw.mp4" loading="lazy" data-body-image=""&gt;
&lt;figcaption&gt;The xeus-python Jupyter kernel for the Python programming language&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://github.com/jupyter-xeus/xeus-calc"&gt;xeus-calc&lt;/a&gt;, a calculator kernel, meant as an educational example on how to make Jupyter kernels with Xeus.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Beyond these three kernels built on top of Xeus by the Xeus maintainers, third-parties have developed other Jupyter kernels with Xeus:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/JuniperKernel/JuniperKernel"&gt;JuniperKernel&lt;/a&gt;, a kernel for the R programming language by Spencer Aiello.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/atomex-me/xeus-fift"&gt;xeus-fift&lt;/a&gt;, a kernel for the fift programming language by Michael Zaikin. The fift programming language was developed by Telegram to create TON blockchain contracts.&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/Slicer/SlicerJupyter"&gt;SlicerJupyter&lt;/a&gt;, a kernel for the Python programming language by Kitware which integrates into the Qt event loop of the Kitware “Slicer” project.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Finally, the xeus-python kernel includes a first implementation of the Jupyter debugger protocol used by the &lt;a href="https://github.com/jupyterlab/debugger"&gt;Jupyter debugger&lt;/a&gt; project. xeus-python enables the &lt;a href="https://microsoft.github.io/debug-adapter-protocol/"&gt;Debug Adapter Protocol&lt;/a&gt; over the Control channel through new debug request/reply and debug event messages.&lt;/p&gt;
&lt;h2 id="why-moving-xeus-under-the-jupyter-governance"&gt;Why moving Xeus under the Jupyter governance?&lt;/h2&gt;
&lt;p&gt;While Xeus started as a side project for &lt;a href="https://twitter.com/QuantStack"&gt;QuantStack&lt;/a&gt; engineers, the project now has several stakeholders who depend on it. We think that moving the project to an open governance organization may be a better way to reflect this situation.&lt;/p&gt;
&lt;div class="main-content-end" aria-hidden="true"&gt;&lt;/div&gt;
&lt;h2 id="acknowledgements"&gt;Acknowledgements&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Xeus was started by the team of open-source developers at &lt;a href="https://twitter.com/QuantStack"&gt;QuantStack&lt;/a&gt; as a separate project, but with the full intent to incorporate it into Jupyter. The initial project development at QuantStack was funded by &lt;a href="https://twitter.com/techatbloomberg"&gt;Bloomberg&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Now, Xeus contributors work in many institutions, including &lt;a href="https://www.universite-paris-saclay.fr/"&gt;Université Paris-Saclay&lt;/a&gt; and &lt;a href="https://www.polytechnique.edu/"&gt;École Polytechnique&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="about-the-author"&gt;About the Author&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://twitter.com/johanmabille?lang=en"&gt;Johan Mabille&lt;/a&gt; is a Scientific Software Developer at &lt;a href="https://github.com/QuantStack/"&gt;QuantStack&lt;/a&gt;, specializing in high-performance computing in C++. He holds master’s degree in computer science from Centrale-Supelec.&lt;/p&gt;
&lt;p&gt;As an open source developer, Johan coauthored &lt;a href="https://quantstack.net/xtensor.html"&gt;&lt;strong&gt;xtensor&lt;/strong&gt;&lt;/a&gt;, &lt;a href="https://quantstack.net/xeus.html"&gt;&lt;strong&gt;xeus&lt;/strong&gt;&lt;/a&gt;, and &lt;a href="https://quantstack.net/xsimd.html"&gt;&lt;strong&gt;xsimd&lt;/strong&gt;&lt;/a&gt;. He also made major contributions to the JupyterLab debugger project and bqplot.&lt;/p&gt;
</content><category term="C++"/><category term="governance"/><category term="kernels"/><category term="xeus"/></entry></feed>