Coding

From Displayr
Jump to: navigation, search

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:

  1. Highlight your Text variable in the Data Sets section in the bottom left.
  2. Select Insert > New Text Analysis > New Code Frame > Each response can be classified under one code.

The coding window will look like this:

InitialSingleResponseCodeWindow.PNG

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:

  1. Look at the list of responses and decide if you need to add a new category.
  2. If you need to add a new category to the list, right-click on the right of the window and select Add Code.
  3. Enter the name for your new code and click OK.
  4. In the list of responses, hold CTRL and click any responses that belong in the new category.
  5. 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.

FinalSingleResponseCodeWindow.PNG

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:

  1. Highlight your Text variable in the Data Sets section in the bottom left.
  2. Select Insert > New Text Analysis > New Code Frame > Each response can be classified under multiple codes.

The coding window will look like this:

InitialMultipleResponseCodeWindow.PNG

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:

  1. Look at the list of responses and decide if you need to add a new category.
  2. If you need to add a new category to the list, right-click on the right of the window and select Add Code.
  3. Enter the name for your new code and click OK.
  4. In the list of responses, hold CTRL and click any responses that belong in the new category.
  5. On the right, hold CTRL and click the names of one or more categories that the responses belong to.
  6. 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:

  1. Locate your coded variable set under the Data Sets section in the bottom right.
  2. 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.

ShowResponses.PNG

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:

  1. Click into the Show responses from and select the code where your response is currently assigned.
  2. Select the text response from the list in the bottom left.
  3. 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.CodePlus.PNG
  • Remove the response from the current code (effectively making it UNCODED).CodeX.PNG
  • Move the response out of the current code and into one or more other codes. CodeArrow.PNG

To modify a code:

  1. Click into the Show responses from and select the code where your response is currently assigned.
  2. Select the text response from the list in the bottom left.
  3. If moving the response or adding it to additional codes, select the names of those codes on the right.
  4. Click the appropriate button from those above.

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:

  1. 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').
  2. Writing a computer code.

See also