Micropeplinae fossil register
Reproduction package for version 2026-11-06, revision 2

Extract this ZIP into a fresh folder and run:

    python3 rebuild.py

Requires Python 3.9 or newer and its standard library. No internet access
or installed packages are needed. The program verifies the two input files
against manifest.json, rebuilds the register, checks its SHA-256 against
the published release, and writes a new file ending in -rebuilt.csv.
The original published CSV is not an input.

FILES

sead-input.json
  Frozen projection of the fields used from the 633 source occurrence
  records for this release, with the original GBIF and SEAD identifiers.
  The export preserves the values returned by the GBIF occurrence API in
  these fields. Unused API fields are omitted.

editorial.json
  The 53 curated literature rows, without the fields recalculated from
  SEAD. The crosswalk names the literature record ID and representative
  GBIF key for each of the 14 matches, with a note on the basis of the
  match. The file also fixes the published order of the 272 index rows
  and records the editorial site-context age labels used in those rows.
  It also carries the three supplementary Sweet Track occurrence records.
  The default age label is "Specimen age not indexed".

manifest.json
  Exact API parameters, offsets, input checksums, release counts and the
  SHA-256 of the published CSV.

rebuild.py
  Deterministic rebuild and verification using only the files above.

SOURCE AND SCOPE

Buckland P (2026). Palaeoentomological data in SEAD – The Strategic
Environmental Archaeology Database. SEAD. Occurrence dataset.
https://doi.org/10.15468/uagqtx
Accessed via GBIF on 2026-11-06. Source licence CC BY 4.0.
https://creativecommons.org/licenses/by/4.0/

The equivalent verified GBIF API query is:
https://api.gbif.org/v1/occurrence/search?datasetKey=f3e6a7ab-4c07-47e1-9267-4cbee0badcb0&taxonKey=4442340&basisOfRecord=FOSSIL_SPECIMEN&occurrenceStatus=PRESENT&limit=300

Read offsets 0, 300 and 600 for this release. When querying the live API
later, follow endOfRecords for current pagination. The project checked
that the equivalent query on 2026-11-06 returned the same 633 complete
GBIF record objects as the archived selection. The query is live and its
results can change. Use the frozen input to reproduce this release.

RECONSTRUCTION RULES

1. Group occurrences by the exact GBIF species, locality and country
   fields. Missing species values become "Micropeplus sp." Raw locality
   and country values remain distinct in the grouping. Display locality
   joins nonempty locality and country values with a comma and a space.
2. Sort each group numerically by GBIF occurrence key. The lowest key
   is the representative. Use its coordinates, occurrence remarks and
   bibliography for the index row. Split the representative's
   associatedReferences on " | ", trim the entries and omit blanks.
   The first remaining reference is the source title. Coordinates
   are approximate locality positions. The paired ID columns list
   every member in this same numeric order.
3. Use the crosswalk to assign 14 groups to literature rows. These rows
   keep the literature's identification, age, coordinates and notes.
   SEAD contributes the complete group membership and the representative's
   site bibliography. A match can be at site level and does not establish
   that every member belongs to the same sample. For example, the
   genus-only Jamestown group is linked to the tentative literature
   identification and does not supply the register's coordinates.
4. Add the three Sweet Track (Drove Site) records to the literature row
   fossil-sweet-track-drove-1. The individual GBIF keys are 6288626484,
   6288639418 and 6288712703. These SEAD data are labelled HUMAN_OBSERVATION
   by GBIF and fall outside the query above. Girling's report establishes
   the fossil context. Use the lowest key as the representative.
5. Emit the 53 literature rows in their curated order and the 272
   remaining SEAD groups in the stored index order. The 286 SEAD groups
   account for all 633 source records exactly once. The CSV is UTF-8,
   comma-delimited, with CRLF line endings and minimal CSV quoting.

SEAD data alone reconstruct the 286 groups and their member identifiers.
The published literature rows and editorial decisions require the
separate input supplied here. The package reproduces those decisions;
it does not independently establish their scientific correctness.
