Skip to main content
Documentation

Get started

Prerequisites

Before building up a new project it's necessary to have an active account at Diafunc. Therefor simply sign up. A free subscription should be sufficient for the first.

Create a new project

The easiest way to start a new project is to fork an existing one. Simply search via "Start" or look at the example projects for a similar project, then click "Fork".
Alternatively you can start a new project from scratch, which we will do in this tutorial. Open the "Projects" page and click the "New project" button.
The Create Project form with name, description, visibility and language fields

When creating a new project you choose a project name, an optional description, the project visibility and the default programming language. 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. The language (Java, Kotlin, Python, JavaScript or Scala) sets the default for the project's functions and can still be overridden per function later.

Click "Create" and your new project is set up — together with a main notebook — ready to work with.

Now the first step is accomplished and it's time to fill the main notebook.

Your first Notebook

Now you've created your first project and your first notebook and it's ready to be used. Notebooks can contain all kinds of sections and are usually used to implement and describe data science projects.

Information: It's not mandatory to use notebooks as all types of entities (functions, tables, ...) can also be used by their own outside of notebooks but it's highly recommended to use notebooks to describe your relationships and concepts within your projects. You can have as many notebooks in a project as you want and structure them in any way.

Notebooks can be organized using chapters. In this case an index will be added at the begin of your notebook automatically. It's also possible to layout parts of your notebook to display sections side by side in columns. Spacers might be used to separate sections.

A newly created main notebook with its initial empty sections

Developing a "Hello World" Function

Diafunc is all about doing data science via intelligent functions, as the name is already implying. Functions can be small and simple or complex and super sophisticated. Functions at Diafunc are extremly powerful. They do even support statistical analyses and automated model discovery out of the box. So let's start with our first function. It will be printing the output "Hello World".

The function code editor with a Hello World function and language settings

The programming language can be chosen at the function settings. It's also possible to configure triggers for automated evaluations.

The variable "diafunc" references the context object which is the root for all built-in functions. It can be also referenced with "d", "df", "c", "ctx" or "context".
Check out the Function Development Kit (FDK) API to find all supported built-in functions. Alternatively you can also use the autocompletion functionality (ctrl + space) at the editor to get some hints.
Through the code navigation feature (ctrl + left mouse click) it's also possible to directly jump from the code editor to the Function Development Kit (FDK) API documentation.

Function Development Kit (FDK)

Evaluation

Clicking on the play icon starts the evaluation of the function. A running function can be stopped anytime by clicking the stop icon during evaluation.
The function editor with the play and stop icons during evaluation

Result

Outputs are displayed live during evaluation. After the function evaluation has completed, the result is also displayed. In this case the result is the composed function which maps the project to an output.
The function output panel showing the Hello World evaluation result



Congratulations, you've created your first project at Diafunc. We hope that you enjoyed it!

What next?