Skip to content

Codebook

Document — instantiates Symbolic Convention Governance

Maps the encoded values inside a dataset to their intended meanings and use constraints, and records how retired codes should be read so old records stay interpretable.

A codebook is the authoritative record that binds the encoded values inside data fields to their intended meanings — 1 = Married, -9 = not applicable — for a specific dataset or coding scheme. Its defining move is that it governs a closed, enumerated set of value-to-meaning bindings tied to particular fields, and it keeps retired or redefined codes interpretable, so records collected under an earlier version of the scheme can still be read correctly. That is what separates it from a glossary, which defines free-standing terms in prose: a codebook defines the finite set of values a field is allowed to take and how each one has been read over time.

Example

A national longitudinal health survey (illustrative) runs for twelve annual waves. The field MARSTAT uses codes 1 = Married, 2 = Widowed, 3 = Divorced, 4 = Never married, plus reserved missing-value codes -8 = refused and -9 = not applicable. Between waves 6 and 7 the survey team splits a category: what used to be code 3 (in waves 1–6 it meant "divorced or separated") becomes 3 = Divorced and a new 7 = Separated from wave 7 onward.

An analyst pooling all twelve waves opens the codebook before touching the data. The entry for 3 carries not just its current label but its history — the effective wave of the change and the old meaning — so the analyst knows that a 3 in a 2013 record is not the same fact as a 3 in a 2019 record, and can harmonize deliberately instead of silently averaging two different definitions. Setup to outcome: what would have been an invisible, corrupting mismatch becomes an explicit, documented reconciliation.

How it works

Each entry pairs a field, a value, and a label with its use constraints — valid range, the codes reserved for missingness, and any condition on when the value applies (skip patterns, universe restrictions). Because the set of legal values is finite, the codebook is an enumeration, not a generative rule. The piece that makes it a governance mechanism rather than a static legend is the per-code change log: when a code's meaning shifted, when it was retired, and what it should be read as in older records. That backward-compatibility record is what lets a dataset accumulate history without the history quietly rewriting itself.

Tuning parameters

  • Enumeration granularity — one label per code, or per-code notes on edge cases and universe. Finer entries resolve more ambiguity but bloat the book.
  • Missing-data richness — a single "missing" flag versus distinct codes for refused / not-applicable / not-asked. More codes preserve why a value is absent, at the cost of complexity.
  • Change-history depth — current meanings only, or a full effective-dated log of every redefinition. Depth is what makes old records safe to reuse.
  • Machine-readability — prose PDF versus a structured, parseable format. A structured codebook can drive automated recoding; prose cannot.
  • Scope binding — tied to one dataset, or a shared scheme reused across many. A shared scheme cuts duplication but widens the blast radius of any change.

When it helps, and when it misleads

Its strength is institutional memory: because retired codes carry their old meanings, analysts can compare data across years without guessing, and a dataset stays trustworthy long after the people who built it have gone. A codebook authored to a standard such as the Data Documentation Initiative can even be read by tooling, so the recode is mechanical rather than manual.[n1]

Its failure mode is the codebook–data gap: the document and the data drift apart. Codes appear in the data that were never entered in the book; or the book is updated while old extracts keep the old encoding; or — the classic misuse — the codebook is treated as write-once, so when a code is redefined the previous meaning is simply overwritten and every historical record silently inherits the new definition. The discipline that guards against this is to version the codebook alongside each data release and to require that any code change adds a dated history entry rather than editing the old one in place.

How it implements the components

  • symbolic_convention — the code-to-meaning bindings for each field are the governed conventions; the codebook is the definitional artifact that fixes them.
  • usage_rule — each entry's constraints (valid ranges, missing-value codes, when a value applies) state the correct and prohibited uses of that field's values.
  • deprecation_transition — its signature: retired and redefined codes carry effective dates and old-meaning notes so records under a prior scheme stay interpretable.

A codebook does not teach newcomers how to apply the scheme (adoption_path — that is the Onboarding Reference), and it does not watch live data for nonconforming or drifting codes across systems (drift_monitor, consistency_check); that continuous, multi-convention monitoring is the Versioned Convention Registry.

Editorial Notes

Form Classification

Form family: Representation, Specification & Plan

Rationale: The codebook persistently maps fields and legal values to meanings, ranges, missingness codes, and use constraints so encoded data remain interpretable, making its primary form a reference specification.

Nearest alternative: Record, Log & Register — A per-code change log preserves historical shifts, but that ancillary provenance supports the codebook's main current-state function of specifying what values mean and how they may be used.

Review outcome: Adjudicated after independent review; high confidence.

Origin Attribution

Primary origin: Library & Information Science

Origin pattern: Cross-disciplinary synthesis

Present-day reach: Multi-domain

Rationale: Data documentation established codebooks as authoritative field-level value-to-meaning mappings with version and retired-code interpretation.

Related originating lineages:

Review resolution: Both reviewers agree on library_information_science as primary. Reading the mechanism confirms that its defining operation belongs to that lineage; the final record retains data_science, statistics_experimental_design only as materially formative origin and keeps present-day application breadth separate from provenance.

Review outcome: Reconciled after independent review; high confidence.

Notes

The codebook and the Versioned Convention Registry are easily confused because both handle versions and deprecated forms. The line is scope and modality: a codebook is one coding scheme captured in a static document you read beside a dataset; a registry is a live system holding many conventions across an organization, with monitoring hooks the codebook has no way to run.

[n1] The Data Documentation Initiative (DDI) is a real, widely used metadata standard for describing survey and social-science datasets, including machine-readable codebooks. It is a concrete example of a codebook expressed in a structured form that downstream tools can consume — the difference between a legend a human squints at and a scheme a script can recode against.