Protobi's order of operations

Updated at May 17th, 2023

The order of operations in Protobi, sometimes called the calculation pipeline, is the order for formatting raw data from a data file into a neat distribution you see within an element. Note: for most elements, you will not need to apply every attribute from the calculation pipeline. 

Refer to How elements get their data: field, element and transform to review how elements get their data and the different attributes you can edit to change an element's data source.

First replace key phrases or words. This is also useful when you need to keep certain phrases together. For instance if you always want to keep the phrase “Covid 19” together replace it with “Covid_19”. Add the replace attribute using the JSON editor

Apply uniform capitalization to values using the string attribute in Edit properties. Options include: lower case, UPPER CASE, Sentence Case, and camelCase.

Split text responses or arrays of values. You can split by word or another delimiter. Common delimiters are commas (,), semicolon (;), quotes ( ", ' ), braces ({}), pipes (|), or slashes ( / \ ). 

Reformat values using the simple recode tool or the advanced recode tool. This is typically used to group open-ends into categories.  

Set the element type in Edit properties. For open-ends you will set type to “string” and for date values convert type to “date”. For groups that do not have data themselves but have children type is already set to “empty”. 

The scale attribute takes a numeric value or name of data column by which to multiply the values of this element.  E.g. 100 will convert fractions between [0,1] to percents [0,100].

The denominator attribute takes a numeric value or name of data column by which to divide the values of this element.  E.g. 100 will convert percents [0,100] to fractions between [0,1].  

Cap outlier responses in an element to within a defined range by setting the "ceiling" and "floor" attributes. Add the ceiling and floor attributes using the JSON editor

 

 

Was this article helpful?