# Video Consensus Process

## Datavyu Consensus Process

### Compare Columns Script

This script copies a column from one .opf into another .opf.

1. Make a duplicate copy of one of the coder's files, and change the file name to e.g. 02\_06\_consensus.opf
2. Open the new file, and change the name of the column to include the coder, e.g. labeled\_object\_SD.
   * The columns in your two .opfs cannot have the same name!
3. Open the compare\_columns script `/Volumes/Fas-Phyc-PEB-Lab/Seedlings/Scripts_and_Apps/Github/seedlings/datavyu_scripts/compare_columns.rb` It looks like this:

```
require 'Datavyu_API.rb'
begin

filepathFrom = File.expand_path("/Volumes/Fas-Phyc-PEB-Lab/Seedlings/New_RA_Training_Materials/Annotation/video/12_06/12_06_coderEB.opf")
    filepathTo = File.expand_path("/Volumes/Fas-Phyc-PEB-Lab/Seedlings/New_RA_Training_Materials/Annotation/video/12_06/12_06_consensusSK.opf")
    transfer_columns(filepathFrom, filepathTo, false, "labeled_object_EB")

end
```

The three things you need here are:

1. the *filepathFrom*, where you name the file to copy from,
2. the *filepathTo*, where you name the of to copy to, and
3. the name of the column to transfer.

**To get a file path**, on a Mac, you can drag the file into a Terminal window. **Filepaths to Opus** on a Mac should start with this:

```
/Volumes/Fas-Phyc-PEB-Lab/Seedlings/
```

For example, a filepath would look something like this:

```
/Volumes/Fas-Phyc-PEB-Lab/Seedlings/Subject_Files/12_01-01-2016/12_06/Home_Visit/Coding/Video_Annotation/12_06_coderSD_final.opf
```

1. Change the path in parentheses after **filepathFrom** to the path to the file that was **not** copied in Step 1. (This is ***your*** annotated file). *Be sure it's the path to an .opf, not just a folder!*

![enter image description here](https://mfr.osf.io/export?url=https://osf.io/kwjd3/?action=download\&direct\&mode=render\&initialWidth=841\&childId=mfrIframe\&format=1200x1200.jpeg)

1. Change the path in parentheses after **filepathTo** to the newly copied file (ex. 02\_06\_consensus.opf). *Be sure it's the path to an .opf, not just a folder!*

![enter image description here](https://mfr.osf.io/export?url=https://osf.io/78arg/?action=download\&direct\&mode=render\&initialWidth=841\&childId=mfrIframe\&format=1200x1200.jpeg)

1. Change the last argument of transfer\_columns to the column name from the filepathFrom file (the NOT copied file, where you changed the column name; usually it's "labeled\_object").

![enter image description here](https://mfr.osf.io/export?url=https://osf.io/y8jzr/?action=download\&direct\&mode=render\&initialWidth=841\&childId=mfrIframe\&format=1200x1200.jpeg)

1. Save the compare\_columns.rb file.
2. Open Datavyu, and go to Script --> Run Script
3. Browse to the compare\_columns.rb file in the Github folder.

* The scripting console should look like this:![Transfer completed successfully! Script completed successfully.](https://mfr.osf.io/export?url=https://osf.io/cxh8p/?action=download\&direct\&mode=render\&initialWidth=848\&childId=mfrIframe\&format=1200x1200.jpeg)
* If it doesn't, something is wrong with how you wrote the path or column names in the script you just edited.
  * Check your paths in the compare\_columns.rb file to make sure they are correct. You can drag the relevant folder into the terminal or command window to check the path.
  * Check that your column in the filepathFrom file (ex. 02\_06\_coderEB.opf) is correctly labeled. If the actual column name does not match what you typed into the transfer\_columns section of the script, you will get an error.
* If you are still having issues with the script, let one of the staff members know.

1. Open the consensus.opf file to confirm that there are now two columns: one from each coder.

### Consensus

A consensus meeting is when two coders (usually one coder and one trainee) code the same file and then meet to discuss their differences.

1. Press Command+T (Ctrl+T for PC) or click Spreadsheet --> Temporal Alignment
2. Decide whose column you will use as the default (usually better to do the person who has more cells because it will involve less typing)
3. If you want to add a cell into your decided column, select the cell and the click Command+L or Command+R (Ctrl+L or Ctrl+R for PC) or click Spreadsheet --> New Cell to the left/right; enter the fields again into your new cell.
4. Relisten to any clips to be sure (you may need to add the video again in the data viewer controller window)
5. Once you're done, delete the column you're not using (click Spreadsheet --> Delete Column), and rename the column you're keeping as just 'labeled\_object'
6. Keep the consensus.opf file within the working files directory. There should be 3 .opf files in there now: one for each coder and one that is the consensus.
7. Go to the export step in the [Datavyu Annotation page](https://osf.io/cxwyz/wiki/Video%20Annotation/) and create your basic level csv file!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gitbook.bergelsonlab.com/archive/old-osf-pages/old-general-instructions/video-consensus-process.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
