wikidata_position_history 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '08b127d4fefeb6c622042af063ab7574afb3b54f0c1c6dc3cb5329304b6b7c84'
|
|
4
|
+
data.tar.gz: 72f0be64974066b3b8988f23ac5dde2e5897b8aaa611ff379997053f890b3011
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c914cfaa9abc6412f04e0482b91facf33d52db8f4b49adea721bbdb5cb7dcd31c9e404f87bd58a09e7843ee8d985f2c2cd30f89953fdeffb54dc3b2749e11e85
|
|
7
|
+
data.tar.gz: 131ef009d921f4fa974411295f913b8b9df0800f326caf9125e7524d60e627e29e3bf8f7d7303e1a4b258dca4a679568ea3f17944795bd4d68e408c4f8c023c0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
# [2.1.0] 2020-09-16
|
|
4
|
+
|
|
5
|
+
* When displaying a list of members for a constituency, also include
|
|
6
|
+
a 'parliamentary group' (P4100) column, and if there's a
|
|
7
|
+
'parliamentary term' (P2937) qualifier, use it for the ordinal.
|
|
8
|
+
|
|
3
9
|
# [2.0.0] 2020-09-16
|
|
4
10
|
|
|
5
11
|
## Interface change
|
|
@@ -32,7 +32,7 @@ module WikidataPositionHistory
|
|
|
32
32
|
<<~SPARQL
|
|
33
33
|
# constituency-mandates
|
|
34
34
|
|
|
35
|
-
SELECT DISTINCT ?ordinal ?item ?start_date ?start_precision ?end_date ?end_precision ?prev ?next ?
|
|
35
|
+
SELECT DISTINCT ?ordinal ?item ?start_date ?start_precision ?end_date ?end_precision ?party ?prev ?next ?term
|
|
36
36
|
WHERE {
|
|
37
37
|
?item wdt:P31 wd:Q5 ; p:P39 ?posn .
|
|
38
38
|
?posn pq:P768 wd:%s .
|
|
@@ -40,10 +40,13 @@ module WikidataPositionHistory
|
|
|
40
40
|
|
|
41
41
|
OPTIONAL { ?posn pqv:P580 [ wikibase:timeValue ?start_date; wikibase:timePrecision ?start_precision ] }
|
|
42
42
|
OPTIONAL { ?posn pqv:P582 [ wikibase:timeValue ?end_date; wikibase:timePrecision ?end_precision ] }
|
|
43
|
-
OPTIONAL { ?posn pq:P1365
|
|
44
|
-
OPTIONAL { ?posn pq:P1366
|
|
45
|
-
OPTIONAL { ?posn pq:
|
|
46
|
-
OPTIONAL {
|
|
43
|
+
OPTIONAL { ?posn pq:P1365 ?prev }
|
|
44
|
+
OPTIONAL { ?posn pq:P1366 ?next }
|
|
45
|
+
OPTIONAL { ?posn pq:P4100 ?party }
|
|
46
|
+
OPTIONAL {
|
|
47
|
+
?posn pq:P2937 ?term .
|
|
48
|
+
OPTIONAL { ?term p:P31/pq:P1545 ?ordinal }
|
|
49
|
+
}
|
|
47
50
|
}
|
|
48
51
|
ORDER BY DESC(?start_date) ?item
|
|
49
52
|
SPARQL
|
|
@@ -61,6 +64,10 @@ module WikidataPositionHistory
|
|
|
61
64
|
item_from(:item)
|
|
62
65
|
end
|
|
63
66
|
|
|
67
|
+
def party
|
|
68
|
+
item_from(:party)
|
|
69
|
+
end
|
|
70
|
+
|
|
64
71
|
# TODO: switch to item_from
|
|
65
72
|
def prev
|
|
66
73
|
QueryService::WikidataItem.new(row.dig(:prev, :value)).qlink
|
|
@@ -50,6 +50,9 @@ module WikidataPositionHistory
|
|
|
50
50
|
| style="padding:0.5em 2em" | <%= mandate.ordinal_string %>
|
|
51
51
|
| style="padding:0.5em 2em" | <%= bio.map(&:image_link).first %>
|
|
52
52
|
| style="padding:0.5em 2em" | <span style="font-size: <%= mandate.acting? ? '1.25em; font-style: italic;' : '1.5em' %>; display: block;"><%= mandate.officeholder.qlink %></span> <%= mandate.dates %>
|
|
53
|
+
<% if metadata.constituency? -%>
|
|
54
|
+
| style="padding:0.5em 1em" | <% if mandate.party %><%= mandate.party.qlink %><% end %>
|
|
55
|
+
<% end -%>
|
|
53
56
|
| style="padding:0.5em 2em 0.5em 1em; border: none; background: #fff; text-align: left;" | \
|
|
54
57
|
<% mandate.warnings.each do |warning| -%>
|
|
55
58
|
<span style="display: block">[[File:Pictogram voting comment.svg|15px|link=]] <span style="color: #d33; font-weight: bold; vertical-align: middle;"><%= warning.headline %></span> <ref><%= warning.explanation %></ref></span>\
|