4.0 KiB
Darwin Core Data Package export (v1, admin-only)
Issue: nowcommunity/nowdatabase#1150
This repository includes an admin-only Darwin Core Data Package (DwC-DP) test export for relational locality and occurrence data.
DwC-DP is intentionally published as a separate format from the existing DwC-A exports. The taxon trait-heavy com_species export remains a DwC-A Taxon core with MeasurementOrFact, because those traits are synthesized at taxon level rather than linked to specimen/material source entities.
Access
- Backend route:
GET /occurrence/export/dwc-data-package(Role.Admin only) - Backend route:
GET /occurrence/export/dwc-full-package(Role.Admin only) - The frontend exposes both as export options on the cross-search occurrence table for administrators.
Output
The downloaded ZIP contains:
datapackage.json(Frictionless Data Package descriptor with table schemas and foreign keys)event.csv(DwC-DP Event rows derived fromnow_loc)geological-context.csv(geological context rows referenced fromevent.csv)occurrence.csv(DwC-DP Occurrence rows derived fromnow_ls)event-assertion.csv(locality-level facts formerly expressed as localityMeasurementOrFact)occurrence-assertion.csv(occurrence-level facts formerly expressed as occurrenceMeasurementOrFact)eml.xml(minimal placeholder EML metadata)
Full Darwin Core Convenience Bundle
The full export route downloads one outer ZIP for users who need both occurrence/event data and taxon traits.
The outer ZIP contains:
README.txtdwc-dp/with the DwC-DP event + occurrence package described abovedwc-a-taxa/with the existing DwC-A taxon trait archive:taxon.csvmeasurementorfact.csvmeta.xmleml.xml
The outer ZIP is a NOW convenience bundle, not a single hybrid standard artifact. Each subfolder remains its own internally described export format.
For spreadsheet compatibility, embedded line breaks in exported CSV cell values are normalized to spaces. This keeps each exported record on one physical CSV line.
Join key:
dwc-dp/occurrence.csvusestaxonID = NOW:<species_id>dwc-a-taxa/taxon.csvuses the sametaxonIDdwc-a-taxa/measurementorfact.csvlinks synthesized taxon traits by the sametaxonID
Model
event.csv
One row per now_loc record.
Key mappings:
eventID=NOW:EVENT:<lid>eventType=paleontological localitylocationID=NOW:LOC:<lid>- locality, geography, coordinates, elevation, and remarks map from the corresponding locality fields
geologicalContextID=NOW:GEO:<lid>
geological-context.csv
One row per locality geological context.
Key mappings:
geologicalContextID=NOW:GEO:<lid>- stratigraphic terms map from
chron,lgroup,formation,member, andbed - earliest/latest stage terms map from
bfa_max/bfa_min, using related time-unit display names when available
occurrence.csv
One row per now_ls record.
Key mappings:
occurrenceID=NOW:OCC:<lid>:<species_id>eventID=NOW:EVENT:<lid>taxonID=NOW:<species_id>scientificNamefollows the existing occurrence DwC-A mappingidentificationVerificationStatusmaps fromid_status
Assertion Tables
The assertion tables preserve the non-core facts without overloading one DwC-A measurementorfact.csv across multiple entity types.
event-assertion.csvuseseventIDand contains locality-level facts fromnow_locand related locality lists.occurrence-assertion.csvusesoccurrenceIDand contains occurrence-level facts fromnow_ls.
The original database field name is preserved in verbatimAssertionType.
Relationship To Existing DwC-A Exports
- Keep species traits as DwC-A
Taxon+MeasurementOrFact. - Keep locality and occurrence DwC-A exports available for current test users.
- Prefer this DwC-DP export for relational event/locality/geology/occurrence data because it avoids the DwC-A one-core star-schema limitation.