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!
Zepl automatically generates an Outline based off two attributes found in each paragraph:
Interpreter Type - %python, %spark, %r, %md, etc...
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.
To access the outline for each notebook, select the Outline icon on the right hand side of your notebook:
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:
Select the setting icon on a specific paragraph:
Select "Show Title"
Select the text that just appeared (by default it is set to "Untitled") > Type in the desired title name
Optional: To hide the title, Select Hide Title from the paragraph settings. Remember that the Outline will still reflect the updated title value.
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:
%python# Edit color, text, and any other sytlingprint('''%html\n<h1 style="background-color: #673191; color: white; text-align: center"><b>STOCK FORECASTING</b></h1>''')
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
%python# If .jpg format, must download image locally to the container first using !wget http://zdata/fox1.jpg# Supported for .png imagesimg = matplotlib.image.imread('http://zdata/fox1.png',format = "png")plt.axis('off')plt.imshow(img)
%md<video width="100%" height="100%" autoplay loop><source src="https://zepl-dev.s3.amazonaws.com/home/ken/Tesla_video_4_Zepl.mp4" type="video/mp4" />Your browser does not support the video tag.</video>