Before you begin, make sure you have NVivo 14 or 15 installed. If you don’t, follow these instructions to request a free license key and install the software.
You’ll also need to download some datasets that we’ve provided for this tutorial. Create a new folder on your computer to store the tutorial files. Download this zip file containing all the datasets you will need for the tutorial to that new folder. Finally, extract the files into that new folder.
Table of Contents
Creating a New Project
Explore the Interface
Import Data
Creating Codes and Coding
Working with Codes
Creating Notes
Case Classification and Cases
Word Frequency and Text Queries
Coding Queries
Matrix Coding and Crosstab Queries
Export Data
Resources to Learn More
Test your Understanding Answers
Part 1 – The Basics
Creating a New Project
1. First start up NVivo 14 or 15.
2. From the main screen, you will see that there are sample projects you can explore to get a feel for NVivo. We will look at one of these later. There are also several links to training and tutorials to learn more. But for us, let’s click on Create new project to get started.
3. You must give your project and project file a name, so let’s call them both “NVivo Workshop”. You can add a description if you want.
4. Then select where you want to save the project file. Use the drop-down arrow to browse folders. Let’s save it where we have put all our other workshop files.
5. Finally select Create to create your new project.
Explore the Interface
1. Let’s briefly look around before we get started. First off, the left side menu helps you navigate the various items of your project, such as your files, your codes, notes, queries, etc. We will talk about these sections as we use the tool.
2. If you want to save your project manually (which you should do periodically), or create or open a new project, you can use the File menu from the menu bar at the top of the screen.
3. If you select NVivo from the menu bar, and then Licensing, you will see an option to Replace License, where you can update your license key, when you receive a new one.
Import Data
Next, let’s import some data so we can start using the tool. We will be using transcripts from interviews and focus groups run for a US data center study. As mentioned before, NVivo helps you get organized, so before we import in some data, let’s create some folders to organize our data.
1. From the left menu, under Data, hold down the Control key and click on Files and select New Folder... from the context menu. Let’s call it “Interviews” and click on Done.
2. Create one more folder called “Focus Groups”.
3. Next, go to the Import menu from within the program and select Files.
Note: If you do not have Files selected in the Data tab on the left, all options under Import will be greyed out.
4. Here you can see some various types of files that NVivo can import. To start, let’s import in our interview transcripts. Make sure that the Interviews folder is selected on the left. Go the Import menu, and from the Files drop-down menu, select Documents...
5. Browse to the folder called “DCEE Focus Groups and Interviews,” which has all the study files we will look at today.
6. Highlight only the files starting with “Data Center Interview” in the title in our folder by selecting the first one, holding down the Shift key, and then selecting the last one. You should have 7 files highlighted. Then select Import. This may take a moment to complete.
7. Let’s do something similar to import in the focus group information. Select the Focus Groups folder on the left. Then go to the Import menu, and from the Files drop-down menu, select Documents...
8. You should still be in the same folder as last time. This time highlight the files starting with “NYC” in the title. You should have 8 files and a mix of PDFs and Word Documents. Then select Import to import those focus groups files into the Focus Groups folder.
9. These files are now all copied into your project file. You can see from the Import menu that there are many different file types that can be imported. For example, you can connect to reference managers to pull in your data (found under the bibliography tab), or from the Files option, you can import in audio files, images, or videos. We won’t be covering them all in this tutorial, but be sure to explore your options later.
Note: Files, Classifications, Bibliography, and Notes all have drop down menus with additional import types.
Note: If you’re interested in learning more about importing other common data sources into NVivo, check out our tutorial on importing webpages as PDFs and survey data!
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.
1. 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.
2. 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.
3. You should now see our new Budget code listed in the Coding folder.
4. 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!).
5. 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.
6. If you select Get Info, you can rename it or add a description.
7. 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.
8. 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.
9. Select Code Selection, and then To Existing Codes or Cases…
10. 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.
11. 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.
12. 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.
13. 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.
14. Now, select Code Selection and then select To New Code….
15. Here you can give it a name, for example, “Teamwork” and select Done to create a new code on the fly.
16. 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.
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.
17. 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).
18. This PDF file has been OCR’ed, meaning you can select text and code it as we have done before. Try selecting some text.
19. Now open up “NYC Data Center FG1 Questionnaire 14.”
20. 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.
21. 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).
22. Here you will see all the snippets of text that were coded to this Code.
23. 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.
Working with Codes
1. Before we work some more with Codes, create two more codes called “Energy Efficiency” and “Water Consumption”.
2. Next, code at least 5 small text fragments to each new code.
3. You can see now there are useful counts associated with our codes to see how many files have content that has been coded in that code, and how many text snippets or references have been coded into that code.
4. You will notice that all of our codes are top-level or parent codes, meaning we haven’t established a hierarchy, none of our codes are nested under other codes. NVivo can help you organize your codes in a hierarchical structure. You are often, in the end, trying to create a hierarchical codes list to group common codes together into broader categories and themes to help make sense of your coding. Create a new code and call it Sustainability.
5. You could use this code to group some of your existing codes. Drag Energy Efficiency and Water Consumption onto the Sustainability code (First click on a code to highlight, wait a moment, then drag it on).
6. Now you can see that they are grouped beneath. Codes grouped beneath another code are called Child Codes.
7. You can use Sustainability as its own broader code now in coding, or just keep it as a heading in the hierarchy. If you double click on Sustainability, you should see an empty window pop up as there are no references coded to that Code right now.
8. Hold down the Control key and click on Sustainability and select Get Info.
9. Click the box next to Aggregate coding from children. Then click OK.
10. Now you will see all the references to it, plus its children codes, show up in the window that should be still open. You will need to decide how to want to handle your code hierarchies in terms of this aggregation for your own projects. In some cases, this is very useful, but it may affect queries where references are double counted for the parent and the child. We will talk more about queries later in the tutorial.
11. In the window with all the Sustainability references, highlight all the text. A quick way to do this is to click anywhere in that window and press the Command key and A on your keyboard at the same time to select all.
12. Then go to the View menu from the top menu bar, and select Coding Context, and then select Broad.
13. You will see that the references have changed. There is grey text that isn’t coded, but comes directly before or after the coded text to give you more context for what you have coded. This is useful when examining small snippets of coded text. You can apply this Broad context (or explore the other options in the menu) any time you are presented with a list of references.
Please note that under the Home tab within the program, there is the option to select 'broad' under Spread Coding. This is not the same function. While selecting broad under Coding Context will display the context of your code, selecting broad under Spread Coding will instead add the surrounding context to your original code.
14. Close the window for now by clicking on Close "Sustainability" in the View drop-down menu.
15. Another way to get a better idea of how your files are coded is to use coding stripes and highlighting. First, go to your interviews folder. You can see how many codes have been applied to the content and how many references in the document have been coded.
16. Double click on an interview that has some coded references.
17. At the top of the selected file tab, from the Coding Stripes drop-down menu, select All. Then go back into the Coding Stripes drop-down menu again and select Automatic Colors.
18. As you scroll through the document, you should see coloured stripes along the right to tell you what parts of the document have been coded and how. Note that you can customize the colours if you'd like by holding down the Control key and clicking on each code, and then picking your colour of choice in the Color section. After you've set up all your colours, click anywhere on the text of the interview, select the Coding Stripes drop-down menu, and select Item Colors instead of leaving Automatic Colors selected.
19. At the top of the selected file tab, from the Highlight drop-down menu, select Coding for All Codes or Cases.
20. You will see the coded text in yellow highlighting throughout the document.
Note: Both Highlight and Coding Stripes can also be found in the View menu in the top menu bar.
Creating Notes
1. Let’s move on to another use of NVivo. You can create different types of notes to capture your thoughts on some text in a file, a file itself, or the project as a whole. For example, if you want to make a note about something that has come up in the text, you would use annotations. Open up one of the interview files (if you don’t have one open already), highlight some text, hold down the Control key and click on it, and select New Annotation.
2. A small pop up window will appear, where you can add your note. Type out a small note, such as “This is important!” When you’re done typing your note, just click on the document again. You will see that annotations are highlighted in blue. You can always hover over the blue highlighted text to see the pop-up window with the note again. Close the file by hovering over the file tab and selecting X.
3. Let’s say instead that you want to make a note about this whole interview file that you had open. Go to the Interviews folder and hold down the Control key and click on an interview file. Select Memo Link and then Link to New Memo...
4. Give your memo a name, such as “Interview Memo” and click on Done.
5. You will be given a blank page where you can write a detailed memo about that file. Perhaps, for example, this interview was held in poor conditions, such as a noisy coffee shop, that might have influenced what was talked about. You could note that here.
6. Once you close the window, the memo is saved and linked to this file. You should see a small icon next to the interview in the list.
7. To view the memo link, hold down the Control key and click on the file again, select Memo Link and then Open Linked Memo.
8. To see annotations you have created all in one place, from the left menu, under Notes, click on Annotations.
9. To see the memo links, under Notes, click on Memos.
10. Finally, you can also create a note that applies to the entire project, for example, maybe some ideas you have about how the research is going or new themes that are emerging. With the memos folder highlighted, go to the Create menu, and select Memo.
11. Give it a name, such as “Project Memo” and click on Done.
12. Type some notes, such as “The project needs to be reviewed” and then close it to save it. You can always double click on it from the list of memos to re-open it.
Case Classification and Cases
If you have demographics or other important attributes that you want to incorporate into your study, case classifications and cases can help. For example, if you were analyzing interview transcripts, you might want to create a case classification called “Interviewees” with attributes such as their name, age, education, job title, etc. Once your case classification is in place that defines what characteristics you want to capture for your interviewees, you could then create one case for each interviewee with those attributes filled in. So for example, if you interviewed someone named Geeta, you would create a case called Geeta (or some ID number if needed for confidentiality) with information about Geeta. You would then use that Geeta case to code all the files/content that are associated with Geeta (where the Case acts like a Code). Later you can then run queries that incorporate that information to answer questions such as, do executives talk more about sustainability? We will talk about how to run queries later in the tutorial.
You can manually create case classifications and cases, but often times, it is easier and more common to upload a spreadsheet with all the information for the cases. Let’s try that now.
1. For our project, we have a file called Interviewees.csv. Open it up and take a look. It lists our interviewees and their attributes. Attributes in NVivo work best when they are categorical variables. NVivo would call this a classification sheet. Now close it and go back to NVivo.
2. Go to the Import menu, and from the Classification drop-down menu, select Classification Sheet... (You can also go to the Home menu, and from the Case Classification drop-down menu, select Import Classification Sheet).
3. Browse to the Interviewees.csv file and click on Open.
4. From the Classification Type drop-down menu, make sure it says Case Classification. Next for Create new classification, type in “Interviewees” (to give it that name) and then keep the rest of the defaults (where there should just be a checkmark next to Create new attributes if they do not exist) and click on Next.
5. Our classification sheet’s first column provides the name of each case (i.e., the interviewee’s first name). Keep the defaults here (where there should be a checkmark next to 'Create new cases if they do not exist') and then click on Next.
6. Then click on Import. It should open up the newly created Interviewees case classification sheet and attributes.
7. Click on Classification Sheet at the top of that window to see something that resembles the csv file we imported. Then close it.
8. From the left menu, under Cases, click on Cases to see our newly created cases. These cases can now be used in coding the same way codes are used.
9. We can take advantage of NVivo’s autocoding features to allow us to identify the interviewee’s responses in a file and code them automatically into the appropriate case. From the left menu, under Files, select Interviews. Hold down the Control key and click on the “Data Center Interview Transcript oct3_2014” file and select Autocode, and then select By Speaker…
10. First, make sure that under What would you like to classify your cases as? it has Existing classification > Interviewees selected.
11. Next, our transcripts are formatted in a consistent manner so we can always pick out who is speaking because the text is labeled as “INT:” for the interviewer’s words, and the person’s name in capital letters followed by a colon for the interviewee’s words. We need to tell NVivo who are all the unique speakers in this document. Under "Enter the names of the speakers. These will become your cases.", type in “INT” and hit Enter. Then type in BASEL and hit the TAB key. You should check the preview on the right to confirm that NVivo is picking up each unique speaker by highlighting them in different colours. If it looks correct, click on Autocode. This should code everything that Basel said in the transcript with Basel’s case.
12. From the left menu, under Cases, click on Cases. Then double click on Basel. You should see everything that Basel said in his interview. These words are coded to this case. The BASEL case code is now linked to Basel’s interview responses.
Part 2 - Queries
In this second part of the tutorial we will be looking at queries. One advantage of putting all your documents and coding in one NVivo project, is that you then have the ability to query the information to gain more insights.
Queries work better for larger projects with a lot of coding already completed, so we’re going to work with the sample project that comes with NVivo for this next section.
Word Frequency and Text Queries
1. First, make sure you have saved and closed any previous projects you had open using the File Menu from the menu bar at the top.
2. Then from the File Menu or start screen, select Create Copy of Sample Project to use a ready-made project that comes with NVivo. Data in this sample project are drawn from a two-year research study (2008- 2009) undertaken by researchers from the Duke University Nicholas School of the Environment at the Duke Marine Laboratory in Beaufort, N.C. The study documented community perceptions of development and land-use change on coastal communities in the Down East area of Carteret County, North Carolina, USA.
3. A window will pop-up asking if you want to rename the project and if you want to adjust where it saves. Let’s keep the name, but make sure it is saving with your other workshop files. Then click on Save. If an NVivo Tour window opens up, just close it for now.
4. Next let’s see how queries can help us make sense of this project. Go to the Explore menu to see all the queries available to you.
5. Let’s start with the third option – the Word Frequency query, which helps us to identify frequently occurring terms in content. This is a great query to start with to get a sense of the content or topic of your data, by looking at the most common words used in a particular file or your whole project. Go to the Explore menu and select Word Frequency.
6. First, you’re asked where you want to search. This is a common setting for most queries. The default option is to search everywhere in the project. You could however, select particular files or folders that you want to search by choosing the second or third options. For example, if we only want to search Interviews, and we’ve been very organized and put all of our interview transcripts into a folder called Interviews, we could select the third option, Items in Selected Folders. However, our interview folder has a combination of text, plus audio and video files. If we want to only select the text transcripts, we’d select the second option. Let’s try that. Choose Selected Items for this example.
7. Then expand Files in the folder tree to see our interview folder. Put a checkmark next to the Interviews folder to select everything in that folder to start, but then unselect the two video files and one audio file (that have different icons). So only the text transcripts should be selected for our search. Then click on Select.
8. Now we can make adjustments to the settings of our word frequency query. Next to Finding matches, there are some useful settings. If you select the second option, include stemmed words, it can group a word with all its different word endings together, so they don’t take up distinct spots in our top words list. For example, “run,” “runs,” and “running” would just be grouped together and then tallied once. Select Include stemmed words for this example.
9. Next, instead of 1000 words, let’s change Display words on the left to 100 most frequent for this example. Minimum word length can remain at 3 characters.
10. When all the settings are in place, click on Run Query on the top right.
11. Now we should see the results of our query. You should see a list of the top most common words in our interview transcripts, sorted with most common at the top. It tells you how many times the word (or group of similar words in our case) occurred and the last column shows you what words were grouped together.
12. Just to note, word frequency lists normally ignore stop words, which are really common words that wouldn’t be useful to analysis. For English, that would be words like “a,” “the,” “and,” etc. When you’re looking at this list of results, if you see a word that doesn’t really have much meaning in this context, such as “things,” you could add it to the stop words list and re-run the query so it’ll ignore it. Let’s try an example. Hold down the Control key and click on “things” and select Add to Stop Words List.
13. Then click on Run Query to re-run the query. You should see that “things” is now missing from the list.
14. To see the Stop Words list, and even reset it, you have to go to the File menu from the menu bar at the top, and select Project Properties.
15. Here in the General tab, you can select the Text Content Language. The default is English (US), but you can see other options. This doesn’t affect the interface, but is important for certain queries, such as word frequency queries and affects the stop words list. For example, you could have an English interface for NVivo, but be analyzing interview transcripts that are in French, by selecting French here. Click on the Stop Words… button to see the list of stop words in use and select Restore Defaults to reset the list to the default, if you wish. Let’s just click cancel twice for now and go back to the results of our query.
16. You can also export these results into a spreadsheet by holding down the Control key and clicking on the table and selecting Export.
17. Browse to the workshop folder, give the file a name or keep the default, change the File Format to Tab Separated Value (to make it a spreadsheet) and click on Save.
18. If we go back to the query results window, just above the table, you will see two tabs: Summary and Word Cloud. We are in the Summary tab. Click on Word Cloud. This shows the more frequent words, where the larger the word is, the more frequently it occurs, which is a common way to display this type of result. (Might take a few seconds to load). Note that currently there is a bug in the newer versions of NVivo, so you are unable to change the colours, but normally you can click on a Gallery button to select different themes to customize your word cloud.
19. You can also hold down the Control key and click on the word cloud, and then select Export to export it as an image or PDF to use later in a report.
20. Once you’re done looking at the results of a query, close the tab. We will cover saving queries later in the tutorial.
21. Next, let’s look at the Text Search query, which can be used to see where particular terms occur in the content. Go to the Explore menu and select Text Search.
22. You can use it to find a word or phrase. You can search for phrases by putting them in quotation marks. Let’s try typing “family” in the search box and choose Include stemmed words, so that it will also search for “families” similar to what we did in the Word Frequency query.
23. Next, we would select where it should search. As before the default is all the documents in the project. Let’s keep the default this time and just run the query. Select Run Query at the top.
24. You will be presented with a list of project files that contain that reference. You can double click on a file to see the references. Try that with the item called “Susan,” which you can see has 6 references.
25. This opens up Susan’s interview transcript. You can use this to help find references that you might want to code.
26. Go to the View drop-down menu, and click on Close "Susan" to go back to the query results, or hover over the Susan tab and click on the X .
27. Above the results you will see the Reference tab. You can click on the Reference tab to see all of the references together in one page.
28. Click on the final tab, Word Tree, which shows you what words often come before and after the term or phrase you searched for. This is useful to understand how that word or phrase is being used.
29. You can click on family to toggle between “family” and “families.”
30. We can save the results of this query, by clicking on Save Results… at the top right.
31. You will notice at the top of the pop-up window you will see that this is not just going to save the results, but also create a new code, and code the results based on that code, with the code called what we name the query results. This code only lives in the Query Results folder, but you can copy it and add it to your codes list if you want to use it for more coding. Generally, this will save all the search results in the Explore section from the left menu, in the Query Results folder, although we can always create folders and organize our query results further if we wanted. Also note that these results are just a snapshot and don’t dynamically change if the project items change. Let’s save our results. Call it “Family” and click on Save Results.
32. Close all windows open. From the left menu, under Queries, go to the Query Results folder. You will see the Family query results saved, and you can double click on it to view the results again. Unfortunately, the Word Tree won’t be saved here.
Test Your Understanding 1
Using the Query menu run a Word Frequency query for the project to find the top 50 words, including stemmed words. Only search News Articles. What was the most common word?
Next run a Text query for the project to find the phrase “climate change” in all project items. How many project items were in the results?
Click here for the answers.
Coding Queries
1. Okay, now let’s move on. Close any query results tabs that you have open.
2. The next few queries I am going to show you are better to use when you have done some coding, as they can help you gain insight from all your work coding your content. For example, you could use these to find potential connections between codes, or connections between a code and a certain demographic.
3. Let’s start with Coding queries. You can use these to find all content coded at selected codes, a combination of codes, or a combination of codes and attributes. So for example, let’s say you want to see if there is content coded as both “Memorable quotes” and “Real estate development,” and you only want to see references that are from residents of Marshallberg – you can do this with a Coding query. Go to the Explore menu, and from the Query drop-down menu, select Coding.
4. We can keep the defaults for now, which only finds references that are coded with all the codes listed. So, we just need to click on the arrow next to no selected codes to select the two codes we want: “Memorable quotes” and “Real estate development.” Put checkmarks next to both of these codes, and then click on Select.
5. Then click on Run Query to see the results.
6. You are shown all the results, but you can also click on the Summary tab just above the results to see how many results you got. We can see there are a few results in interviews and survey responses.
7. But we can narrow this down further, to just quotes from residents of Marshallberg. To do that, we can click on the plus sign at the top right to add another parameter to our search.
8. For this new row, we use the drop-down menu to select Any case where.
9. Next click on the arrow next to no selected attribute.
10. Then expand Person, select Township, and click Select Attribute.
11. From the far blank right drop-down, select “Marshallberg.” So the query says “All” at the top left, meaning all of these conditions must be true. Then one line says that the content must be coded with both of the codes, Memorable quotes and Real estate development, and then the other line says AND the person who said this must be from Marshallberg.
12. Click on Run Query again. This time you can see we get just one large memorable quote on real estate from Mary and James, who are from Marshallberg. (Click on the Reference tab to read it.)
13. We might not want to save the results, but we might want to save this query to re-run again in the future as we continue to code. To do that, click on Save Criteria… at the top right.
14. Give it the name “Marshallberg Quotes on Real Estate” and click on Save Criteria. Then close the query results tab using the View menu.
15. This query is now saved in the Query Criteria section on the left, under Queries. You can double click on it at any time to re-open the settings for the query, where you can then re-run it.
Test Your Understanding 2
Run a Coding query for the project to find interview content only coded as “Infrastructure,” “Policy, management,” OR “Real estate development” where the interviewees are from Harkers Island. How many references did you find?
(Hint: You will have to change an option to say Any instead of All to satisfy the “or” condition, different than in the demonstration.)
Click here for the answers.
Matrix Coding and Crosstab Queries
1. Next up are Matrix Coding queries. These allow you to see coding intersections between two lists of items. For example, let’s say you want to see which interviewees by cases had the most positive and negative attitudes based on coding - you can do this with a Matrix Coding query. Go to the Explore menu and select Matrix Coding.
2. This query is formed using drag and drop. First, using the left menu, under Cases, go to Cases, and then People, and then expand Interview Participants.
3. Highlight all of the interviewees by clicking on the first one, holding down the Shift key, and then clicking on the last one. Then drag and drop them on the left side of the matrix query under Rows.
4. Then, using the left menu, under Coding, click on Codes, and then go to Attitude and expand it.
5. Highlight all the attitude child codes (similar to the cases) and then drag and drop them on the right side of the matrix query under Columns.
6. Click on Run Query to see the results. You will see a grid or matrix with the number of references where those codes and cases intersect.
7. To see the results more clearly and point out interesting patterns, go to the View menu from the top menu bar. From there, select Coding Matrix and then select Blue-White Shading.
8. We can see that the darker the colour, the more two items intersect. In this case, we can see for example that Barbara had strong positive and negative references, Thomas’s interview was more negative than positive, and William’s was only positive.
9. Once you have finished examining the results, close the query results tab using the View menu and selecting Close "Unsaved Query" or hovering over the tab and selecting the X.
10. Let’s move on to the last query we will look at, Crosstab queries. Crosstab queries are similar to Matrix Coding queries, but you can expand out all the categories for an attribute along the columns automatically. For example, you could determine which codes came up most by Township of respondent. Go to the Explore menu, and from the Queries drop-down menu, select Crosstab...
11. This query is partially formed using drag and drop. First, using the left menu, under Coding, go to Codes. Highlight all the top-level codes (make sure none of the Code categories are expanded) and then drag and drop them under Codes on the Crosstab query tab.
12. The default option for the Crosstab is codes against attributes. Under Classification, select Person from the drop-down menu.
13. Under Attributes, select Township from the drop-down menu. This Crosstab query will create a matrix where the codes are along the rows, and for the columns, it will take all the values of one attribute (in this case, Township) and use those for the column headers. Then it will tally where they intersect.
14. Click on Run Query at the top to see the results (might have to scroll up to the top of that window to see the button). You will see a matrix with the number of references where those codes and attributes intersect.
15. To see the results more clearly and point out interesting patterns, click on the Results tab above where you specified the parameters of the query. Under Heatmap, select the top left option going from green to white.
16. We can now see that the darker the green, the more two items intersect in our grid now.
17. In this Results tab, at the top, you’ll see a section called Show Results As. You can change the selection, to alter what numbers are displayed in the grid. In this case, try selecting Coding Presence. Often times you might not have a big enough data set to gain meaning from the numerical values for coding references, for example, but you can at least see where there is an intersection at all or not. For example, we see that the codes of “Attitude” and “Sense of Community” aren’t connected to any of the townships. Normally people don’t report these numbers, but use them to gain insight into their project.
18. You’ll see that NVivo also offers Coding Comparison Queries, which are used when working on a team to see how much agreement there is between team members on coding. I encourage you to play around with this query and all of the other queries we’ve already discussed on your own time to learn more.
Test Your Understanding 3
Run a Matrix Coding query on social media content only, where the columns are the attitude child codes (positive, negative, etc.) and the rows are the remaining top-level codes (Balance, Economy, etc). What two codes have the most negative references?
Next run a Crosstab query, where the rows are the top-level codes (Balance, Economy, etc) and the Person attribute is Education Level. What code was coded the most by coding references for people whose highest level of education completed is undergraduate college?
Click here for the answers.
Export Data
1. You can export your codes as a list or its references. To export your full list of codes, go to the Share menu, and from the Export drop-down menu, select Export Codebook...
2.You can keep the defaults to include all codes and click on Select. This will save your all of your codes in a document that includes a description, the number of files coded with that code, and the number of references.
3. Browse to where your workshop files are, name your file or keep the default, decide if you want it as a document or spreadsheet format, and then click on OK.
4. You can also export all the references for a particular set of codes. To do this, first select your subset of codes. For example, select Balance and Community Change (hold down the Command key to select more than one item).
5. Then go to the Share menu, and from the Export drop-down menu, select Export Items...
6. It will ask you where to save the files, so browse to where your workshop files are. It will create a document for each code that contains a list of each reference, similar to what you would see if you double clicked on the code. Open up all the files you have exported to see their contents, if they don’t open automatically.
And that's it!
Resources to Learn More
Visit our Getting Started page for more information, resources, tutorials, and workshops!
Test your Understanding Answers
- The most common word is variations of the word oyster. It appears through the news articles 26 times. [Note: if you forget to only select the News Articles folder items, you would get "beach" with 332 times.]
- A Text query for the project to find the phrase “climate change” in all project items has 5 project items. [Note: if you exclude the quotation marks from your search it will show 23 items. The quotations are necessary in order to ensure the program is searching for "climate change" and not "climate" OR "change".]
- Back to the next section.
Test Your Understanding 2:
- There are 15 references total. Robert’s interview has 6, Susan’s has 4, and Thomas’ has 5.
- Back to the next section.
Test Your Understanding 3:
- The Natural Environment code has the most negative references with 33.
- The codes coded the most by coding references for people whose highest level of education completed is undergraduate college is Real Estate Development, with 51 references.
- Back to the next section.