User:MartinPoulter/queries/representation

From Wikidata
Jump to navigation Jump to search

Short URL for this page: tinyurl.com/oer19wiki

Gender comparison

[edit]
SELECT ?genderLabel (COUNT(?person) as ?person) WHERE {
#?person wdt:P4431 [] .  # subject of a Google Doodle
#?person wdt:P1938 [].   # things with a Project Gutenberg ID
?person wdt:P1417 [].    # things in the Encyclopedia Britannica
#?article schema:about ?person ; schema:isPartOf <https://ga.wikipedia.org/> .  # Things in Irish language Wikipedia

#?person wdt:P106/wdt:P279? wd:Q864503 . # occupation: biologist

?person wdt:P31 wd:Q5.   # only get people
?person wdt:P21 ?gender.   # their gender
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }   # Get labels in English
} GROUP BY ?genderLabel
Try it!

Geographic comparison

[edit]
#defaultView:Map
SELECT ?personLabel ?personDescription ?coords WHERE {
?person wdt:P4431 [] .  # subject of a Google Doodle
#?person wdt:P1938 [].   # things with a Project Gutenberg ID
#?person wdt:P1417 [].    # things in the Encyclopedia Britannica
#?article schema:about ?person ; schema:isPartOf <https://ga.wikipedia.org/> .  # Things in Irish language Wikipedia

#?person wdt:P106/wdt:P279? wd:Q864503 . # occupation: biologist

?person wdt:P31 wd:Q5.   # only get people
?person wdt:P19/wdt:P625 ?coords   # place of birth
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }   # Get labels in English
}
Try it!

Awards by gender

[edit]

Literary awards by gender

[edit]
#defaultView:ScatterChart
# Statistics on number of recipients for award wrt. gender
SELECT ?men ?women ?award ?awardLabel WHERE {
{  SELECT (COUNT(?recipient_male) AS ?men) (COUNT(?recipient_female) AS ?women) ?award WHERE {
    ?award wdt:P31 wd:Q378427 # literary award
    { 
      ?recipient_male wdt:P166 ?award .
      ?recipient_male wdt:P21 wd:Q6581097 .
    }
    UNION 
    {
      ?recipient_female wdt:P166 ?award .
      ?recipient_female wdt:P21 wd:Q6581072 .
    }  
  }
  GROUP BY ?award
           }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!

Economics awards by gender

[edit]
#defaultView:ScatterChart
# Statistics on number of recipients for award wrt. gender
SELECT ?men ?women ?award ?awardLabel WHERE {
{  SELECT (COUNT(?recipient_male) AS ?men) (COUNT(?recipient_female) AS ?women) ?award WHERE {
    ?award wdt:P31 wd:Q17701409
    { 
      ?recipient_male wdt:P166 ?award .
      ?recipient_male wdt:P21 wd:Q6581097 .
    }
    UNION 
    {
      ?recipient_female wdt:P166 ?award .
      ?recipient_female wdt:P21 wd:Q6581072 .
    }  
  }
  GROUP BY ?award
           }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!

Art awards by gender

[edit]
#defaultView:ScatterChart
# Statistics on number of recipients for award wrt. gender
SELECT ?men ?women ?award ?awardLabel WHERE {
{  SELECT (COUNT(?recipient_male) AS ?men) (COUNT(?recipient_female) AS ?women) ?award WHERE {
    ?award wdt:P31 wd:Q1792571   # art prize
    { 
      ?recipient_male wdt:P166 ?award .
      ?recipient_male wdt:P21 wd:Q6581097 .
    }
    UNION 
    {
      ?recipient_female wdt:P166 ?award .
      ?recipient_female wdt:P21 wd:Q6581072 .
    }  
  }
  GROUP BY ?award
           }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Try it!


[edit]