Codebook CSV (Comma Delimited)

File Format

The CSV codebook is organized by rows and columns; each row corresponds to an element in the Design Studio specifications file and each column contains details about the element. The CSV format file can be imported directly into a spreadsheet format (e.g., MS Excel). See Codebook Documentation for Codebook build steps.

By default, the codebook will include the attributes of all Data Elements and Automatic Variables. The codebook build options selected will determine what additional information is included. A “Studio Order” number that corresponds to the order of elements in the Design Studio is included in the first column of the CSV codebook file; this number is not included in the RTF Codebook format.

The following information is included for each type of element in separate columns:

Data Elements

  • Studio order
  • Element type
  • Data type (e.g., Numeric, Text)
  • Variable name
  • Variable label
  • Name of composite variable with which component variable is associated (applicable to date, time, time span, check-all-that-apply, and ranking response types)
  • Item identifier (i.e., question number)
  • Response type
  • Text (i.e., question text)
  • Notes
  • Length
  • Minimum
  • Maximum
  • Value label

Automatic Variables

  • Studio order
  • Element type
  • Data type (e.g., Numeric, Text)
  • Variable name
  • Variable label
  • Expression
  • Notes
  • Length

Information Elements

  • Studio order
  • Element type
  • Item identifier (e.g., Info-1 or custom entered)
  • Text
  • Notes

Section Header Elements

  • Studio order
  • Element type
  • Item identifier (e.g., Sect-1 or custom entered)
  • Text
  • Notes

Skip Elements

  • Studio order
  • Element type
  • Item identifier (e.g., Skip-1 or custom entered)
  • Expression
  • Destination
  • Notes

Edit Elements

  • Studio order
  • Element type
  • Item identifier (e.g., Edit-1 or custom entered)
  • Expression
  • Destination
  • Display message
  • Notes

Value Labels List

The second file created with the CSV Codebook build is a list of labels associated with each value label included in the main codebook. It contains a separate set of rows for each distinct set of response options. The name that is displayed corresponds to the text displayed in the ValueLabels column of the CSV Codebook. If the same set of responses is used multiple times, it will be named based on the first occurrence.

For example, the list of value labels associated with a yes/no type response for the VAR1 label (assuming that Don’t Know and Refuse to Answer are valid responses) might appear as follows in a spreadsheet program following import (any other variables using a yes/no response with Don't Know and Refused allowed would use the same value label name, i.e., VAR1).

Name

Value

Label

VAR1 0 No
VAR1 1 Yes
VAR1 7 Don't Know
VAR1 8 Refused to Answer

If the Codebook build option for “Use SAS Compliant names for value labels” is selected, value labels are made compliant with rules for SAS format names. This changes the naming of formats in the following ways:

  1. If a variable name ends in a number, the last character of the corresponding value label name is changed to a letter. In general, “0” is changed to “A”, “1” to “B”, “2” to “C”, etc. However, if the modified name conflicts with another label, then a different letter is assigned.
  2. If a variable name matches a SAS supplied format name, such as “SSN” or “YYMM”, then the value label is changed to “X” plus the first 7 characters of the variable name. For example, “SSN” would be output as “XSSN” and “YYMM” as “XYYMM”.
  3. If a variable is a text type response, then the value label will start with a “$”. For example, if the variable name is “Other”, then the value label will be “$Other”.