User:Oravrattas/prompts/Scottish Parliament

From Wikidata
Jump to navigation Jump to search

This prompt compares the Wikidata information on current MSPs, with the data from TheyWorkForYou (Q7783633).


Comparison

MSP gender (SPARQL) gender (CSV) party (SPARQL) party (CSV) area (SPARQL) area (CSV) twitter (SPARQL) twitter (CSV)
--- Beatrice Wishart (Q66825436) Scottish Liberal Democrats (Q3250438) Shetland female beatricewishart
--- Sarah Boyack (Q544089) Scottish Labour Party (Q3179541) Lothian female
Alex Neil (Q1515752) male Scottish National Party (Q10658) Airdrie and Shotts NULLAlexNeilSNP
Alex Rowley (Q16191157) male independent politician (Q327591)Scottish Labour Party (Q3179541) Mid Scotland and Fife Alex_RowleyMSP
Annie Wells (Q24052671) female Scottish Conservatives (Q3243587) Glasgow AnnieWellsMSP
Dean Lockhart (Q24052679) male Scottish Conservatives (Q3243587) Mid Scotland and Fife DeanLockhartMSP
Derek Mackay (Q1200058) male independent politician (Q327591)Scottish National Party (Q10658) Renfrewshire North and West DerekMackaySNP
Jackson Carlaw (Q1231522) male Scottish Conservatives (Q3243587) Eastwood Jackson_CarlawCarlaw4Eastwood
Ken Macintosh (Q1738887) male independent politician (Q327591)Scottish Labour Party (Q3179541) West Scotland KenMacintoshMSP
+++ Kezia Dugdale (Q1740370) Scottish Labour Party (Q3179541) Lothian female kezdugdale
Liam McArthur (Q1691804) male Scottish Liberal Democrats (Q3250438) OrkneyOrkney Islands Liam4Orkney
Murdo Fraser (Q1953630) male Scottish Conservatives (Q3243587) Mid Scotland and Fife murdo_fraser
Nicola Sturgeon (Q467112) female Scottish National Party (Q10658) Glasgow Southside NicolaSturgeon
Richard Lochhead (Q1490268) male Scottish National Party (Q10658) Moray NULLRichardLochhead
+++ Tavish Scott (Q1339371) Scottish Liberal Democrats (Q3250438) Shetland Islands male tavishscott

Stats

  • Items only found in SPARQL (--- in the first column): 2
  • Items only found in CSV (+++ in the first column): 2
  • Items that differ between sources (→ in the first column): 11
  • Total items in SPARQL: 129
  • Total items in CSV: 129

External source

https://raw.githubusercontent.com/everypolitician/everypolitician-data/master/data/Scotland/Parliament/unstable/latest.csv

SPARQL query

SELECT DISTINCT ?wikidata ?wikidata_group ?area ?gender ?twitter ?facebook WHERE {
  ?wikidata p:P39 ?mem.
  ?mem ps:P39 wd:Q30580546.
  OPTIONAL { ?mem pq:P4100|pq:P102 ?wikidata_group. }
  OPTIONAL { ?mem pq:P768 ?raw_area. }
  OPTIONAL { ?wikidata wdt:P21 ?raw_gender }
  OPTIONAL { ?wikidata wdt:P2002 ?twitter }
  OPTIONAL { ?wikidata wdt:P2013 ?facebook }
  FILTER NOT EXISTS { ?mem pq:P582 [] }
  SERVICE wikibase:label { 
    bd:serviceParam wikibase:language "en". 
    ?raw_gender rdfs:label ?gender .
    ?raw_area rdfs:label ?area .
  }
}
Try it!

Refresh prompt

Refresh this comparison Purge the cache

Customize (optional)