Creating Codes and Coding
One of the main tasks NVivo is used for is coding. NVivo has a Coding section from the left menu, with a folder called Codes. These codes act like containers to hold all the references to that code.
If you have already decided upon codes ahead of time (following a deductive approach to coding), you can add these codes to NVivo and then start using them. Other times, as mentioned, you will be reading your materials in NVivo and creating codes as you go (an inductive approach to coding). And sometimes you will do a combination of this, where you have a rough idea of some codes you expect to see, but then new codes might emerge for you as your read through the materials. For this example, let’s try this combo method. First, we will create a few codes that we will use to code our materials, and then I will show you how to create codes on the fly as you are reading.
From the left menu, under Coding, select Codes. Then go to the Create menu,and from the Code drop-down menu, select New Code to create a new code.

For the code name call it “Budget”. You can add a description for your codes if you like. You can describe them in more detail and give examples of where it would be applied to understand how to use it in coding. We will just leave it blank for now. Ignore the “Aggregate coding from children” option for now. We will discuss it later. Select Done.

You should now see our new Budget code listed in the Coding folder.

Repeat the last three steps to also create a code called “Maintenance.” If you make a mistake, you can always select a code and hit the Delete key to remove it (be careful with this option if you have started coding!).

You can also edit your codes after creating them. Hold down the Control key and click on a code to bring up the context menu.

If you select Get Info, you can rename it or add a description.

Now that we have a couple codes, let’s use them to do some coding. To open up one of our imported files, from the left menu, go to the Interviews folder under Files and double click on the first interview transcript to open it in NVivo.

Note: NVivo can open a lot of different file types directly in the tool. The files will be open as read-only, meaning you can’t edit them. This is intentional to prevent error. However, if you happen to notice an error you want to correct, you can select the Edit checkbox at the top of the file. Then you will be able to make changes to the file. Remove the checkmark by clicking on it, to finish editing.
With the file open, you can then read through it and code. Highlight some text you want to code, and then hold down the Control key and click on the highlighted text to bring up the context menu.

Select Code Selection, and then To Existing Codes or Cases…

Next, put a checkmark next to the Code you want to use to code this text, such as Budget. Then click on Select. Now it is coded.

Note: Generally, you want the text to match the code, but for now, don’t worry if the text doesn’t match, this is just to quickly show you how it works.
Let’s look at an alternative quick way to code. This time before you code, click on the Codes folder. This should open up the Codes list next to your transcript.

Highlight some text you want to code, and then drag the highlighted text over to the Code you want to code it. Let’s drag some text over to the Maintenance code. This is a fast and visual way to code. This is a good approach, as you can see the full list of codes while you are coding.

So far we have been coding using our pre-made codes. However, sometimes, something unexpected might come up that you want to create a new code to code it. Highlight some text, and then hold down the Control key and click on it to bring up the context menu.

Now, select Code Selection and then select To New Code….

Here you can give it a name, for example, “Teamwork” and select Done to create a new code on the fly.

So far we have been coding Word documents, but let’s look at the PDFs we imported as well. First close the current interview transcript you have been working with. There are a few ways you can do this. These techniques can be used any time you would like to close a window.
Option 1: From the Toolbar at the top of your screen, go to the View menu, and select Close “[file name]”. Alternatively, you can close all items from this menu as well.
![In the view drop-down menu, Close "[File name]" is selected.](/nvivo-14-15-mac-intro/assets/images/NVivo15_Mac_intro_035.png)
Option 2: Hover over the the tab for your item within the program, and select the X to close it.

Option 3: On the right-hand side of the screen, select the icon with three lines. From there it will give you an option to Close All. Please note this option will only let you close all items that are open.

Go to the Focus Groups folder and open up “NYC Data Center FG1 Questionnaire 7” (you might have to resize the window and/or column to read the full names of the files).

This PDF file has been OCR’ed, meaning you can select text and code it as we have done before. Try selecting some text.

Now open up “NYC Data Center FG1 Questionnaire 14.”

This PDF file has not been OCR’ed, meaning you can’t select the text and code it as we have done before. Instead NVivo treats this more like an image. You can draw a box around a section of text that you would like to code to select it, and then code as normal. Generally, though, it is better to make sure that any PDFs you import into NVivo are OCR’ed for ease of coding. This will also be important when running queries, which we will look at later. For now, close these two PDFs.

Note: If OCR’ing PDFs is new to you, this guide might help.
From the left menu, under Coding, select Codes, and then double click on a Code that has some references (meaning it has been used to code some text).

Here you will see all the snippets of text that were coded to this Code.

If you later realize that you mistakenly coded something you didn’t mean to code, you can uncode it. Highlight one of the references listed. Hold down the Control key and click, select Uncode Selection, and then select From This Code.

Technique: Qualitative Data Analysis | Tools: NVivo