Skip to content

Materialize cross-domain links in committed datasets#15

Merged
namedgraph merged 1 commit into
masterfrom
data/materialize-cross-domain-links
Jul 25, 2026
Merged

Materialize cross-domain links in committed datasets#15
namedgraph merged 1 commit into
masterfrom
data/materialize-cross-domain-links

Conversation

@namedgraph

Copy link
Copy Markdown
Member

Problem

Commit c95f02d ("Add deterministic cross-domain links") added the mapping code for two cross-domain links but shipped pipeline code only — its message notes datasets/current/ snapshots were not regenerated. As a result the committed data lacked the links, and two example queries returned empty result tables:

  • Seimo nariai pagal apygardą (MPs per electoral district) — needs ltlod:electoralDistrict + the constituencies/ container, neither present.
  • Įstaigos pagal savivaldybę (institutions per municipality) — needs the org:hasRegisteredSite → locn:adminUnit chain, not present.

Fix

Regenerated the affected domains from the live sources (make -C etl/seimas all, make -C etl/legal-entities all, BASE=https://linkeddata.lt/) and re-rendered the examples:

File Change
datasets/current/seimas/persons.trig 74 ltlod:electoralDistrict links (71 districts) + minor fresh members-feed data
datasets/current/constituencies/constituencies.trig new — 71 single-member districts (apygardos)
datasets/current/legal-entities/institutions.trig 2,507 registered-office → locn:adminUnit links (6,025 graphs)
etl/queries/EXAMPLES.md the two previously-empty result tables, re-rendered

Validation

  • Both datasets pass riot --validate + SHACL (seimas.ttl, constituencies.ttl, legal-entities.ttl).
  • Verified against the live end-user Fuseki after a clean reload: 71 districts / 74 links, MPs-per-constituency non-empty, 2,507 office links.
  • The large TriG line churn is arq CONSTRUCT output reordering, not semantic change — persons.trig real delta is +78 / −1 quads by sorted N-Quads.

Note: make …/seimas all re-runs reconcile, whose image-liveness check false-negatived 58 live Wikidata portraits (Commons throttled the request burst). owl:sameAs was byte-identical, so alignments.trig was left unchanged and is not part of this PR.

🤖 Generated with Claude Code

Commit c95f02d added the cross-domain mapping code (MP -> electoral
constituency, legal entity -> registered admin unit) but shipped pipeline
code only, without regenerating datasets/current/. The committed snapshots
therefore lacked the links, and the two example queries that rely on them
returned nothing.

Regenerate the affected domains (make -C etl/seimas all, make -C
etl/legal-entities all) so the snapshots include:

- persons.trig: ltlod:electoralDistrict from each single-member seat tenure
  to constituencies/ (74 links across 71 districts); plus fresh members-feed
  data (a membership end date, new tenure records).
- constituencies/constituencies.trig: 71 single-member electoral districts
  (apygardos) parsed from the members feed (new container).
- institutions.trig: the SEMIC registered-office chain org:hasRegisteredSite
  -> org:Site -> org:siteAddress -> locn:Address -> locn:adminUnit into the
  admin-units hierarchy (2507 offices resolved).
- EXAMPLES.md: the previously-empty "Seimo nariai pagal apygardą" and
  "Įstaigos pagal savivaldybę" result tables, re-rendered.

Both datasets validate (riot + SHACL). The large TriG line churn is arq
CONSTRUCT output reordering, not semantic change (persons.trig delta is
+78/-1 quads by sorted N-Quads).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@namedgraph
namedgraph merged commit 04c0f00 into master Jul 25, 2026
4 checks passed
@namedgraph
namedgraph deleted the data/materialize-cross-domain-links branch July 25, 2026 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant