&




Jupyter Days 2020

Marie-Hélène Burle

Julia is one of the main languages in Project Jupyter


To install the Julia kernel:

- Install Julia
- Install the Julia package IJulia

Launching Jupyter

You can launch Jupyter notebook or Jupyter lab by running in the terminal one of:

jupyter notebook
jupyter lab


Alternatively, you can launch them from within Julia with one of:

using IJulia
notebook()
using IJulia
jupyterlab()

Example Jupyter notebook with Julia


syzygy does not have the Julia kernel installed at this point, so I will show a basic example of a Jupyter notebook with Julia from my machine.

(Ah ... and um ... yes ... it is about Covid-19 ...)

                       From xkcd

From Julia notebook to script


nbconvert: convert a Jupyter notebook to a Julia .jl script
jupyter nbconvert --to script julia_notebook.ipynb


NBInclude: source a Jupyter notebook within a Julia .jl script
using NBInclude
@nbinclude("julia_notebook.ipynb")

Julia’s version of literate programming:
the Literate package


Literate is Julia’s take at literate programming

Julia scripts written with the proper syntax can be converted to any of: markdown pages (e.g. for package documentation), Julia code cleaned of all metadata, and Jupyter notebooks

Let’s have a look at their demo example


ipynb2LiterateJulia converts from Jupyter nb to Literate scripts

Let’s look at their demo example

Questions?