You can combine data files using data processing in Protobi. The code creates a simple stack of multiple data sets. The method described in this tutorial works in cases where the data sets are identical in layout (e.g., multiple waves of a survey).
To stack multiple data sets together:
- Upload the data files
- Create a new data process that stacks the files
- Set the data process as "primary"
Upload data files
See how to add a new data table for more details.
New data process
Create a data process, and insert the following code:
var W1 = data["wave1"] var W2 = data["wave2"] var W3 = data["wave3"] var W4 = data["wave4"] var rows = CSV.stack_rows([W1 ,W2, W3, W4]); return rows
Save and run the data process.
Set as "primary"
Then, set the data process as primary:
The resulting data file will have all 4 wave stacked one on top of another.