In the social sciences, a codebook is a document that lists the questions asked in a survey alongside the resulting answers and data collected. Codebooks store the research survey data and responses in the form of single variables.
A typical codebook provides a layout of the data in the file alongside the respective definitions of the data codes. The data files provide one line per observation or result, describing how the data were coded, entered and processed. The purpose of documenting survey data in a codebook is to provide a researcher with enough information to decide whether a specific source of data collection is useful for further research.