Cross-domain links: registered offices → municipalities, counties → NUTS3, MPs → constituencies - #10
Merged
Merged
Conversation
Bridge the previously-disjoint entity domains with re-runnable ETL that
pulls the join keys from live sources (no hand-authored CSVs):
- Legal entity -> administrative unit: resolve the registered office via
JAR Buveine (ja_kodas -> aob_kodas) joined to AR Pastatas (aob_kodas ->
savivaldybe.sav_kodas + pasto_kodas) on aob_kodas, keeping the latest
office; model it as the SEMIC chain org:hasRegisteredSite -> org:Site ->
org:siteAddress -> locn:Address, with locn:adminUnit -> admin-units/{sav}/
#this and locn:postCode. New Buveine/Pastatas fetches + institution-scoped
join in legal-entities/Makefile; org:Site/locn:Address SHACL shapes;
:OrganizationsHere inverse view.
- County -> NUTS3: reconcile.py emits skos:exactMatch ->
data.europa.eu/nuts/code/LT0xx from Wikidata P605 (counties only;
municipalities are LAU and inherit via county).
- MP -> electoral constituency: parse the 71 single-member apygardos from
the members feed (isrinkimo_budas) into a new constituencies/{nr}/
container (ltlod:ElectoralDistrict); persons.rq links the seat tenure via
ltlod:electoralDistrict. An apygarda is not an admin unit. New container
doc, SHACL shape, :MembersElectedHere view.
Docs (URI-SCHEME, ONTOLOGY-NOTES, README) updated and three backlog items
resolved; two cross-domain example queries added.
Pipeline code only -- committed datasets/current/ snapshots are not
regenerated here; run `make -C etl BASE=https://linkeddata.lt/` to materialize.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Connects the three previously-disjoint entity islands (admin units, legal entities, Seimas) with deterministic, re-runnable ETL that pulls the join keys from live open-data sources — no hand-authored CSVs. Closes three items from the
ONTOLOGY-NOTESbacklog (registered office → municipality, NUTS/LAU exactMatch, Seimas constituency).Legal entity → administrative unit (registered office)
JuridinisAsmuocarries no usable address, so the office resolves JARBuveine(ja_kodas → aob_kodas) ⋈ ARPastatas(aob_kodas → savivaldybe.sav_kodas+pasto_kodas) onaob_kodas, keeping the latest office. Modelled as the SEMIC chainorg:hasRegisteredSite → org:Site → org:siteAddress → locn:Address, withlocn:adminUnit → admin-units/{sav}/#this(committed primary) andlocn:postCode. Postcode is an attribute, not a join key — the exactaob_kodas → sav_kodasbeats the not-guaranteed-1:1 postcode→municipality. Adds Buveine/Pastatas fetches + institution-scopedawknarrowing,org:Site/locn:AddressSHACL shapes, and the:OrganizationsHereinverse view.County → NUTS3
reconcile.pyemitsskos:exactMatch → data.europa.eu/nuts/code/LT0xxfrom Wikidata P605 — a couple of extra columns in the existing WDQS enrichment (10 counties; municipalities are LAU, no P605, and inherit NUTS3 via their county).MP → electoral constituency (apygarda)
Parses the 71 single-member districts from the members feed (
isrinkimo_budas) into a newconstituencies/{nr}/container (ltlod:ElectoralDistrict); the single-member seat tenure links vialtlod:electoralDistrict. An apygarda is not an administrative unit — own container, nodct:isPartOfintoadmin-units/. Party-list ("Pagal sąrašą") seats have none. New container doc, SHACL shape,:MembersElectedHereview.Verification
Pastatasfallback degrades cleanly); SHACL conforms; both Makefiles dry-run clean..ttl/.rq/.pysyntax-checked.Not included
Committed
datasets/current/snapshots are not regenerated in this PR — that mixes in heavy nationalBuveine/Pastatasfetches (offices), unrelated Wikidata image drift (NUTS), and nondeterministicarqordering. Materialize the data with:🤖 Generated with Claude Code