Get started
Prerequisites
Before building up a new project it's necessary to have an active account at Diafunc. Therefore, simply sign up. A free subscription is enough to begin with.
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.
When creating a new project you choose a project name, an optional description and the project visibility. 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.
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" 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.
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.
When creating a new project you choose a project name, an optional description and the project visibility. 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.
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" 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 on 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 beginning 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.
Information: It's not mandatory to use notebooks as all types of entities (functions, tables, ...) can also be used on 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 beginning 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.
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 extremely 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 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)
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.
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.
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.
Congratulations, you've created your first project at Diafunc. We hope that you enjoyed it!
Congratulations, you've created your first project at Diafunc. We hope that you enjoyed it!