Skip to main content
Documentation

Get started

Prerequisites

You need a Diafunc account to create a project. Sign up; the Free plan is enough to begin with.

Create a new project

The quickest way to start is to fork an existing project: find a similar one via "Start" or among the example projects, open it and click "Fork project" in the bar of the Lab.
This tutorial starts a project from scratch instead. Open the "Projects" page and click "New project".

A new project needs a name and a visibility, and can have a description. The name doesn't have to be unique and can be changed later on. The visibility determines whether the project can be viewed publicly without explicit permission; private projects are only visible to their members. A public project also needs a license, which you choose under the visibility buttons: it says what other people may do with the project and its data.
New projects write their functions in Java. If your project should use a different language, open the project's settings after creating it and pick one there (Java, Kotlin, Python, JavaScript or Scala). That setting is the project's default, and any single function can still override it in the function's own settings.

Click "Create". Diafunc sets up the project together with a main notebook.

Your first Notebook

A notebook holds sections of any kind. It is where a data science project is usually implemented and described.

Notebooks are optional: functions, tables and every other entity type also work on their own. They are the recommended place to describe the relationships and concepts of a project. A project can have any number of notebooks, structured in any way.

Chapters organize a notebook, and a notebook with chapters gets an index at its start. Columns place sections side by side, and spacers separate sections.

Developing a "Hello World" Function

Data science in the Lab is done with intelligent functions. A function can be a few lines or a complete program, and it can run statistical analyses and automated model discovery without any setup. The first function prints the output "Hello World".


The function's settings choose its programming language and can configure triggers for automated evaluations.

The variable "diafunc" references the context object, the root of all built-in functions. The names "d", "df", "c", "ctx" and "context" refer to the same object.
The Function Development Kit (FDK) API lists every built-in function. In the editor, Ctrl+Space opens autocompletion, and Ctrl+click on a name jumps to its FDK API documentation.

Function Development Kit (FDK)

Evaluation

Click the play icon to evaluate the function. Click the stop icon to stop a running evaluation.

Result

Outputs appear live during the evaluation, and the result appears when it has completed. Here the result is the composed function that maps the project to an output.



Your first project is ready.

What next?