Skip to main content
Documentation

Notebooks

Interactive computational notebooks allow to express data science in a modern way.
It's possible to mix up data, logic and visualizations to describe ideas and concepts.
This kind of Literate Programming leads to reproducible reasearch and open access in data science.
A computational notebook mixing data, logic and visualizations

Expansion

Notebooks are initially displayed in collapsed mode. This means that the common entity UI components are hidden to improve the usability of notebooks.
Those components can be displayed by clicking the expansion icon.
A notebook expanded to reveal the hidden entity UI components

Sections

The context menu to add new sections can be opened by clicking the plus icon at the bottom of the notebook or by clicking the insertion marker between sections.

The context menu for adding a new section to a notebook



Many entity types are supported as sections within a notebook:

Section Description FDK API
Chapter Structuring unit within a notebook Chapter
Layout Columnar layouting unit within a notebook Layout
Spacer Vertical spacing unit within a notebook Spacer
Contents Table of contents (TOC) Contents
Function Intelligent function to map the project graph Function
Table Big data table for structured data Table
Model Automated analysis model Model
Chart Graphical representation of data Chart
Text Textual output in a notebook Text
Image Two-dimensional image Image

Interdependencies

Sections may depend on each other. All sections are automatically refreshed after each function evaluation.

Structuring

Notebooks can be structured in chapters. If the notebook contains at least one chapter then it will automatically display a table of contents.
Chapters can also be nested within one another. It's even possible to reorder sections via drag and drop.
A notebook structured into nested chapters with a table of contents

Layouting

Sections can be vertically layouted in columns via the layout section.
Notebook sections arranged side by side in columns using a layout section

Export & import

A notebook can leave the platform as a Diafunc bundle — a portable, human-readable .dfnb file (a ZIP whose members are JSON for structure and CSV for table data). Use it to version a notebook in git, share it, or move it between projects and clusters. A bundle is self-contained: exporting a notebook automatically includes the full closure of entities it references — chapters, tables, functions, models, charts and their data — so it re-imports anywhere with no dangling references.

From the Bundle menu in the Lab action bar, Export notebooks… lets you pick one or more notebooks and download the bundle (or queue a background job for very large exports). Import bundle… uploads a .dfnb, previews its inventory, and then commits it into the current project under freshly-minted ids — a re-import never collides with existing content.

Table data round-trips through CSV by default, which keeps the bundle readable; choose the Parquet encoding when exact column typing matters. Per-entity version history is not included — a bundle captures the current state of each notebook.

Export & import from the CLI

The same bundles can be produced and consumed from the command line:

CommandDescription
diafunc notebook export <project> <notebookId…> --out file.dfnbExport notebooks to a bundle (add --data parquet for typed table data, --async to queue).
diafunc notebook import <project> file.dfnbImport a bundle (--preview to inspect first, --on-conflict copy|overwrite|skip).
diafunc notebook bundles <project>List bundle-export jobs for a project.

What next?