Collaboration requires good communication. Your team members need to understand work products. And you need to present to stakeholders who may not have technical background. In this article we will show you how to use JupyterLab extensions to help you document and present your work. This assumes you have the JupyterHub for Collaboration image deployed which we discussed in a previous story. For a list of all JupyterHub collaboration stories see Data Science Team Collaboration with JupyterHub.

Table of Contents

JupyterLab Table of Contents is a great way to show the structure of your notebooks and to help navigate. The markdown heading structure is used to present a table of contents. And you can choose to have headings numbered. For example:

Note that we have the jupyterlab-spellchecker extension installed to check mark ups.

The table of contents makes it easy to navigate complex notebooks and present them. In the notebook below we navigate to the Overview section:

Interactive plots

Effective visualizations help you to convey the right and necessary information. Matplotlib is a popular library for creating static, animated, and interactive visualizations in Python. To help you present Matplotlib charts, the ipympl extension provides interactive features. All you need to do is include the %matplotlib ipympl magic in the notebook. For example:

%matplotlib ipympl

#data
x = np.random.randint(0, 200, 50)
y = np.random.randint(0, 200, 50)
#size
size = np.random.randint(40, 200, 50)
#color
color = np.random.randint(10, 200, 50)
 
#scatter plot
plt.scatter(x, y, s = size, c = color)
plt.show()

The extension provides selections to pan and zoom into charts:

Presentations

You can create presentation slides from JupyterLab notebooks using the reveal.js extension. Reveal.js is a popular open-source HTML presentation package. To create a presentation, open the right sidebar using View > Open Right Sidebar. For each cell, add a slide tag to determine how to present the cell:

Then export the notebook using File > Save and Export Notebook As > Reveal.js Slides. This exports an html file which uses the reveal.js javascript libraries to render slides. To view the file you will need to install the reveal.js libraries . The slide show provides selections to show the next, previous or sub-slides:

You can also export reveal.js slides to a PDF — see PDF Export | reveal.js

We covered some of the popular JupyterLab extensions for presenting your results. If there are other extensions you have found to be useful, please post them in a Reply.

No responses yet

Leave a Reply

Your email address will not be published. Required fields are marked *