Foundations

How do I prepare a dataset without losing what makes it useful

Prepare a separate, documented version and test whether it can still answer the intended question. Preserve the links, sequence and field meanings that question needs; remove or restrict sensitive details with the responsible owner. A cleaner file is useful only if the evidence still supports the task.

Write down the question before changing the records

Start with one intended use, such as helping a support assistant identify what a customer has already tried. That task needs the problem, attempted actions, their order and the observed results. A monthly count of ticket categories needs much less detail. Decide which question you are preparing for before choosing what to delete.

Keep the source under its authorized owner and work on a separate copy within the agreed retention rules. Ask the person who understands the work to identify the necessary context, and the person responsible for the records to identify sharing limits. An export button establishes neither those limits nor permission to license the contents.

For each selected case, write an acceptance question and the evidence needed to answer it. For the support example: “By hour 4, which troubleshooting step had failed?” The prepared files must let an authorized reader answer without opening the source system or guessing from a final status.

Make the files readable without silently changing their meaning

Parsing means turning a file into records and fields a tool can read. Before cleaning everything, open a few extracted records beside the source. Check multiline messages, accented text, attachment references and identifiers with leading zeros. If an extraction loses the last paragraph of every reply, a perfectly consistent table can still be wrong.

Define each field in a short data dictionary: its meaning, type, unit and allowed missing values. Keep “not recorded,” “removed for this release” and a measured zero distinct. Document time zones before combining events from different systems; retain the source values in the controlled preparation record when converting them.

W3C’s Data on the Web Best Practices recommends documenting structure, known quality issues and dataset versions. Use those principles for a private delivery too; following them does not require publishing your records on the Web.

Sources: Data on the Web Best Practices

Clean by record identity, not by how similar the text looks

Choose what one record represents: a ticket, a message within it, an attachment or a revision. A repeated export of the same message may be a duplicate; a later message with the same error text may be a new event. Compare the source identifier, parent case, timestamp and version before removing it. Record the rule and the removed record count.

Assign stable replacement IDs consistently across the prepared files so messages still point to the correct case. Do not replace each occurrence of a company name with a different token. If a reverse lookup is needed for authorized preparation checks, keep it separately with restricted access rather than putting it in the delivery.

Keep corrections and failed attempts when the task depends on them. Preserve available earlier versions instead of overwriting them with the latest answer. When history is unavailable, describe the result as a current snapshot; do not reconstruct earlier events from memory.

Worked example: a tidy ticket can hide the failed workaround

This entire example is fictional. Case C-017 concerns a reporting tool whose export times out. The IDs and elapsed hours below are illustrative labels, not a vendor’s schema. The preparation task is to preserve troubleshooting evidence while excluding customer contact details and private report contents.

Source eventEvidence it carriesPreparation decision
Hour 0: message M-01Customer reports “export timed out” on version 2.0.Keep case ID C-017, message ID, author role, error text and version; remove contact signature.
Hour 4: message M-02Customer again reports “export timed out,” this time after trying a smaller date range.Keep it as a separate event and retain the attempted workaround and failure.
Hour 28: message M-03Engineer supplies patch 2.1 and asks for another export.Keep the response and version link; do not label the problem solved yet.
Hour 52: message M-04Customer confirms that the export completed after patch 2.1.Keep the confirmation as the recorded result; longer-term reliability is unknown.

Test the answer before and after preparation

In that fictional case, removing M-02 as repetitive would erase evidence that the smaller date range failed. Keeping only the current “closed” ticket row would erase both the attempted fix and its result. Replacing names while preserving C-017 across all four messages keeps the sequence usable for this task.

Have an authorized reader answer the acceptance question from the source, then from the prepared version. Both should establish that the smaller date range had already failed by hour 4, citing M-02. If using this as an AI evaluation, provide only the records through hour 4; keep the patch and confirmation separate for later review. Otherwise the assistant could answer using information the support worker did not yet have.

Also test what cannot be concluded. M-03 records a proposed fix, not success. M-04 records one successful export, not proof of permanent resolution or that the patch alone caused it. These limits belong with the case even if the source system calls it closed.

Apply the same check to varied cases, including unresolved work, missing attachments and unusually long replies. Count messages and usable cases separately. Four messages in C-017 are one case, not four examples of resolved problems. Choose the review sample to expose likely failure modes; no fixed sample size proves the whole collection is correct.

If necessary detail cannot be shared, change the release or the task

A replacement ID preserves a link; it does not establish that a case is anonymous. Unusual error text, dates or report contents may still reveal a customer. NIST’s government guidance recommends assessing release risks and choosing a sharing model, and warns that tools which merely mask personal information may be insufficient. This is technical guidance, not legal clearance for a commercial dataset.

Review the prepared material in the intended recipient’s setting. If exact calendar dates are unnecessary, relative elapsed times might preserve the troubleshooting sequence; they would not preserve seasonality for a demand-forecasting task. If a private attachment is essential to the answer and cannot be shared, mark the case incomplete for that task. Do not silently replace it with invented content.

Where removing necessary detail defeats the use, the owner may need to consider restricted review, a narrower task or no release. Record that decision before preparing a buyer sample. Successful preparation demonstrates usability for a stated question; a prospective recipient must still confirm its requirements and interest, and the owner must resolve permission to transfer the material.

Sources: De-Identifying Government Datasets: Techniques and Governance

Use this release check with the owner and preparer

Use the table as a working decision aid. Set task-specific tolerances before scaling up, and record the actual results and unresolved exceptions. A failed check may require repairing the extraction, excluding an affected case with an explanation, or narrowing the claimed use.

CheckEvidence to recordWho acts on a failure
Readable recordsCompare source and extracted text, dates and files; record truncation and unreadable-item counts.Preparer repairs parsing or labels the missing content.
Working relationshipsCheck every delivered child ID has its intended parent and required version/file links; count broken links.Preparer repairs verified mappings; owner decides whether incomplete cases remain useful.
Defensible cleaningReconcile starting records, duplicate removals, other exclusions and final records; retain the removal rules.Preparer investigates unexplained losses or repeated events removed as duplicates.
Preserved meaningCheck units, missing-value codes, status definitions and time conversions against the dictionary.Work expert resolves ambiguity; unknowns stay explicit.
Preserved taskRepeat the acceptance questions on source and prepared cases; record changed, unsupported or unanswerable answers.Work expert changes the transformation or narrows the intended task.
Reviewed disclosureCheck remaining text, attachments and linkage risks for the intended recipient and use.Responsible owner resolves restrictions before disclosure.

Deliver the version, its limits and a way to trace changes

Keep a preparation log linking the source version, transformation steps and responsible people to the resulting release. W3C’s PROV framework describes these relationships as provenance. You can start with a clear log rather than adopting a new software system; the log supports traceability, not proof of lawful ownership.

Package the approved files with a manifest naming the release version, files and checksums; a checksum helps identify exact bytes. Include the data dictionary, selection rules, test results, an exclusion summary with counts and reasons, intended uses, and an owner-approved transformation summary containing only the non-sensitive information the recipient needs to interpret the release. Keep the detailed internal preparation log with its authorized custodian. Do not include excluded source content, sensitive source references or reverse-ID mappings in the recipient’s package; keep them with their authorized custodian.

A fictional coverage note might say: “12 support cases checked: seven passed the troubleshooting test, three lack message-to-ticket links, and two contain unreadable replies. Only the seven passing cases are in release R-01.” These are example counts, not buyer requirements. Report your actual coverage and do not describe the selected cases as representative of all support work without evidence.

Begin with one permitted case and ask its work expert to complete the before-and-after answer check. Once that succeeds, broaden the sample, record failure rates and agree which version the owner can release. Use the related privacy, quality and provenance guides below when a finding needs deeper investigation.

Sources: PROV-Overview: An Overview of the PROV Family of Documents

Sources and scope

Source checks support the statements identified below. Product access, contractual rights and suitability for a particular buyer still need to be confirmed for your situation.

  1. Data on the Web Best Practices ↗W3C · Checked · Source dated Jan 31, 2017

    Recommendations to document structure, known quality issues and dataset versions.

    Location: Best Practices 3, 6, 7 and 8: structural metadata, data quality, version indicator and version history

    Web-publication recommendations used here as documentation principles; not a certification or an instruction to publish private data.

  2. De-Identifying Government Datasets: Techniques and Governance ↗NIST · Checked · Source dated Sep 14, 2023

    Evaluate release risks, choose a sharing model, and do not assume masking tools are sufficient de-identification.

    Location: Abstract, paragraphs beginning “Before using de-identification” and “People who perform de-identification”

    US government technical guidance; no commercial legal clearance, assessed collection or guarantee of anonymity.

  3. PROV-Overview: An Overview of the PROV Family of Documents ↗W3C · Checked · Source dated Apr 30, 2013

    Provenance describes entities, activities and people involved in producing data; the framework supports versioning and derivation.

    Location: Abstract; section 1 Introduction, recommendations 1, 6 and 8

    Non-normative overview of a provenance framework; does not verify source ownership or permission.