Notebooks
An interactive notebook mixes data, logic and visualizations to describe ideas and concepts.
This style of literate programming supports reproducible research and open access in data science.
This style of literate programming supports reproducible research and open access in data science.
Expansion
Notebooks open collapsed: the common entity UI components are hidden, which keeps the notebook readable.
Click the expansion icon to show them.
A notebook you write yourself opens for editing. The report of an analysis opens for reading instead and gets an Edit report control next to the expansion icon; see Analyses .
Click the expansion icon to show them.
A notebook you write yourself opens for editing. The report of an analysis opens for reading instead and gets an Edit report control next to the expansion icon; see
Sections
To add a section, click the plus icon at the bottom of the notebook or the insertion marker between two sections, and choose the section type in the menu.
These entity types can be sections of a notebook:
These entity types can be sections of a notebook:
| Section | Description | FDK API |
|---|---|---|
| Chapter | Structuring unit within a notebook | |
| Layout | Column layout unit within a notebook | |
| Spacer | Vertical spacing unit within a notebook | |
| Contents | Table of contents (TOC) | |
| Function | Intelligent function to map the project graph | |
| Table | Table of structured data | |
| Model | Automated analysis model | |
| Chart | Graphical representation of data | |
| Text | Textual output in a notebook | |
| Image | Two-dimensional image |
Interdependencies
Sections may depend on each other. All sections are automatically refreshed after each function evaluation.
Structuring
Chapters structure a notebook, and a notebook with at least one chapter shows a table of contents.
Chapters can be nested, and sections can be reordered by drag and drop.
Chapters can be nested, and sections can be reordered by drag and drop.
Layout
A layout section places sections side by side in columns.
Export & import
A notebook can leave the platform as a Diafunc bundle: a portable, human-readable
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 large exports). Import bundle… uploads a
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.
.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 large exports). Import bundle… uploads a
.dfnb, previews its inventory, and then commits it into the current project under new ids, so 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:
| Command | Description |
|---|---|
diafunc notebook export <project> <notebookId…> --out file.dfnb | Export notebooks to a bundle (add --data parquet for typed table data, --async to queue). |
diafunc notebook import <project> file.dfnb | Import a bundle (--preview to inspect first, --on-conflict copy|overwrite|skip). |
diafunc notebook bundles <project> | List bundle-export jobs for a project. |