News and Blog

EPSRC CDT in Next Generation Computational Modelling

Jupyter Notebook Tools

Logo
Jupyter Notebook
On Monday 13th of March 2017, a workshop was delivered by James Bailey and Marian Daogaru for Advanced Computational Methods II. The workshop introduced Jupyter Notebook and three tools for it:

  • nbconvert
  • nbdime
  • nbval

The first part of the two-hour workshop presented the three tools. Jupyter Notebook was introduced, showing how to access, create and modify a notebook. The notebook was used to write code, execute it, store the outputs and write text as markdown.

nbconvert converts a notebook into formats such as .py, pdf or html using the notebook or command line interfaces. It provides portability, allowing documents to be used and presented on machines that do not have Jupyter installed. nbdime compares 2 different notebooks or merges 3 notebooks, allowing version control of the Jupyter Notebook. Lastly, nbval tests if the notebook's stored outputs are consistent with the inputs. This allows validation of documentation produced using the notebook.

Marian pointing
Marian presenting nbdime

During the second part of the workshop students were given exercises on each topic to go through at their own pace. These exercises demonstrated the functionality of the three tools and allowed hands-on experience of using them.

All the self-paced workshop material can be found on the Computational Modelling webpage. A Virtual Machine containing the material and software can also be found here.

Comments