Chapter 7 Data Dictionaries and Codebooks

A data dictionary is part of the analytical evidence, not clerical documentation added at the end. This chapter shows how dataset-level and variable-level metadata establish meaning, expose uncertainty, distinguish source from derived variables, and create a shared reference for analysis, review, and handoff.

Learning outcomes

After completing this chapter, you should be able to:

  • explain why a data dictionary is an analytical control rather than clerical paperwork;
  • document dataset-level and variable-level metadata;
  • distinguish source, standardized, and derived variables;
  • document valid values, missingness, units, relationships, and sensitivity; and
  • use a dictionary to detect ambiguity and inconsistency before they affect results.

Key terms

  • Data dictionary: A structured reference that documents the meaning, format, valid values, source, quality, and use of data elements in a dataset.

  • Codebook: A structured description of variables and coded values, often emphasizing how categories or responses are represented. In practice, the terms codebook and data dictionary frequently overlap.

  • Data element: A single defined item of information, usually represented by a field or variable.

  • Allowed value: A value or category that is valid for a data element under its definition and business rules.

  • Missing-value code: A stored value, symbol, or blank that represents unavailable, unknown, inapplicable, suppressed, or otherwise unrecorded information.

  • Derived variable: A variable created from one or more source fields using a documented rule or calculation.

  • Unit of analysis: The entity represented by one observation in an analysis, such as a person, transaction, visit, product, location, or month.

  • Provenance: The documented origin and history of data, including its source, collection context, version, and transformations.