Skip to content

Systems and records

Dataset transformation reproducibility: a replay test without raw records

By SourceX Editorial · Updated

10 sections

Short answer

Dataset transformation reproducibility means a second party can rerun each logged step on pinned inputs and reach the same values under a rule set in advance. For licensed records, the supplier runs that replay in custody and shares digests, row counts and a mismatch report instead of records. Our replay of The Economist's Big Mac index matched all 26,752 compared cells, yet byte checksums failed on formatting alone.

Record timeline

Dataset transformation

This page covers dataset transformation reproducibility: a replay test without raw records.Illustrative

Key takeaways

  • A transformation is reproducible when a rerun of the logged steps on pinned inputs reaches the same values under a comparison rule fixed before the run.
  • A buyer can verify a replay without seeing records if the custodian shares input digests, operation versions, parameters, row accounting and a mismatch report.
  • Our independent replay of the Big Mac index matched all 26,752 compared cells, while byte checksums differed on 360 of 3,858 lines because of number formatting alone.
  • Without one parameter that lives only in data-generator-v3.R, 307 cells in 52 rows differ; the README names a different script.
  • Input revisions changed all 1,698 shared adjusted rows between the January and July 2026 releases, so each release's input digests must be pinned in the log.

What does dataset transformation reproducibility have to prove?

It has to prove that a second party, rerunning the logged steps on the pinned inputs, lands on the same values under a comparison rule agreed before the run. Loading cleanly, matching a checksum and carrying the intended meaning are three other properties, and a delivery can have any one of them without the rest.

Software engineering sets the strict version. The Reproducible Builds project calls a build reproducible when the same source code, build environment and build instructions let any party recreate bit-for-bit identical copies of the specified artifacts, normally confirmed by comparing cryptographic hashes. Data work rarely meets that bar, because one number can be written to a file in several valid ways. A data log therefore has to state what counts as the same result: identical bytes, identical values at a stated precision, or values within a tolerance.

Licensed business records add a second constraint. The buyer usually may not see the raw source, and often should not. The evidence that settles the question is a log the buyer can read plus a replay the supplier runs in custody: input digests, operation versions and parameters, row counts with drop reasons, and a mismatch report, with no record content crossing the boundary.

How can a buyer check a replay it is not allowed to see?

Split the work: the custodian reruns the log against the source it already holds, and the buyer receives facts about the run that reveal no record. Those facts are enough to expose a wrong input version, a changed parameter, an undocumented step or an output altered after the run.

Five things cross the boundary: the SHA-256 digest of each input as received, the commit or version of each operation, the parameter values (lists, thresholds, date gates, rounding), the rows entering and leaving each step with a reason code for every drop, and a comparison report stating how many cells were compared, how many differed and under which tolerance. Field values stay behind.

One caution keeps the log from leaking. A digest of a whole file or table says nothing useful about its contents, but a plain hash of a single short value, such as a postcode or an account number, can be reversed by hashing every candidate value and looking for a match. Keep digests at file or table level. If per-record lineage keys must travel, derive them with a secret key the custodian holds, so the buyer can join records without being able to recompute them.

The replay log: seven fields that make a step rerunnable

Each step of a delivery gets one log row with seven fields. To test the design against something real, the right-hand column shows what a public repository with a published transformation records for each field; the gaps it reveals are the ones a buyer would meet in a private delivery.

The fields, the failure each one catches and what The Economist's Big Mac index repository provides at commit 0d97104 (July 2026):

The replay log: seven fields that make a step rerunnable
Log fieldRecordsFailure it catchesBig Mac repository at 0d97104
Input pinSHA-256 of each input file and its release labelA replay run against a revised inputInputs are versioned in git, so a commit pins them; no digest is published
Operation versionCommit or file name of the code that ranA different script producing plausible outputThe README names data-generator-v2.R; the July 2026 outputs need data-generator-v3.R
ParametersEvery list, threshold, date gate and rounding rule, by valueA rule change hidden inside codeTwo country lists, two date-gated add-on lists and 5-decimal rounding, in code only
Row accountingRows in, rows out and a reason code for each dropRecords lost or duplicated without noticeNot published; our replay counted 2,516 rows in and 2,056 raw-index rows out
Comparison ruleByte identity, values at a precision, or a toleranceA false failure on formatting, or a false passThe README warns that R and notebook output may differ at the last decimal place
Output digestsDigest of the bytes and of a declared canonical formA file changed after the runFiles are versioned in git; no digest or canonical form is published
Field meaningsA codebook entry for every delivered columnA correct value read with the wrong meaningGDP_bigmac appears in the outputs but not in the codebook

Replaying a published transformation: The Economist's Big Mac index

The replay matched every value. Comparing our independently computed results with the published files cell by cell, all 26,752 compared cells agreed at commit 0d97104: 12,336 in the raw index and 14,416 in the GDP-adjusted index. The January 2026 commit, 669a971, replayed just as cleanly from its own source file, with 11,688 and 13,584 cells and no differences.

The repository makes a fair test because it publishes what a replay needs: a source file (big-mac-source-data-v2.csv), the code (data-generator-v3.R and earlier versions) and the outputs. We did not run that code. We read it, wrote our own implementation of each step and let the published files judge the result.

The step accounting the repository does not publish came out of the replay. Of 2,516 source rows, one (Venezuela, January 2018, with a price and an exchange rate of 0) yields no usable dollar price and 459 belong to countries outside the script's 56-code list, leaving 2,056 raw-index rows. For the adjusted index, 22 rows lack a positive local GDP figure (12 blank, 10 zero), 260 fall outside the regression country rules and 2,234 enter the per-date regressions.

Only 1,802 of those 2,234 regression rows are published. The other 432, for 18 European countries listed individually (Austria, Bulgaria, France, Germany and 14 more), shape every fitted price and never appear in the output. A buyer holding the published adjusted index cannot recompute it, because some of its inputs were never delivered. A log row for that step has to name those inputs by digest even though they do not ship.

Why the checksum disagreed when every value agreed

A checksum compares bytes, and one number can be spelled more than one way. Written in the published column and row order at 15 significant digits, our replayed files produced SHA-256 digests that differed from the published files' digests for both indexes.

Line by line, 64 of 2,056 raw-index lines and 296 of 1,802 adjusted lines differed, and each of those 360 lines held the same values as its published twin. The differences were spellings: a final printed digit (3.02000755001888 published, 3.02000755001887 replayed) or notation (4e+06 published for a local price of 4,000,000). The data.table manual says fwrite matches write.csv formatting to 15 significant figures and writes scientific notation when it is narrower, so neither difference is an error in the published file.

A canonical form removes most of the noise. Rewriting both versions with every number at 10 significant digits and rows sorted by date and country made the raw-index digests identical. The adjusted digests still differed in 7 of 1,802 rows, each holding a value exactly on a rounding tie at the tenth digit, such as 4728.1263795, where the published 15-digit text and our full-precision result fall on opposite sides of the tie. Python's documentation warns that rounding binary floats can surprise for this reason.

Log two separate proofs. A byte digest shows that a file arrived unchanged. A value comparison, with its tolerance written into the log before the run, shows that a replay worked. If a canonical digest is wanted as well, the custodian computes it once from full-precision results, never by re-rounding text that was already rounded.

Five horizontal bars showing the share of compared units that differ in each check of the Big Mac index replay: values 0 of 26,752 cells, byte checksum 360 of 3,858 lines, canonical digest 7 of 1,802 rows, replay without the v3 rule 52 of 1,802 rows, and the next release 1,698 of 1,698 shared rows.
Our replay of The Economist's Big Mac index at commits 669a971 and 0d97104 (2026): measured counts, not illustrative.

Which version made the file? The rule the README never names

The July 2026 files come from data-generator-v3.R, a script the README never mentions. The README tells readers to run data-generator-v2.R and calls the notebook the code behind the index; the notebook was last changed in February 2025 and has no Bulgaria rule. Version 3, added in the July 2026 commit, puts Bulgaria into the regression sample from 2026-07-01. Without that one parameter, our replay differs from the published adjusted index in 307 cells across 52 rows: every adjusted row dated 2026-07-01.

This is the strongest alternative explanation for a clean-looking delivery: the file loads, its checksum matches what was sent, and it was still produced by a different rule than the documentation describes. The codebook shows the same kind of gap in meaning. The full-index file carries a column named GDP_bigmac that the README's codebook never defines, while the codebook defines GDP_dollar, which none of the three output files contains.

A log that records operations by commit and parameters by value catches both problems. It also changes the question a buyer can ask, from a vague one about methodology to a precise one: which commit, which parameter set, which codebook version.

When a faithful replay still disagrees with the last delivery

A replay can be faithful and still disagree with an earlier delivery when the inputs changed. Between the January 2026 and July 2026 commits, 1,080 of the 2,373 source rows present in both files had a GDP figure revised, reaching back to April 2000, and one price changed: the euro-area local price for January 2026 moved from 6.08 to 6 in the update that added Bulgaria to the euro price.

All 1,698 adjusted-index rows present in both releases changed in at least one of their five currency columns, and 1,638 changed against the dollar. Two dollar values near parity changed sign, Indonesia and Pakistan in July 2010, so a currency read as slightly undervalued in the January files reads as slightly overvalued in July. The raw index, which uses no GDP data, changed in only 54 shared rows, all dated 2026-01-01, where the euro-area price moved. The July release also added a July 2025 edition, 71 source rows, that the January release lacked.

None of this is hidden. The README says the GDP-adjusted series is updated whenever the IMF revises its historical GDP figures, and git keeps every earlier input. For a licensed delivery the same discipline means pinning each release's input digests in the log and keeping superseded inputs for as long as the license allows a buyer to ask for a replay of an older release.

Accept, hold or reject: the replay checklist

Run these nine checks in order before accepting a transformed delivery; each names the action when it fails. A delivery that passes all nine is replayable, which is not the same as correct: a faithful replay of a wrong rule reproduces the wrong answer.

At a glance

Accept, hold or reject: the replay checklist

Checklist · 9 items

  1. Inputs: every input carries a digest and a release label, and the custodian confirms the replay used those digests. Missing digest: hold.
  2. Code: every step names its code by commit or version, and that version matches the documentation. Mismatch: hold until the log or the documentation is corrected.
  3. Parameters: every list, threshold, date gate and rounding rule that changes output is written in the log by value. Present only in code: request the values.
  4. Row accounting: at every step, rows in equal rows out plus rows dropped, and each drop has a reason code. Any gap: reject that step.
  5. Comparison rule: byte identity, a stated precision or a tolerance was fixed before the run. Chosen after seeing results: rerun.
  6. Replay report: it states cells compared and cells differing, and every difference is zero or explained individually. Unexplained difference: reject.
  7. Undelivered inputs: inputs a step used but the delivery omits, like the 432 regression rows above, are named by digest. Unnamed: hold.
  8. Field meanings: every delivered column has a codebook entry under the same name. Undefined or renamed column: hold.
  9. Re-deliveries: the log states which inputs changed since the previous release and how many delivered rows moved as a result. Unstated drift: hold.

0 of 9 ticked. Tick each item as you go.

Putting the replay log into a SourceX data request

Name the replay log and its report as the acceptance test in the request itself. SourceX sources datasets on request from U.S. businesses rather than holding stock, and the request form collects a buyer's scope, volume, language and format along with timing and licensing needs; stating the intended use and this acceptance test alongside them scopes the log before preparation begins.

On the supplier side, the supplying company signs off on scope and terms, and signs the agreement, before SourceX receives a single record, and each deal's Dataset Deal Confirmation fixes the exact dataset. A log keyed to that confirmed scope gives both parties one reference for what was transformed. SourceX's sample manifest page shows a fictional package summary and field guide for a help desk export; read it as an illustration of field documentation, not as a description of any delivery's log.

The method has limits. A replay proves that the log describes the run; it does not prove that the source was right, that the rule was right or that the meaning was understood. After a clean replay, the next evidence to ask for is a field-level review of the codebook and a sample checked by someone who knows the source system.

Methods note: commits, replay rules and what was not tested

Repository: github.com/TheEconomist/big-mac-data, cloned in full on 2026-10-28. Commits: 0d9710454755a71d7f0c03e662e580b271be456d (July 2026 update, committed 2026-08-04) and 669a971c69ad7c5bec818e2eb3214355f13cd028 (January 2026 update, committed 2026-03-30). Files read with git show and never executed: source-data/big-mac-source-data-v2.csv, output-data/big-mac-raw-index.csv, output-data/big-mac-adjusted-index.csv, output-data/big-mac-full-index.csv (header only), README.md and data-generator-v3.R, whose logic differs from the earlier commit's data-generator-v2.R only by the Bulgaria rule.

Replay rules as the script applies them: missing values are empty fields, #N/A or NA; rows without a local price are dropped (none were); the dollar price is the local price divided by the exchange rate, and a row whose rate is zero or missing gets none; raw-index rows have a dollar price and a code on the 56-code list; each currency column (USD, EUR, GBP, JPY, CNY) divides a row's dollar price by the dollar price of the row whose currency code is that currency, on the same date, and subtracts one, rounded to 5 decimals with Python's round (ties go to the even neighbor of the binary value). Adjusted rows need local GDP above zero and a code on the 49-code regression list, on the 22-code 2021 list from 2021-01-01, or Bulgaria from 2026-07-01. GDP_bigmac is local GDP divided by the ratio of the local price to the U.S. price on that date; the adjusted price is the fitted value of an ordinary least squares regression of dollar price on GDP_bigmac with an intercept, run per date over all regression rows; published adjusted rows also need a code on the 56-code list.

Comparison: rows keyed on date and country code; currency columns compared as exact 5-decimal strings; dollar price, GDP_bigmac and adjusted price compared at a relative tolerance of 1e-9. Byte digests are SHA-256 of the committed files and of our output written at 15 significant digits, whole numbers without a decimal point; the canonical form writes every number at 10 significant digits with rows sorted by date and country code. Drift compares the two commits on rows present in both: a source field changed when the parsed numbers differ at all, and an index row changed when any of its five currency columns differs as a 5-decimal string. Dates are observation dates as written, with no time zone.

Not tested: the full-index values, the Excel outputs, the R code or notebook as executed, and the upstream prices, exchange rates and IMF figures. The replay and drift scripts read only data files and are kept with this draft for independent recount.

Frequently asked questions

Is a matching checksum enough to accept a transformed dataset?

No. A checksum proves the bytes you received are the bytes that were sent, not that the transformation was applied as documented or that columns mean what the codebook says. In our Big Mac replay the checksums failed even though every value matched, which shows the opposite risk as well.

Can a buyer verify a transformation without access to the raw records?

Yes, if the supplier reruns the log in custody and shares input digests, operation versions, parameters, row counts with drop reasons and a mismatch report. None of those reveal field values. The buyer then checks the delivered file's digest against the logged output digest.

What tolerance should a value-level replay use?

State it before the run and tie it to the precision the data is published at. We compared rounded index columns as exact 5-decimal strings and unrounded columns at a relative tolerance of one in a billion. Choosing a tolerance after seeing the differences turns the test into a negotiation.

Why would rerunning the same code give different results months later?

Because an input changed. Between two 2026 releases of the Big Mac data, GDP revisions reached back to April 2000 and moved every shared adjusted-index row. A log that pins input digests per release lets anyone replay the older release from its own inputs.

Should the transformation log include the code itself?

It should reference the exact commit or version and record every parameter by value, so the code can be retrieved and the rules read without running it. Code alone is not enough: in the Big Mac repository the deciding parameter sat in a script the documentation never named.

Sources

  • The Big Mac repository README codebook (which defines GDP_dollar), its instruction to run data-generator-v2.R, its note that R and notebook output may differ at the last decimal place, and its statement that the GDP-adjusted series is updated when the IMF revises historical GDP. Source
  • The data-generator-v3.R rules: the 56-code country list, the 49-code regression list, the 2021 and 2026 add-on lists with their date gates, the per-date regression and 5-decimal rounding. Source
  • The July 2026 update commit (2026-08-04) adds data-generator-v3.R and rewrites the source and output files, including GDP figures back to 2000. Source
  • The source file at the July 2026 commit: 2,516 rows, including Venezuela for January 2018 with a local price and exchange rate of 0. Source
  • The notebook the README calls the code behind the index contains no Bulgaria rule and was last changed in the January 2025 update. Source
  • Differences between the January 2026 and July 2026 commits in the source and output files, analyzed row by row in this article. Source
  • data.table's fwrite formats numbers to 15 significant figures, matching write.csv, and writes scientific notation when it is narrower. Source
  • Python's round() rounds to the closest multiple with ties to the even choice, and rounding floats can surprise because most decimal fractions are not exactly representable. Source
  • The Reproducible Builds definition: the same source, build environment and instructions let any party recreate bit-by-bit identical artifacts, usually verified with cryptographic hashes. Source

Tell us what data you need

Share scope, volume, format, timing and licensing needs. Datasets are sourced on request.

See if your company qualifies