From the main Panel, click on Settings. The screen will appear as shown below.

The Settings panel  is composed of three sections: Data Import, Inventory and Workspace.

  • Data import is the area of Settings where the survey produced in Collect is uploaded into Calc. Information on the Areas of interest and External equations are also uploaded at this stage.
  • Inventory allows the user to define the details of the Sampling design and Aggregation functions.
  • Workspace allows to switch from one survey to another (in Calc it is possible to upload more than one survey simultaneously) and manage them (Import-Export functionalities).

Data import


In Calc, each survey defined in Collect, is represented by a workspace. When uploading a Collect Survey backup, Calc automatically creates a new workspace. If a workspace is uploaded with the same name of an exiting one, the new one will replace it.

Click on Collect and then on the button Upload backed up files to import the survey created in Collect.

In the test example, the file to upload is which contains the Survey Atlantis.

A dialogue window will appear as shown below. When upload is finished click Close. Should there be any mistake it will appear in the Log section.


Close the window and go back to the main Setting page by clicking on the left arrow in the footer at the bottom of the screen.



Note: The Survey “Atlantis” was successfully imported and it is shown as Active in the Workspace area at the bottom of the screen. CALC is able to host multiple surveys which will appear in the Active box. 



Areas of interest

The next step is to upload the information about the Areas of interest. Click on Areas of interest, then on Upload Csv and select the appropriate file. In the test example: calc-aois.csv. This files contains data on the area of reference associated to the survey: it could be the total area of a country and its subdivisions in regions, provinces etc. We can consider ‘areas of interest’ as reporting units.

The user is now asked to enter captions for the area levels which, for example, could be set as: Level 1 = Country; Level 2 = Region.

Then click on Import

The screen will show a graphical representation of the areas object of the survey. The biggest circle indicates Level 1 (Country), while the smaller circles, proportional to their areas, indicate Level 2 (Regions).

Click on the left arrow at the bottom of the page to go back to Settings.

External equations

The last step allows the user to upload External equations for the calculation of volume according to tree species or any other condition. This is done by uploading a csv file.

Click on External equations, then on Upload Csv. In the test example, the file to upload is: calc-volume-models.csv




In order to produce aggregated results based on a sampling design, one must be defined. Calc handles point sampling surveys based on a variety of sampling designs: single or double sampling, cluster, random, systematic and stratified sampling.

The hierarchical structure defined in Collect is converted into a relational database: the entities are converted into tables, attributes into columns, and tables are linked by logical joins. 

A representation of the data tables and their relational joins under different sampling design is presented below. [Click on Data tables and relational joins to expand it].

Sampling Design

The sampling design section has as question/answer user interface. Choices are made by clicking the appropriate button which, by turning green, indicates that a selection has been made.

The following steps will guide you to define the sampling design in Calc.

Click on Sampling Design and then on the Edit button.



1. Select the entity that represents the sampling unit (table 1).  For the test example select plot. 

Click on the right-arrow to proceed to the next step.


2. Select whether the sampling design is Simple random (SRS) or Systematic.

The next step requires the selection of the sampling design of the survey. For the test example select Systematic.

Note: in CALC a selection is confirmed when the button turns green.


Proceed with Settings by clicking on the right arrow.


3. Select whether the survey is designed with double sampling (2 phases). For the test example select 2-phases.

The system will require the user to upload a csv file containing the first phase points that will be converted into a database table (table 2). (column names are user defined)

The user must define the columns that will be used to join with the sampling unit table. This is necessary to link the first phase points with their observations. (e.g. see yellow arrows in the 'Data tables and relational joins' section).

Calc recognizes the file structure and before importing the file the user should select which columns to import and define the data type of each column, choosing from Integer, real or String. Integer and real refer to numerical values (with or without decimals), String refers to a coded value (please note that even if a value is indicated with a number it may actually refer to a code). In our example, make the selection as shown in the image below.

Then click on Import.


A running import window will appear showing that the csv has been successfully imported (100%). In case of errors or notifications they will be displayed in the Log window.



4. Next steps requires to define the joins between tables. The rationale for this process is that each table should have at least one column in common with another table, and that column will be the join (see the join between table1 and table 2 in the Data tables and relational joins section). In our example, under phase 1 table select cluster and make the join with plot_view table by selecting cluster_id. Additional joins can be added by clicking on the small [+] sign to the right. In our example proceed by selecting plot and making the join it with plot_no.


5. Click on the right-arrow to proceed to the next step in which the user is asked to indicate whether the survey has any stratification.

If the survey is stratified (like in the test example), click the Stratified button. The button will turn green and you will be asked to upload a csv file containing the stratification table

In the test example, the survey contains three strata as visible in the uploaded file calc-strata.csv

The system will require to upload a csv file containing the strata definition that will be converted into a table (table 3) (column 'a' defines the stratum number, and column 'b' the stratum caption).

The user must define the column that will be used to identify the stratum for each record [in case of double sampling the column has to be present in the phase-1 table (table 2) , otherwise in the sampling unit table (table 1)].

Select stratum as the column that serves as a join (see the join between table 2 and table 3 in the Data tables and relational joins section). Then click right-arrow for the next step


6. If the survey has a cluster design, select Cluster.

The user must define the column that represents the cluster code  [in case of double sampling the column has to be present in the phase-1 table (table 2), otherwise in the sampling unit table (table 1)]. 

For the test example select cluster(see cluster column in the Data tables and relational joins section)


7. Define the area of interest. The system requires the users to indicate the column that represents the lowest level of the administrative unit hierarchy previously imported (table 4). [In case of double sampling the column has to be present in the phase 1 table (table 2) , otherwise in the sampling unit table (table 1)].

For the test example select aoi_code(see the join between table 2 and table 4 in the Data tables and relational joins section)

Then move to the next step


8. The last step requires the user to write an R script to calculate the weight of each record of the sampling unit table. The script will assign a weight to each record (sampling unit) by adding a column (named weight) to the sampling unit table (table 1). 

For the test example the following R script will be entered:


plot$weight = ifelse ( ( plot$subplot ) | plot$subplot == 'A' , 1 , 0 )



Click Save.

You will see a window confirming that the sampling unit weight has been recorded and used to calculate the expansion factor.


Click close and you will be prompted with a window showing all the selected Settings. If you wish to make any modification in the sampling design settings click Edit.



Otherwise click the left-arrow at the bottom of the screen to return to the Settings panel.





Next step is to define the Aggregation function which represents the formula of the plot area for the entities you wish to aggregate following the sampling design. ( e.g. trees / dead wood etc..)

Click on Aggregation to select the Entity. For the test example select Tree.


You will then be prompted to enter a Plot area script. The following example shows how to calculate the plot area for 3 circular nested plots with radius of 1, 5 and 10 mt. respectively.


tree$plot_radius <- with(tree,

ifelse(dbh < 5, 1,

ifelse(dbh < 10, 5,

ifelse(dbh < 20, 10, 15)




tree$plot_area <- with(tree, pi * plot_radius^2 * share / 100);

#convert plot area factor from m2 to ha

tree$plot_area <- tree$plot_area * 0.0001;

Enter the script as indicated. Then click
Save. You will see appearing a green confirmation message (in the top part of the screen). Then click left-arrow to go back to main Settings page.




All the steps in the Settings area are now completed. The last two buttons in the Settings area serve for the management of the Workspace(s). Export and Import can be used to export and import all the meta data defined in Calc for a workspace. The following information will be exported or imported: areas of interest, external equations, sampling design, aggregation formulas, calculation steps and error calculation settings.

If more workspaces have been uploaded, it is possible to switch workspace by clicking the Active button and select the one to be worked on.



Click here to return to Tutorials Main Menu