Toggle navigation
Home
▼ Details
Products and pricing
Chart gallery
User stories
Text analytics
CDC NAMCS Library
Blog
Tutorials
Contact
Sign in
Post Editor
← All help posts
View post
Save
This tutorial shows how to create a multi-wave project by cloning the project workspace from a previous wave of the same study. If you want to create a new project and set up the questions from scratch, check out: - [Create a new project](/new-to-protobi/create-a-new-project) - [Basic project setup recommendations](/new-to-protobi/basic-project-setup) ## Data considerations Before creating a multi-wave project, make sure the new wave data is compatible with the prior wave data. This means: - The same questions have the same question numbers - Sunset any question numbers for deleted questions - Use new question numbers for new questions - There is a column that indicates "wave" (if not, we can also create this is Protobi's data process) ## 1) Create a new project With each new wave of data, you can choose to create an independent project workspace. To get started, [Create a new project](/new-to-protobi/create-a-new-project) using the current wave's data file (partial data works fine). ## 2) Copy the prior wave’s elements into the new workspace The elements configuration determines the organization of the project (i.e. question order, titles, formats, etc...). Copying elements over is useful for tracking studies because the bulk of the survey stays the same or is very similar to the prior wave, so keeping the same organization saves a lot of time. Open the elements from [project settings](/admin-access/project-settings) of the prior project and copy it over to the elements page of the newly created project. See the [duplicate a workspace](/intermediate-editor/how-to-clone-a-project) tutorial for a GIF on how to [copy elements](https://help.protobi.com/advancedusers/how-to-clone-a-project#Copy%20%20elements-3) from one workspace to another. ## 3) Bring prior wave processed data into the new project For historical data from a prior project we prefer to use the processed data, otherwise we will have to be sure to apply the same processing code to the historical waves if you're starting from a raw aggregate wave data file. In the [data tab](/admin-access/project-data) of the prior wave find the "Primary" data file. It could be a blue data table, but the primary data is typically a green data process which includes code where we applied business rules to clean your survey data based on your instructions. <img src="/uploads/upload/image/5200/direct/1605100160195-1605100160195.png" alt="Project settings Data tab showing three data tables (Updated, main with Primary tag, process with Primary tag) and one process (process)" class="fr-fic fr-dib"> Click into the "Primary" data table or process, and download as CSV. Save this file under a name like "process\_w1" or "main\_w1" etc. <img src="/uploads/upload/image/5200/direct/1605100230757-1605100230757.png" alt="Process data table configuration panel showing Name 'Process', Type 'process', Updated 'Tue Feb 25, 2020 12:32 pm', Filename 'Process.csv', with buttons for View data online, Edit/Run, Delete, Primary (orange), and download options (Original, Direct, CSV, SAV)" style="width: 380px;" class="fr-fic fr-dib"> ## 4) Upload prior wave data as a table in the new project In the new project space, the data file in "main" is the recent wave of data. Create a new data table for prior wave data. ### <img src="/uploads/upload/image/5200/direct/1605100469781-1605100469781.png" alt="Project settings Data tab for project 'Tracking study Wave 2' displaying one data table named 'main' with an orange Primary tag, plus buttons to create new data tables, processes, and documents" class="fr-fic fr-dib"> Name the data table "process\_w1" or something that represents the prior wave. Drop in the "Primary" file from the prior wave that you saved as a CSV. <img src="/uploads/upload/image/5200/direct/1605100670303-1605100670303.png" alt="Data table configuration panel for 'process_w1' with Type 'data', Updated 'Wed Nov 11, 2020 08:17 am', showing a dashed-border upload area with text 'Drop a CSV or SAV data file here or click to select', plus View Direct button, Admin section with Delete and Make primary buttons, and Docs Wiki link" class="fr-fic fr-dib"> ## 5) Add a data process After you add the prior wave's data to the new project space, create a new process by pressing on the "New process" button. <img src="/uploads/upload/image/5200/direct/1605100917253-1605100917252.png" alt="Project settings Data tab for 'Tracking study Wave 2' displaying two data tables: 'main' with an orange Primary tag and 'process_w1', both shown as blue buttons, along with a '+ New data table' button" class="fr-fic fr-dib"> Press "Edit Run" to add code to this new process. <img src="/uploads/upload/image/5200/direct/1605101501593-1605101501593.png" alt="Process data table named 'process' with Type 'process', Process type dropdown set to 'Simple', Updated 'Wed Nov 11, 2020 08:28 am', featuring Edit/Run button in blue, Delete button in gray, and Primary button in orange" class="fr-fic fr-dib"> ### Bring prior process code into the new project Copy the code from the process in the prior wave project over to the process you created in the new project. Remember, we already added the prior wave's processed data, so there's no need to run the same process code on historical waves. You only need to carry over the code if you with to run it on the new wave of data. ### Add code to stack prior wave with current wave Add the code highlighted in yellow below that takes the data tables and creates a simple stack. ## Simple stack code ``` /** * @by tiffany@protobi.com * @created 2023-06-01 * @see (enter URL of Freshdesk support ticket or other reference) * This process assigns wave values and stacks the W1 processed data with the W2 data * The W1 data table has the already processed W1 data from the W1 project workspace, the W2 table is the raw W2 data file */ var W1 = data["process_w1"] //define prior wave file var W2 = data["main"] //define W2 (current wave) file //TL, 2023-06-01, data from W1 is assigned wave = 1 W1.forEach(function(row){ row.wave = 1; //assign a wave value if it's not already programmed in the survey }) //TL, 2023-06-01, data from W2 is assigned wave = 2 W2.forEach(function(row){ row.wave = 2; //assign a wave value if it's not already programmed in the survey //TL, 2023-03-01,Code to create productx_enthusiast flag (Carry over each wave) if (row.S10 >= 6 && row.S6_5 == 1) row.productx_enthusiast = 1 else row.productx_enthusiast = 0 }) var rows = Protobi.stack_rows([W1 ,W2]); //TL, 2023-06-01, stack prior and current waves of data //TL, 2023-07-13 //Create new prescriber variable (Carry over each wave moving forward) rows.forEach(function(row){ if (row.s1 == 3 && row.s4 > 0) row.prescriber = 1 else row.prescriber = 1 }) return rows; //return the result ``` ### How to create a “wave” variable If you don't already have a "wave" variable in your survey we can create one in Protobi. You will need this variable to filter on particular waves of data and to crosstab for wave comparisons. In the same data process used to combine the multiple wave of data, we can define a wave variable. Create separate ".forEach" functions for each data table. Create a variable "row.wave" and assign it the appropriate value. ## Wave assignment code ``` /** * @by tiffany@protobi.com * @created 2023-06-01 * @see (enter URL of Freshdesk support ticket or other reference) * This process assigns wave values and stacks the W1 processed data with the W2 data * The W1 data table has the already processed W1 data from the W1 project workspace, the W2 table is the raw W2 data file */ var W1 = data["process_w1"] //define prior wave file var W2 = data["main"] //define W2 (current wave) file //TL, 2023-06-01, data from W1 is assigned wave = 1 W1.forEach(function(row){ row.wave = 1; //assign a wave value if it's not already programmed in the survey }) //TL, 2023-06-01, data from W2 is assigned wave = 2 W2.forEach(function(row){ row.wave = 2; //assign a wave value if it's not already programmed in the survey //TL, 2023-03-01,Code to create productx_enthusiast flag (Carry over each wave) if (row.S10 >= 6 && row.S6_5 == 1) row.productx_enthusiast = 1 else row.productx_enthusiast = 0 }) var rows = Protobi.stack_rows([W1 ,W2]); //TL, 2023-06-01, stack prior and current waves of data //TL, 2023-07-13 //Create new prescriber variable (Carry over each wave moving forward) rows.forEach(function(row){ if (row.s1 == 3 && row.s4 > 0) row.prescriber = 1 else row.prescriber = 1 }) return rows; //return the result ``` The result is an element that you can click to filter on, use to set global filters and use as a crosstab banner. <img src="/uploads/upload/image/5200/direct/1605113117003-1605113117003.png" alt="Protobi interface showing a Banner element with a blue 'wave' variable that has two child values: 'wave is 1' (count 191) and 'wave is 2' (count 191), displayed in a tree structure with horizontal blue bars indicating response counts" style="width: 570px;" class="fr-fic fr-dib"> ### Set the new process as the Primary source of data Press the Primary button next to the admin row (the button will turn yellow). When you open the project, you should see both waves of data and the N size button shows the number of all respondents across all waves. <img src="/uploads/upload/image/5200/direct/1689781678765-1689781678765.png" alt="Process configuration form displaying Name 'process', Type 'process', Process type dropdown set to 'Simple', Resources textarea containing placeholder text 'URLs, one per line', Updated 'Wed Jul 19, 2023 11:47 am', Filename 'process.csv', Visibility 'Project', Status 'Active', with View buttons (Data online, Direct, Properties) and Admin buttons (Edit/Run, Delete, Primary in orange)" style="width: 400px;" class="fr-fic fr-dib"> ## 6) Edit the project to reflect survey changes If your survey is exactly the same between waves, and you're using the same "elements" configuration as the prior wave then you shouldn't need to make any changes to the project space. ### New questions are automatically added to fields After you combine the current wave of data with prior waves, any new questions that were added to the survey will appear as new elements in "fields". There might be some variables that were already organized into the "fields" tab from the prior wave's elements setup, but new questions will be at the very end of "fields' list of children. <img src="/uploads/upload/image/5200/direct/1605157826502-1605157826502.png" alt="Left sidebar field tree displaying a list of survey variables with blue circle icons for most items and blue square icons for agreement and h variables. The visible fields include confirmation, Specialty, pikey, respid, skey, status, timer_total, wave, agreement, h, and three highlighted question variables (Q201x, Q222x, Q300a) with light blue backgrounds" style="width: 324px;" class="fr-fic fr-dib"> ### Organize new questions manually Once you identify the questions that are new to this wave, you can create a new tab with a name like "new\_wave2" and move the new questions there. Another option is to directly move the questions to their respective sections of the survey instead of consolidating them on one tab. You can optionally set the [icon color](https://help.protobi.com/edit-access/colors#Set%20element%20icon%20color-4) on new questions to a color that is different than the standard color to easily differentiate the new questions from the old. Manually moving questions like this works well for new waves where there are not many new questions. For waves where there are many new questions, you can choose to run autogroup instead. <img src="/uploads/upload/image/5200/direct/1687550503911-1687550503911.png" alt="Protobi report view with 'new_wave2' tab selected, displaying three survey questions in a row: Q201x asking about initiation on Class-2-2i products (showing responses 0-100 with percentages), Q222x about initiation on Class-2-2i (showing responses 0-100 with mean 14.5), and Q300a about CV profile changes (showing 5-point scale from Strongly decrease to Strongly increase with 'Stay the same' at 53%)" class="fr-fic fr-dib"> ### Use autogroup to organize new questions If the new wave of your survey added many new questions, you can choose to run autogroup on fields to avoid manually moving questions. Autogroup will group questions with similar keys together. For instance if there is a new option S13\_5 with the S13 question, autogroup will put S13\_5 under the existing S13 group. ### Hide/remove questions If you added/dropped questions between waves, then the new questions will need to be set up and the dropped questions should be [moved](/tracking-studies/move-mirror-clone) or [hidden](/edit-access/hide-remove-delete) from view. ## 7) Use global filters for each wave For tracking studies, you can use [global filters](/view-access/global-filters) to see different waves of data individually. In the example below, we have a global filter on wave 2. <img src="/uploads/upload/image/5200/direct/1605113327762-1605113327762.png" alt="Protobi Banner view with 'wave is 2' filter active, showing two banner variables: 'wave' with values wave 1 (0), wave 2 (99 with blue bar), N (99), and 'speciality' with values RN (0), GP (99 with yellow bar), N (99)" style="width: 875px;" class="fr-fic fr-dib"> ## 8) Update/refresh current wave data Users usually create projects with partial data files and update the data as their surveys progress in fielding. To update the data in a tracking project upload the new data file into the "main" table (or whichever table contains the current wave)and re-run the process. For more information see the [update project data](/_questions/483113) tutorial.
Publishing
Date
Status
Published
Draft
Slug
edit
Content
Thumbnail
Categories
Manage
New to Protobi?
Charts
Making Changes
Intermediate topics for editors
Frequently Asked Questions
SERMO Topics
Tutorial Pages
Internal Docs
Data Processing
Videos
Obsolete
GSG Admin
SERMO Admin
GSG Topics
How to...
Basics for viewers
Basics for editors
For project admins
Advanced topics
Assessments
Articles (in-progress)
New and updated articles
Process data in Protobi
superseded
Text open-end questions
Troubleshooting
Tracking studies
Organizing the view
API References
Tools
AI Database
Checking AI...
Convert to MD
Danger zone
Delete