One of the most helpful features of NVivo is that it allows you to store related content from different project materials together in the same place. This can make it easier to synthesise your data and identify patterns. The process of doing this is called coding, and the related material is stored together in codes.

The codes you create and the coding method you use will vary depending on the purpose of your analysis, your research methodology and/or your personal preference. However, you will generally create codes for particular topics, themes or concepts. Depending on the coding structure you use, you may code the same material to more than one code, which can be very helpful when identifying patterns in your data.

In brief, this page covers the following:

To follow the examples on this page, you can either use the project you created in the Setting up a project page or use the Environmental Change Down East sample project (as detailed in the Sample projects page).

Creating codes and coding material

There are several ways you can create new codes. You may choose to set up your codes before you begin coding, to create new codes as you work through your materials, or to use a combination of both approaches.

Before you begin

To create a code before you begin coding, for example a Development code, follow these steps:

  1. Click Codes in the Navigation View (in the ‘Coding’ group)
  2. Right click in the white space in the List View and select ‘New Code…’
  3. Type in the name of the code (for example Development), and add a Description and Nickname if you wish. You can also choose a colour for the code, for example to keep track of which codes you are still working on and which you have finished writing about.
  4. Click ‘OK’

Alternatively, you can create a code by selecting the ‘Create’ tab on the ribbon at the top of the screen, and then selecting the ‘Code’ option.

While coding

As an example of creating a code while coding, open the Maria and Daniel interview file (in the Interviews sub-folder of Files) and scroll down to the ‘Q.4. Community and environmental change’ heading. Continue scrolling to Elizabeth’s second question (on fisheries) and Daniel’s response. To code this response to a new code, for example a Fishing Industry code, follow these steps:

  1. Highlight the text
  2. Right click and select ‘Code Selection’
  3. Click in the box under ‘Create New:’
  4. A ‘New Code’ button will appear towards the bottom of the dialog box
  5. Enter the name of the new code (for example, Fishing Industry)
  6. Click ‘Code Selection to ‘New Code’’

You can then check that the selected text has been coded to the new code by clicking Codes in the Navigation View (in the ‘Coding’ group) and double clicking the Fishing Industry code.

Existing codes

You can also use the method above to code material to existing codes. Another option is to drag and drop the text onto the required code. For example, you can code text from the Maria and Daniel file to the Development code by following these steps:

  1. Open the file (for example, the Maria and Daniel file)
  2. Highlight the part of the text you wish to code (for example, a section relating to development)
  3. Click Codes in the Navigation View (in the ‘Coding’ group)
  4. Hold down the left mouse button and drag the highlighted text onto the code you wish to code it to (for example, the Development code)

Once you have done this, repeat the process for the Margaret file (also in the Interviews sub-folder of Files).

You can also code material from existing codes, rather than from files, to new or existing codes using the methods described above. This is known as ‘coding on’.

Exploring codes

You can view all the material you have coded to a code by opening the code in the Details View. For example, if you open the Development code, you will see three tabs on the right-hand side:

  • Reference tab: this shows the content that has been coded from each file. This is the default tab.
  • Summary tab: this summarises the files that have been coded to the code.
  • Text tab: this displays the content that has been coded to the code from each text file individually.

If other types of files have also been coded to the code, such as picture files, their content will be displayed in an appropriate tab. For example, content from picture files will be displayed in a Picture tab.

Uncoding material

The easiest way to uncode (remove) material that you have previously coded to a code is to highlight the text you wish to uncode, either in the file or in the code. Then right click and select one of the following options from the dialog box:

  • ‘Uncode…’ to select the code(s) you wish to uncode the material from.
  • ‘Uncode from Recent Codes’ to select the code(s) you wish to uncode the material from using the list of recent codes displayed.
  • ‘Uncode from This Code’ (if you are in the code) to uncode the material from the code you are currently viewing.

Alternatively, if you simply wish to make a change to material that has been coded, such as correcting the spelling, make the change in the original file. The change will then automatically appear in all the codes where the material has been coded.

Coding stripes

Coding stripes are coloured stripes that you can display in the Details View of a file (or a code, if you have coded on). They allow you to see which parts of the material have been coded and which codes they have been coded to. To display coding stripes, for example for the Maria and Daniel file, follow these steps:

  • Open the file (or code) in the Details View and click inside the document
  • Select ‘Coding Stripes’ from the menu immediately above the document
  • Select the type of coding stripes you would like to display, for example ‘Recently Coded’
  • If you have added colours to your codes, you can display these by selecting ‘Item Colors’

For this example, the coding stripes should show which sections of the Maria and Daniel file have been coded to the Development, Fishing Industry and other recently used codes. If you select a particular coding stripe, the material that has been coded to that code will be highlighted in the same colour.

You can also use the ‘Coding Density’ stripe to see how often different parts of the document have been coded. A darker section of the stripe indicates that this part of the document has been coded more often.

Sub-codes and moving codes

If you decide that you want to make changes to your codes, such as moving, merging and/or renaming them, you can do this quite easily. However, if you plan to make a lot of changes, it may be worth saving a copy of your original project first, just in case. The procedures for making these changes are explained in this and the following sections.

To create a sub-code of a parent code, simply right click on the parent code in the List View and select ‘New Code…’. You can also rearrange your existing codes by making one code a sub-code of another. As an example, create a new code called Zoning. To move this code so that it becomes a sub-code of the Development code, follow these steps:

  1. Right click on the code you want to make the sub-code (for example Zoning)
  2. Select ‘Cut’
  3. Right click on the code you want to make the parent code (for example Development)
  4. Select ‘Paste’

The Zoning code then becomes a sub-code of the Development code:

An image of the code structure in the sample project, with the new Zoning code a sub-code of the Development code

Merging codes

You may eventually decide to merge two or more codes that cover similar themes and that you originally created as separate codes.

As an example, create a new code Sustainable Fishing. Then open the Margaret file and code the section of text related to sustainable fishing. This is part of Margaret’s response to Nancy’s third question on the future of the fishing industry, under the ‘Q.2. Connection to Down East natural environment’ heading.

To merge this code with the Fishing Industry code, follow these steps:

  1. Right click on the code you wish to merge (for example, the Sustainable Fishing code)
  2. Select ‘Cut’
  3. Right click on the code you wish to merge it into (for example, the Fishing Industry code)
  4. Select ‘Merge into Selected Code…’
  5. Click ‘OK’

The Sustainable Fishing code will then be merged with the Fishing Industry code. The Fishing Industry code should now have two references coded to it: the original Fishing Industry reference and the Sustainable Fishing reference you just coded.

An image of the codes in the sample project, with the Fishing Industry code containing two references.

Renaming codes

To rename a code, for example the Fishing Industry code to simply Fishing, follow these steps:

  1. Right click on the code you wish to rename (for example, the Fishing Industry code)
  2. Select ‘Code Properties…’
  3. Enter a new name for the code (for example, Fishing)
  4. Click ‘OK’

Alternatively, you can click once on the code to select it, then click it again to make the name editable.