Coding
In Displayr, Coding refers to the process of transforming text-based data (like Tweets, open-ended responses to survey questions, blog comments, and more) into quantitative data. Displayr has a coding tool that allows the researcher to read through the text responses and assign each response to one or more categories.
When you begin coding you need to decide whether each of the text responses will be assigned to a single category (single-response coding), or whether each response can be assigned to multiple categories (multiple-response coding). Single-response coding is appropriate if the data is relatively simple and each response really only captures one idea. For example, if you run a survey and ask the respondents to tell you what their favorite restaurant is, then it would be appropriate to use single-response coding. Often, text data is longer and each piece of text represents more than one idea, preference, or opinion. In that case you would use multiple-response coding.
Single-response coding
Single-response coding allows you to categorize each piece of text as one category within a single categorical variable.
To begin coding you should:
- Highlight your Text variable in the Data Sets section in the bottom left.
- Select Insert > New Text Analysis > New Code Frame > Each response can be classified under one code.
The coding window will look like this:
The list of text responses is shown in the bottom left. Above this shows responses in the data are good, aldi, coles, etc.
The right-hand side of the window shows the categories that are being created. Initially this is fairly empty - it just has a category for Missing data (responses to be excluded from the sample), and an empty category called New code. Additionally there is a count of the responses which are still UNCODED.
The process to assign the text responses to categories is to repeat the following:
- Look at the list of responses and decide if you need to add a new category.
- If you need to add a new category to the list, right-click on the right of the window and select Add Code.
- Enter the name for your new code and click OK.
- In the list of responses, hold CTRL and click any responses that belong in the new category.
- On the right, click the name of the new category.
The last action will assign the responses into that category. These responses will disappear from the list, and the number next to your code on the right will increase.
When you have finished coding, click OK in the bottom right.
In this example, at the end of the coding process the window looks like this:
All of the responses have been categorized.
When you are finished coding, a new variable will appear in Data Sets, below the original Text variable.
Multiple-response coding
When you need to code text that expresses more than one idea or opinion, you should use multiple-response coding. The process is slightly different to the one described above for single-response coding.
To begin coding you should:
- Highlight your Text variable in the Data Sets section in the bottom left.
- Select Insert > New Text Analysis > New Code Frame > Each response can be classified under multiple codes.
The coding window will look like this:
The list of text responses is shown in the bottom left. Above this shows responses in the data are Selection not of the best quality - lots of bruised produce..., We buy most of our F&V at markets..., etc.
The right-hand side of the window shows the categories that are being created. Initially this is fairly empty - it just has a category for Missing data (responses to be excluded from the sample), and an empty category called New code. Additionally there is a count of the responses which are still UNCODED.
The process to assign the text responses to categories is to repeat the following:
- Look at the list of responses and decide if you need to add a new category.
- If you need to add a new category to the list, right-click on the right of the window and select Add Code.
- Enter the name for your new code and click OK.
- In the list of responses, hold CTRL and click any responses that belong in the new category.
- On the right, hold CTRL and click the names of one or more categories that the responses belong to.
- Click the tick button to assign those responses to the categories.
The last action will assign the responses into that category. These responses will disappear from the list, and the number next to your code on the right will increase.
When you have finished coding, click OK in the bottom right. A new variable set will appear in Data Sets, below the original Text variable.
Editing a code frame
You can go back and change the coding at any time. To do so:
- Locate your coded variable set under the Data Sets section in the bottom right.
- In the Object Inspector on the right, click Properties > DATA VALUES > Edit Code Frame.
Viewing the text assigned to each code
To see which text responses are currently assigned to a code simply select the desired code from the Show responses from menu in the top left. The text responses in that code will be shown below.
Moving responses between codes
During the course of your coding you may change your mind about which codes a text response should be assigned to. The method to move a response is different between single-response and multiple-response coding.
Single-response
When using single-response coding, you can move a response from one code to another using the following:
- Click into the Show responses from and select the code where your response is currently assigned.
- Select the text response from the list in the bottom left.
- Click the name of the code you want to move this response to in the list of code on the right.
Multiple-response
When using multiple-response coding, the buttons on the left of the window allow you to change where a response has been coded:
- Add the response to a code, keeping it assigned to the current code.
- Remove the response from the current code (effectively making it UNCODED).
- Move the response out of the current code and into one or more other codes.
To modify a code:
- Click into the Show responses from and select the code where your response is currently assigned.
- Select the text response from the list in the bottom left.
- If moving the response or adding it to additional codes, select the names of those codes on the right.
- Click the appropriate button from those above.
Back Coding
- Start coding a text question or variable as usual - often this will be a variable holding text from an "Other/Specify" type question.
- In the coding module, click the button Inputs and Back Coding...
- You'll get two drop-downs, one with the text variable/question, and one where you can select the question to back-code into. In this drop-down, select the appropriate question. Note that you can only select questions that are in the same format as the question type you selected when you began coding (i.e. only single response questions for single response coding, and multiple response questions for multiple response coding). Click OK when done.
- If the question you're back-coding into has an "Other/Specify" option now in the code frame, then right-click this and select Is Other/Specify. This will ensure the counts in this category are reduced when you code the "other" responses into other categories.
- Code the text data as usual.
Exporting and importing a code frame
You can save your code frame as a file that can be imported when you want to re-use the coding for a different document or variable. The code frame stores a set of rules which describe which code each text entry is assigned to. Thus, if you import it when coding a different variable, any text which matches what has already been coded will be automatically assigned. Any new responses can then be assigned into your pre-made set of categories.
In the coding window there are buttons to Import or Export the code frame. Exporting will save a file to your computer which has the extension .QCodes. If you want to use this code frame somewhere else, click the Import button and then select the .QCodes file that you have saved previously.
Other uses
The term coding can mean different things in other contexts, including:
- Assigning values to specific categories of information. There are distinct usages of this meaning of coding in survey analysis:
- Assigning values to specific categories in a questionnaire (e.g., 1 for Male and 2 for Female).
- Transforming categorical variables (e.g., 'dummy coding' and 'effects coding').
- Writing a computer code.