Notebook Layout

Data science notebooks often grow in length very quickly, resulting users getting lost in the hundreds of paragraphs. Below are several usability tips on how to cleanly layout and navigate through lengthy notebooks!

Create and Use the Outline

Zepl automatically generates an Outline based off two attributes found in each paragraph:

  1. Interpreter Type - %python, %spark, %r, %md, etc...

  2. Paragraph Title - If this is not set, there will be no label for your Outline

Selecting a row in the outline will navigate the user directly to that paragraph in the web browser. When a notebook is created, the Outline will appear blank with all "Untitled" values, however, as you build the notebook, add Markdown, and Paragraph Titles, the Outline will become more descriptive and usable.

Access the Outline

To access the outline for each notebook, select the Outline icon on the right hand side of your notebook:

Setting Paragraph Titles

Each paragraph has a title value which can be hidden or displayed. By default this value is "Unitlted" and hidden. After setting this value, the updated title will be reflected in the Outline, regardless of whether the title is displayed or hidden for that paragraph.

To set the paragraph title:

  1. Select the setting icon on a specific paragraph:

  2. Select "Show Title"

  3. Select the text that just appeared (by default it is set to "Untitled") > Type in the desired title name

  4. Optional: To hide the title, Select Hide Title from the paragraph settings. Remember that the Outline will still reflect the updated title value.

Put it all together

Add Custom Dividers

Visually it can be very beneficial to create visual divisions in your notebooks. Each section can be denoted by the task being conducted, Loading libraries, Connecting to data, Preparing data set, etc... Here is a clever way to use Python and HTML to create visual dividers in your notebooks:


# Edit color, text, and any other sytling
print('''%html\n<h1 style="background-color: #673191; color: white; text-align: center"><b>STOCK FORECASTING</b></h1>''')

Code examples that may be used multiple times in one notebook, are great examples for adding to Code Snippets!


Add Images and Videos

In Zepl, you can use Markdown or HTML to render images and videos in a notebook paragraph. Examples can be found here: Open in Zepl​

Image from URL


Image from Uploaded File

# If .jpg format, must download image locally to the container first using !wget http://zdata/fox1.jpg
# Supported for .png images
img = matplotlib.image.imread('http://zdata/fox1.png',format = "png")

Render a Video from URL

<video width="100%" height="100%" autoplay loop>
<source src="" type="video/mp4" />
Your browser does not support the video tag.