Skip to content

Seimas members of all terms since 1990 - #32

Open
namedgraph wants to merge 3 commits into
masterfrom
feat/seimas-all-terms
Open

namedgraph wants to merge 3 commits into
masterfrom
feat/seimas-all-terms

Conversation

@namedgraph

Copy link
Copy Markdown
Member

Problem

The LDH assistant reported that every current MP had served exactly one term. That came from our data, not the query. p2b.ad_seimo_nariai returns only the current term unless kadencijos_id is passed, so each person had a single #tenure-10. In reality 87 of the 148 current MPs sat in earlier terms.

Change

Members are now fetched per term with fetch-xml-each.sh over the term ids, the same way sessions are fetched.

  • persons: 831 people who have held a seat since 1990, with about 21k memberships. Each seat gets its own #tenure-{term}-{yyyymmdd}; the start date separates a member who left and returned within a term, which happened in term 2. Each tenure carries its own ltlod:nominatedBy. The person-level ltlod:nominatedBy lists every party that ever nominated them. The mapping is restructured into independent UNION branches, because a single join would multiply term rows × positions × groups.
  • nariai.xsl:
    • Contacts and the biography link come from the current term only, since older rows carry stale lrs.lt e-mails.
    • The district is parsed here. The older terms' Nr. 100 pseudo-district ("Vyriausioji rinkimų komisija" / "Daugiamandatėje") is treated as a list seat.
    • One duplicated position with two end dates (term 3) is deduped to the later end.
    • Hyphens and dashes fold into the slug separator. This merges the existing tevynes-sajunga-–-… duplicate party.
  • constituencies: term-scoped constituencies/{term}-{nr}/ (771). District numbers are reused for different districts across elections. The generic by-election name "Vienmandatė" yields to the district's real name.
  • parties: one label per slug (66), because the same party is spelled several ways across terms.
  • Example queries and README: the current party now comes from the current tenure instead of ?person ltlod:nominatedBy.
  • Shapes, URI-SCHEME.md, ONTOLOGY-NOTES.md, app/ns.ttl comments, CLAUDE.md verification counts: updated to match.

Verification

  • Every file passes riot and SHACL.
  • Link integrity: 0 dangling links (the only unmatched target is the Seimas organization, which is app/ scaffolding).
  • Term counts per sitting member (140) are identical to the feed's kadencijų_skaičius. Top of the list: Zingeris 9; Butkevičius, Sysas, Ažubalis, Razma 8.
  • Wikidata: 733 of 831 matched, and all 100 previous matches are unchanged.
  • EXAMPLES.md is regenerated.

Notes

  • persons.trig grows from 2.8 MB to 22 MB.
  • URIs change: constituencies/{nr}/ and #tenure-{term} are replaced. Loading is append-only, so redeploying needs a clean reload: make down && rm -rf fuseki/end-user && make up && make load, plus make install for ns.ttl.

🤖 Generated with Claude Code

namedgraph and others added 3 commits October 12, 2026 09:37
LDH now prefixes its overridable top-level params with ldh:, so the
unprefixed override would silently stop applying and the stock query
would again exceed MAX_CONTENT_LENGTH.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The members feed returns only the current term unless kadencijos_id is
given, so every person had a single tenure and term counts were all 1.
Members are now fetched per term (fetch-xml-each.sh over the term ids):
831 persons, one #tenure-{term}-{yyyymmdd} per seat, each with its own
ltlod:nominatedBy; sitting members' term counts match the feed's
kadencijų_skaičius.

- persons.rq: member/position/group rows in independent UNION branches
  (a single join would multiply term rows x positions x groups)
- nariai.xsl: contacts and bio only from the current term (older rows
  carry stale lrs.lt e-mails); district parsed here, with the Nr. 100
  "Vyriausioji rinkimų komisija"/"Daugiamandatėje" pseudo-district
  treated as a list seat; duplicated positions deduped to the latest end;
  hyphens/dashes fold into the slug separator
- constituencies: term-scoped constituencies/{term}-{nr}/, since district
  numbers are reused across elections; term name in the title
- parties: one label per slug (spelling variants across terms)
- example queries take the current party from the current tenure

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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