User:Oravrattas/prompts/Welsh Assembly

From Wikidata
Jump to navigation Jump to search


Comparison

@@ wikidata (SPARQL) wikidata (CSV) wikidata_group (SPARQL) wikidata_group (CSV) area (SPARQL) area (CSV) gender (SPARQL) gender (CSV)

Stats

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

External source

https://raw.githubusercontent.com/everypolitician/everypolitician-data/master/data/Wales/Assembly/unstable/latest.csv

SPARQL query

SELECT DISTINCT ?wikidata ?wikidata_group ?area ?gender WHERE {
    ?wikidata p:P39 ?mem.
    ?mem ps:P39 wd:Q42310659.
    OPTIONAL { ?mem pq:P4100 ?wikidata_group. }
    OPTIONAL { ?mem pq:P768 ?wikidata_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 .
      ?wikidata_area rdfs:label ?area .
    }
  }
Try it!

Refresh prompt

Refresh this comparison Purge the cache

Customize (optional)