query-4c5dcefd7d5b54fb9563080084922f64

rq turtle/ttl

2017 report. We should have 650 members elected in this round - every seat was contested, none were delayed, and all returned a member. Wikidata:Request a query#New UK MPsOkay, here's some reports to work through 2017, based on the ones at .All MPs with an "elected in: 2017 general election" qualifier All members with a "term: 57th UK Parliament" qualifierIn both of these, MPs with more than one "elected in" or "term" on the same item will have duplicated lines. The reports also show whether or not core metadata (seat, party, date) is present.. an "elected in: 2017 general election" qualifierwithoutAll MPs in enwiki a "term: 57th UK Parliament" qualifierwithoutAll MPs in enwiki 16:48, 11 June 2017 (UTC)) talk (Andrew GrayOnce we've got 2017 in shape we can start looking at backfilling, but pending working out a way to do this with scripts, it'll take a while... For making sure that all new members have enough data set, I've been using:

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT ?item ?itemLabel ?givenNameLabel ?genderLabel ?partyLabel ?constituencyLabel ?replacesLabel {
 ?item p:P39 ?positionStatement .
 ?positionStatement ps:P39 wd:Q16707842; pq:P2937 wd:Q29974940 .
 MINUS { ?item p:P39 [ ps:P39 wd:Q16707842; pq:P2937 [ ^(wdt:P155+) wd:Q29974940 ] ] . }
 OPTIONAL { ?item wdt:P21 ?gender . }
 OPTIONAL { ?item wdt:P735 ?givenName . }
 OPTIONAL { ?positionStatement pq:P768 ?constituency . }
 OPTIONAL { ?positionStatement pq:P102 ?party . }
 OPTIONAL { ?positionStatement pq:P1365 ?replaces . }
 SERVICE wikibase:label { bd:serviceParam wikibase:language 'en' }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v5("?constituency") v3("?gender") v4("?givenName") v1("?item"):::projected v6("?party") v2("?positionStatement") v7("?replaces") a1((" ")) a2((" ")) c3(["wd:Q16707842"]):::iri c15(["en"]):::literal c5(["wd:Q29974940"]):::iri c13(["bd:serviceParam"]):::iri v1 --"p:P39"--> v2 v2 --"p:statement/P39"--> c3 v2 --"p:qualifier/P2937"--> c5 subgraph minus0["MINUS"] style minus0 stroke-width:6px,fill:pink,stroke:red; a1 --"p:statement/P39"--> c3 c5 --"p:direct/P155"--> a2 a1 --"p:qualifier/P2937"--> a2 v1 --"p:P39"--> a1 end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P21".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P735".-> v4 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:qualifier/P768".-> v5 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:qualifier/P102".-> v6 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:qualifier/P1365".-> v7 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c13 --"wikibase:language"--> c15 end