diff --git a/app/root.ttl b/app/root.ttl index d0ef615..cdc8aed 100644 --- a/app/root.ttl +++ b/app/root.ttl @@ -15,14 +15,16 @@ rdf:_4 <#counties-map-block> ; rdf:_5 <#chart-factions-intro> ; rdf:_6 <#chart-factions-block> ; - rdf:_7 <#parties-intro> ; - rdf:_8 <#parties-block> ; - rdf:_9 <#table-chairs-intro> ; - rdf:_10 <#table-chairs-block> ; - rdf:_11 <#sittings-intro> ; - rdf:_12 <#sittings-block> ; - rdf:_13 <#browse-intro> ; - rdf:_14 <#select-children> . + rdf:_7 <#timeline-parties-intro> ; + rdf:_8 <#timeline-parties-block> ; + rdf:_9 <#parties-intro> ; + rdf:_10 <#parties-block> ; + rdf:_11 <#table-chairs-intro> ; + rdf:_12 <#table-chairs-block> ; + rdf:_13 <#sittings-intro> ; + rdf:_14 <#sittings-block> ; + rdf:_15 <#browse-intro> ; + rdf:_16 <#select-children> . # rdf:_1 — mission intro (title/description already render above) @@ -134,7 +136,69 @@ WHERE GROUP BY ?faction ORDER BY DESC(?members)""" . -# rdf:_7 / rdf:_8 — parties that nominated Seimas members (clickable list) +# rdf:_7 / rdf:_8 — which parties sat in which Seimas: a Timeline row per party, a bar +# per term in which it got at least 5 members elected (persons x parties x terms) + +<#timeline-parties-intro> a ldh:XHTML ; + rdf:value """
+

Partijos Seime nuo 1990 m.

+

Kurios partijos ir sąrašai turėjo bent penkis Seimo narius kiekvienoje kadencijoje — ir kiek. Matyti, kurios partijos išlieka dešimtmečius, o kurios iškyla vieneriems rinkimams ir dingsta.

+
"""^^rdf:XMLLiteral . + +<#timeline-parties-block> a ldh:Object ; + rdf:value <#timeline-parties> . + +# Google Timeline columns: row label, bar label, start, end — hence one category and +# three series variables, in this order. +<#timeline-parties> a ldh:ResultSetChart ; + dct:title "Partijos Seime"@lt, "Parties in the Seimas"@en ; + spin:query <#timeline-parties-query> ; + ldh:chartType ac:Timeline ; + ldh:categoryVarName "party" ; + ldh:seriesVarName "seats", "start", "end" . + +<#timeline-parties-query> a sp:Select ; + dct:title "Partijų Seimo nariai pagal kadenciją"@lt, "Party members of the Seimas per term"@en ; + sp:text """PREFIX epvoc: +PREFIX org: +PREFIX skos: +PREFIX time: +PREFIX xsd: +PREFIX ltlod: + +# Members counted per (nominating party, term) over the Seimas seat memberships, which +# carry both ltlod:nominatedBy and the term. The ongoing term has no time:hasEnd, so its +# bar ends today; every row needs both dates, typed xsd:date, for the Timeline columns. +SELECT ?party ?seats ?start ?end +WHERE +{ + { + SELECT ?nominator ?term (COUNT(DISTINCT ?person) AS ?members) + WHERE + { + GRAPH ?personGraph + { + ?membership ltlod:nominatedBy ?nominator ; + epvoc:memberDuringParliamentaryTerm ?term ; + org:member ?person . + } + } + GROUP BY ?nominator ?term + HAVING (COUNT(DISTINCT ?person) >= 5) + } + GRAPH ?partyGraph { ?nominator skos:prefLabel ?party } + GRAPH ?termGraph + { + ?term time:hasTime ?interval . + ?interval time:hasBeginning/time:inXSDDate ?start . + OPTIONAL { ?interval time:hasEnd/time:inXSDDate ?termEnd } + } + BIND(COALESCE(?termEnd, STRDT(SUBSTR(STR(NOW()), 1, 10), xsd:date)) AS ?end) + BIND(CONCAT(STR(?members), " nar.") AS ?seats) +} +ORDER BY ?start ?party""" . + +# rdf:_9 / rdf:_10 — parties that nominated Seimas members (clickable list) <#parties-intro> a ldh:XHTML ; rdf:value """
@@ -168,7 +232,7 @@ WHERE } ORDER BY ?label""" . -# rdf:_9 / rdf:_10 — committee chairs (single entity type: the chair persons) +# rdf:_11 / rdf:_12 — committee chairs (single entity type: the chair persons) <#table-chairs-intro> a ldh:XHTML ; rdf:value """
@@ -214,7 +278,7 @@ WHERE } ORDER BY ?person""" . -# rdf:_11 / rdf:_12 — plenary sittings of the ongoing session (the one without an +# rdf:_13 / rdf:_14 — plenary sittings of the ongoing session (the one without an # end date), latest first; each links on to its protocol and stenogram <#sittings-intro> a ldh:XHTML ; @@ -255,7 +319,7 @@ WHERE } ORDER BY DESC(?date) DESC(?sitting)""" . -# rdf:_13 — browse prompt, then rdf:_14 — the container listing (LAST) +# rdf:_15 — browse prompt, then rdf:_16 — the container listing (LAST) <#browse-intro> a ldh:XHTML ; rdf:value """