Data tools

Compare two reference datasets

Compare CSV or JSON records using a stable identifier. See which records were added, removed or changed, then download the complete comparison. The files stay in your browser; the result describes file differences, not changes in animal disease.

Updated 601 words · 3 min read

Reference data tool

See what changed between two files

Choose CSV or JSON files, then select the field that identifies each record. Files are read in this browser and are not sent to a server.

CSV or JSON · up to 5 MB

CSV or JSON · up to 5 MB

Up to 10,000 records per file. JSON may be a record array or contain pages, records or items. CSV values remain text. JSON numbers use browser precision; quote high-precision values and large integer identifiers as text. Duplicate or blank identifiers must be resolved first.

Choose two files or try the fictional example.

Start with comparable files

Choose an earlier release and a later release describing the same kind of record. The comparison reads CSV, JSON record arrays and JSON objects containing a pages, records or items array. LivestockDefense reference downloads use a supported format.

The files need not have identical columns, but they need an identifier field in common. A record ID, source ID, PMID or canonical route can be useful when it retains the same meaning across releases. A row number created after sorting is usually unsuitable.

Select the identifier deliberately

The tool suggests a recognizable identifier when one is present. Confirm that it identifies the record level you intend to compare. Event IDs may repeat legitimately in a specimen-level table; in that case, a specimen or result identifier may be the relevant key.

Blank or duplicated identifiers stop comparison. This prevents a repeated row from being silently discarded or counted as an unexplained addition. The duplicate-event guide explains how to distinguish a duplicate from a revision or a linked observation.

Read the four outcomes

An added identifier appears only in the later file. A removed identifier appears only in the earlier file. A changed record retains its identifier but differs in at least one other field. An unchanged record retains the same fields and values under the tool's comparison rules.

Those outcomes concern the files. A removed observation may reflect a duplicate correction or export filter rather than disappearance of disease. An added citation does not establish a new animal-health event. Read the release notes before interpreting a count.

Understand value differences

CSV values remain text. JSON numbers, text, null values, arrays and objects retain their types. The text value “1” and the JSON number 1 are different values. An absent field, an empty string and null are also different.

JSON numbers use the browser's numeric precision. Keep long integer identifiers and values requiring exact decimal precision as quoted text in both files. The tool rejects nonfinite numbers, unsafe integer values and nesting beyond 50 levels rather than silently treating rounded identifiers as the same record.

Object-key order is ignored, while array order is retained. If a field contains a list of links in a different order, it can therefore register as changed. The tool does not infer whether the difference is scientifically important or merely presentational.

Identifiers are compared as text, preserving surrounding whitespace. If a source accidentally adds spaces, inspect and correct the underlying record deliberately rather than relying on an invisible normalization rule.

Work through the example

The fictional example contains three earlier and three later reference records. One identifier is added, one removed, one changed and one retained unchanged. The changed title and version appear as separate field differences within one changed record.

Use the example to check how the results are organized before choosing your files. It contains no real farm observations or surveillance counts. Clearing the tool removes its current file selections and displayed comparison.

Keep the full result with its source releases

The page shows a bounded preview of added and removed identifiers and changed fields. Download the JSON comparison to retain every result. Long values are shortened on screen but preserved in the download.

Keep the original files, their release labels and the comparison together. The release-changelog guide helps turn verified differences into a readable explanation. The data-release reference describes preservation of a specific release.