Pyplan is an integrated development environment for applications, designed for users without programming knowledge. This is why the users build the calculation logic and data processing of the applications by dragging different types of nodes in an influence diagram.
Clicking "Create an application" opens a dialog box that lets you choose to create an application from scratch or from an example.
By choosing to create a data analysis application and then selecting the code visualization, you will reach a window like the following:
Once you have clicked on the code icon in the main menu, you will access the influence diagram:
The elements that make up this
section of the platform are:
It is the graphical representation of the calculation process. Each node represents a calculation step in the data transformation process. A node is selected by clicking on it. By double-clicking on a node, it is calculated. Its result is displayed in full screen according to your default display settings. Links (arrows) between nodes are automatically generated when invoking a node within the definition of another node.
A node is the smallest unit of construction of the calculation process. To add a node, drag it onto the diagram.
Each node has the following properties:
It is the text displayed inside the node in the diagram
It is the identifier of the node, that is, the way in which a node is invoked in the definition of another node. The node’s Id is automatically generated from the title, but can be changed by the user.
If a node contains a single measure, it is possible to indicate its unit. This will be shown in parentheses next to the title when the node’s results are displayed.
It is worth noting that units are only included for visualization purposes, they are not part of the calculation of results.
If enabled, the node will be automatically evaluated when the application opens.
When enabled, the node’s result is not stored in RAM after evaluation. This helps freeing up memory for intermediate nodes that have a single output. If the node’s result is needed by another node, it will be recalculated.
It is the transformation operation executed when evaluating a node. Its code is written in Python language. It ends with the definition of its result “result=”
It is the technical description of the output of the calculation process.
It is the result of executing the code of the definition. When this result is an object interpreted by Pyplan (a Pandas dataframe, a Numpy matrix, or a matrix with designated dimensions of Xarray), it can be visualized graphically or in table form.
It is the text that conceptually describes each calculation step and is displayed at the bottom of the result view.
List of nodes used in the definition of a node.
List of nodes that use the result of the selected node.
You can access all of these properties by right-clicking on the node and then clicking on properties.
There are different types of nodes for different purposes. Their functionality has been designed to facilitate the definition of the parameters necessary for its execution.
Variable type nodes are the most commonly used, as they have the function of containing a generic calculation process. They are blue in color initially. If it does not have outputs, this color changes to gray and it is considered a report. It changes to red if the outputs of the node are outside the module to which it belongs.
Node that when dragged displays an assistant to connect to different data sources:
Node that allows to create a manual data entry process.
Once the type of data input is chosen, an assistant is displayed for its configuration.
An InputCube type node is a node that allows entering data in a multidimensional manner as if it were a pivot table. The table values are saved in a configurable database within the same wizard.
The initial configuration looks like the following:
The extra settings you can configure are the following:
Important considerations:
The Report type node is a node that allows creating a report from a list of concepts to which a value or the result of a node is assigned for each concept.
The "Items from index" checkbox indicates whether the list of concepts in the report comes from an Index node (whose result is a pandas Index) or not. In the latter case, the list of concepts is generated manually.
If "Items from index" is unchecked (as shown in the image), it is necessary to complete:
For this variation, it is possible to add new concepts through the "Add new item" button. Additionally, it is possible to change the order of already created concepts, delete, and modify them.
If "Items from index" is checked, the dialog looks like the following:
In this case, it is necessary to complete:
For this variant, once the "Index node" field is completed, it is possible to automatically generate all the concepts of the dimension by pressing the "Add items from index" button.
Once the concepts are added and filled out, it will look similar to the following image:
Each concept has the following properties:
Finally, the "Output type" selector allows choosing the output format that the report will have, with the following options:
Important considerations:
The button is a special node that allows you to execute Python code each time the user presses it. In this type of nodes, the result does not persist in memory.
The index node is the way Pyplan stores dimensions that are used throughout the calculation process. Its definition leads to the determination of a list of elements that constitute the dimension. They have a particular functioning when included in interfaces.
The text box is a construction element of the diagram for the sole purpose of facilitating the interpretation of the influence diagram.
It is a special type of node that allows you to contain nodes inside it. It serves to hierarchically organize a complex calculation. A module is entered by double-clicking on it. Modules can be nested indefinitely.
Aliases are a type of node that are used to make influence diagrams more explanatory. They are a mirror of the original node. That is, not only does the result they show match the original, but modifying the definition of the alias also modifies the definition of the original node. The Alias is created by pressing Ctrl+M once a node is selected.
The influence diagram is a hierarchical representation of the calculation logic. Scrolling within the diagram is done by double-clicking on the module you want to enter or by clicking on the path generated from the navigation to move up to the higher hierarchies.
When selecting a node, right-clicking on it displays a node properties window.
Clicking on the blue button at the upper left corner displays the different types of nodes to drag onto the diagram.
This is the most commonly used way to create new calculation steps in the data processing flow of the application.
It is also possible to copy <Ctrl+C>, cut <Ctrl+X> and paste <Ctrl+V> a selected node or group of nodes. To select multiple nodes, click on each node while keeping the <Ctrl> key pressed. You can also generate a selection rectangle by holding down the <Shift> key and clicking on the diagram and then scrolling to delimit the rectangle.
By selecting a node, we can know if it is calculated or not, as indicated in the result window:
A node is calculated by double-clicking on it or by pressing the Play icon that appears in the result window or by pressing <Ctrl+Enter> once the node is selected.
There are three types of visualizations of a node that can be chosen in the upper right part of the diagram window.