Pre-calculate vs Data processes


Updated at March 20th, 2020

There are two ways to process data in Protobi-- either in data process or pre-calculate. This article explains the difference between the two methods, and when it's advisable to use one over the other.

Both methods of data processing can be done by admins in project settings. Pre-calculate code is run automatically as the project opens, and only on the primary data file. Data processes are run upon request, and can pull from multiple data files. Typically these are programmed in Javascript.


Press on the pre-calculate tab and you will immediately see a page where you can enter processing code. There is a button to save any changes you make to this page.


  • Any code in pre-calc is run every time before the project opens
    • So no additional steps are needed if a data is refreshed
    • However additional processing time is need to open the project
  • Project setup or element attributes can be changed
  • Processes in pre-calc only operate on the "primary" data file

Practical applications

Data process

For more complex data processing we recommend creating a process under the "Data" tab. To create a new process press the green "New process" button. After a data process is created, press "Edit/run" to see the code view. Like the pre-calculate page, there is a button to save changes. Because data processes are only executed upon request, there is a "Run..." button to apply the process to the data file.

You will want to run the process each time changes are made to the code or data files are updated 


  • Data processes can operate on multiple files, for tasks like merging and stacking
  • The result of a process is stored as a data file
    • The data file can be the "primary"  file for the project
    • The file can be downloaded in CSV format

Practical applications


Was this article helpful?