A codebook is a document in which the names and the values of the variables used in a database are encrypted.
What do you need a codebook for
In science a lot of information is gathered and stored in a database. The information can be stored as text but more often numbers are used. When you are confronted with a great many digits, you might wonder what they mean.
To encrypt the meaning of these numbers a codebook is used. For the database above the next codebook should be postulated:
Tips to make things easy
A first tip is to use clear and short texts for the variables. Instead of using Q1, gender is also suitable. Some providers provide a database with these abstract terms. They are easy to adjust your database. Other providers provide the data with the full text of the question. Also change this to a shorter text of one, two or three words.
Remove all columns or variables that won’t be used in your analysis. Some providers even read the IP-address of the computer/laptop of the respondent, and the place where the respondent answers the questions in the survey. (Don’t ask me why. I think it is against the law and it is harms privacy.) If you are not interested in this information (and why should you) please remove it from the database. The work is more effectively done with a clean database.
Never use the variable names in the report. Always use the daily description. So variable names in your codebook can be very enigmatic as long as you understand what is meant. So a variable name such as T1meanTT is strange to others, but it is clear to you that this is the average of the scores on a topographic test on a pre-test.