<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Jupyter Blog - Kyle Kelley</title><link href="https://jasongrout.github.io/medium-archive/pelican/" rel="alternate"/><link href="https://jasongrout.github.io/medium-archive/pelican/feeds/author-kyle-kelley.atom.xml" rel="self"/><id>https://jasongrout.github.io/medium-archive/pelican/</id><updated>2024-02-13T16:02:00+00:00</updated><subtitle>The Project Jupyter blog: news, releases, and community stories, archived from blog.jupyter.org.</subtitle><entry><title>Bringing Modern JavaScript to the Jupyter Notebook</title><link href="https://jasongrout.github.io/medium-archive/pelican/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:jasongrout.github.io,2023-09-24:/medium-archive/pelican/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://jasongrout.github.io/medium-archive/pelican/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&gt;&lt;img src="https://jasongrout.github.io/medium-archive/pelican/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://jasongrout.github.io/medium-archive/pelican/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://jasongrout.github.io/medium-archive/pelican/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://jasongrout.github.io/medium-archive/pelican/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://jasongrout.github.io/medium-archive/pelican/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&gt;&lt;img src="https://jasongrout.github.io/medium-archive/pelican/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&gt;&lt;img src="https://jasongrout.github.io/medium-archive/pelican/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://jasongrout.github.io/medium-archive/pelican/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;
</content><category term="JavaScript"/></entry></feed>