7,739
edits
No edit summary |
(reorder queries by theme) |
||
Line 1: | Line 1: | ||
= | ==SAL== | ||
=== | ===People whose signed nomination for SAL elections based on personal knowledge, sorted by frequency of signatures=== | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
Line 11: | Line 11: | ||
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/> | PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/> | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
SELECT ? | SELECT ?SALsignatoryLabel ?SALsignatory (count(*) as ?count) WHERE { | ||
WHERE { | ?person bnp:P16 ?SALstatement . | ||
?person | ?SALstatement bnps:P16 ?SALproposed . | ||
?SALstatement bnpq:P32 ?SALsignatory . | |||
SERVICE wikibase:label { | |||
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". | |||
} | |||
} | } | ||
ORDER BY ? | GROUP BY ?SALsignatoryLabel ?SALsignatory | ||
ORDER BY DESC(?count) | |||
</sparql> | </sparql> | ||
=== | ===People whose elections were proposed to SAL or RAI, including who proposed, seconded, or signed (excluding 'general knowledge' signatures) their proposal for election, seperated by type, and including the date the proposals were made=== | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
Line 38: | Line 35: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
SELECT ?person ?personLabel ? | SELECT ?person ?personLabel ?SALproposedLabel ?SALsignatorypersonalLabel ?SALsignatorygeneralLabel ?RAIproposedLabel ?RAIsecondedLabel ?date WHERE | ||
{ | |||
{ | |||
?person bnwdt:P3 bnwd:Q3 . | |||
?person bnp:P16 ?SALstatement . | |||
SERVICE wikibase:label { | ?SALstatement bnps:P16 ?SALproposed . | ||
?SALstatement bnpq:P32 ?SALsignatorypersonal . | |||
?SALstatement bnpq:P1 ?date . | |||
} | |||
UNION | |||
{ | |||
?person bnwdt:P3 bnwd:Q3 . | |||
?person bnp:P7 ?RAIstatement . | |||
?RAIstatement bnps:P7 ?RAIproposed . | |||
OPTIONAL {?RAIstatement bnpq:P8 ?RAIseconded .} | |||
?RAIstatement bnpq:P1 ?date . | |||
} | |||
SERVICE wikibase:label { | |||
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". | ||
} | |||
} | } | ||
ORDER BY ?date | |||
# I only got how to do this when I read https://wdqs-tutorial.toolforge.org/index.php/category/simple-queries/qualifiers/ Huge thanks to @Tagishsimon for pointing out my error and forcing me to do it properly :) | |||
</sparql> | </sparql> | ||
Line 104: | Line 83: | ||
</sparql> | </sparql> | ||
===People whose | ===People whose election to SAL was proposed and the person who proposed them, with - where known - date of proposal, gender of proposed FSA and proposer, and if elected=== | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
Line 114: | Line 93: | ||
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/> | PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/> | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
PREFIX wdt: <http://www.wikidata.org/prop/direct/> | |||
PREFIX wd: <http://www.wikidata.org/entity/> | |||
SELECT ? | SELECT ?FSA ?date ?FSALabel ?FSAgenderLabel ?proposer ?proposerLabel ?proposergenderLabel ?electedLabel | ||
? | WHERE { | ||
?FSA bnwdt:P16 ?proposer . #select proposed FSA and their proposed | |||
OPTIONAL {?FSA bnwdt:P3 ?FSAgender .} #option select gender of proposed FSA | |||
OPTIONAL {?proposer bnwdt:P3 ?proposergender} #option select gender of proposer | |||
?FSA bnp:P16 ?SALstatement . | |||
?SALstatement bnps:P16 ?SALproposed . | ?SALstatement bnps:P16 ?SALproposed . | ||
OPTIONAL {?SALstatement bnpq:P1 ?date .} #option select date of proposal | |||
SERVICE wikibase:label { | OPTIONAL {?SALstatement bnpq:P22 ?elected .} #option select if elected | ||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | |||
} | } | ||
ORDER BY ?date | |||
ORDER BY | |||
</sparql> | </sparql> | ||
===People | ===People who proposed elections to SAL, sorted by the frequency of individual co-signatories=== | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
# people who proposed elections to SAL, sorted by the frequency of individual co-signatories | |||
# e.g. Q137 co-signed proposals from Q136 on the number of occasions recorded in the 'co-signatory_count' column | |||
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/> | PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/> | ||
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/> | PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/> | ||
Line 138: | Line 124: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
SELECT ? | SELECT ?SALproposerLabel ?SALproposer ?co_signatoryLabel ?co_signatory (count(?co_signatory) as ?co_signatory_count) WHERE { | ||
?person bnp:P16 ?SALstatement . | ?person bnp:P16 ?SALstatement . | ||
?SALstatement bnps:P16 ? | ?SALstatement bnps:P16 ?SALproposer . | ||
?SALstatement bnpq:P32 ? | ?SALstatement bnpq:P32 ?co_signatory . | ||
SERVICE wikibase:label { | SERVICE wikibase:label { | ||
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". | ||
} | } | ||
} | } | ||
ORDER BY ? | GROUP BY ?SALproposerLabel ?SALproposer ?co_signatoryLabel ?co_signatory | ||
ORDER BY DESC(?co_signatory_count) | |||
</sparql> | </sparql> | ||
==Place== | |||
===People not in London linked as a graph by a NUTS region or country (excluding England) at which they were once resident in the UK=== | ===People not in London linked as a graph by a NUTS region or country (excluding England) at which they were once resident in the UK=== | ||
Line 210: | Line 185: | ||
</sparql> | </sparql> | ||
=== | ===People not in London with the district, county, and region at which they were once resident (in the UK) listed=== | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
Line 220: | Line 195: | ||
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/> | PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/> | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
SELECT ? | SELECT ?resident ?residentLabel ?district ?districtLabel ?county ?countyLabel ?region ?regionLabel | ||
WHERE { | WHERE { | ||
? | ?resident bnwdt:P29 ?residence . | ||
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q39 .} | |||
? | ?residence bnwdt:P33 ?district . | ||
? | ?district bnwdt:P33 ?county . | ||
?county bnwdt:P33 ?region . | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | ||
} | } | ||
ORDER BY ? | ORDER BY ?regionLabel | ||
</sparql> | </sparql> | ||
===People | ===People sorted by the number of places they lived, including the number of cites/towns/villages they lived in=== | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
Line 254: | Line 218: | ||
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/> | PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/> | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
SELECT ?person ?personLabel | SELECT ?person ?personLabel (count(?resided) as ?residence_count) (count(distinct ?resided) as ?residence_distinct) WHERE { | ||
WHERE { | ?person bnwdt:P3 bnwd:Q3 ; | ||
wikibase:statements ?statements . | |||
FILTER NOT EXISTS {?person bnwdt: | FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team | ||
?person bnp:P29/bnps:P29 ?resided. | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | SERVICE wikibase:label { | ||
} | bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". | ||
} | |||
} group by ?person ?personLabel ?statements order by desc(?residence_count) | |||
# Credit to @Tagishsimon for helping me figure out the counting logic here | |||
</sparql> | </sparql> | ||
=== | ==IDs== | ||
===Women in the wiki (excluding the project team) and their corresponding IDs - where they exist - on wikidata, viaf, WorldCat Identities, and the Archaeology Data Service=== | |||
<sparql tryit="1"> | <sparql tryit="1"> | ||
Line 280: | Line 246: | ||
PREFIX wd: <http://www.wikidata.org/entity/> | PREFIX wd: <http://www.wikidata.org/entity/> | ||
SELECT ? | SELECT ?person ?personLabel ?wikidata_ID ?viaf_ID ?ads_ID ?worldcat_ID | ||
WHERE { | WHERE { | ||
? | ?person bnwdt:P3 bnwd:Q3 . #select women | ||
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team | |||
OPTIONAL {? | OPTIONAL {?person bnwdt:P117 ?wikidata_ID .} #return wikidata ID | ||
OPTIONAL {?person bnwdt:P119 ?viaf_ID .} #return VIAF ID | |||
OPTIONAL {?person bnwdt:P34 ?ads_ID .} #return Archaeological Data Service ID | |||
OPTIONAL {? | OPTIONAL {?person bnwdt:P118 ?worldcat_ID .} #return WorldCat Identities ID | ||
OPTIONAL {? | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | ||
} | } | ||
ORDER BY ? | ORDER BY ?personLabel | ||
</sparql> | </sparql> | ||
=== | ===Where women in our data are in wikidata, their spouses, fathers, and mothers according to wikidata=== | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
Line 304: | Line 269: | ||
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/> | PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/> | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
PREFIX wdt: <http://www.wikidata.org/prop/direct/> | |||
PREFIX wd: <http://www.wikidata.org/entity/> | |||
SELECT ?person ?personLabel | SELECT ?person ?personLabel ?item ?WD_spouse ?WD_father ?WD_mother | ||
WHERE { | |||
?person bnwdt:P3 bnwd:Q3 . #select women | |||
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team | FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team | ||
?person bnp: | ?person bnp:P117 ?wikidata_ID . #look for wikidata ID on person page | ||
SERVICE wikibase:label { | ?wikidata_ID bnpq:P14 ?wikidata_url . | ||
BIND(IRI(REPLACE(?wikidata_url,"https://www.wikidata.org/wiki/","http://www.wikidata.org/entity/")) as ?item ) | |||
SERVICE <https://query.wikidata.org/sparql> { | |||
# | ?item wdt:P21 ?WD_gender. #get gender of person | ||
OPTIONAL {?item wdt:P22 ?WD_father . } #recall father | |||
OPTIONAL {?item wdt:P25 ?WD_mother . } #recall mother | |||
OPTIONAL {?item wdt:P26 ?WD_spouse . } #recall spouse | |||
} | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | |||
} | |||
ORDER BY ?personLabel | |||
# with thanks to @tagishsimon for writing this one initially! | |||
</sparql> | </sparql> | ||
Line 364: | Line 340: | ||
</sparql> | </sparql> | ||
=== | ==Admin== | ||
===Women about whom we have recorded fewer than 3 pieces of information=== | |||
<sparql tryit="1"> | <sparql tryit="1"> | ||
Line 375: | Line 353: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
SELECT ? | SELECT ?person ?personLabel ?statements WHERE { | ||
?person bnwdt:P3 bnwd:Q3 ; | |||
wikibase:statements ?statements . | |||
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} | |||
FILTER (?statements <3) | |||
SERVICE wikibase:label { | |||
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". | |||
} | |||
} | |||
</sparql> | |||
===People for whom their item records is given as 'Mrs'=== | |||
<sparql tryit="1"> | |||
SELECT ?id ?name | |||
WHERE { | WHERE { | ||
? | ?id rdfs:label ?name . | ||
FILTER regex(?name, "mrs *", "i") #this line uses regular expression syntax, described at https://regexper.com/#mrs%5Cs* | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | ||
} | } | ||
</sparql> | </sparql> | ||
=== | ===All triples in the wiki, limited to 1000=== | ||
<sparql tryit="1"> | |||
SELECT ?a ?aLabel ?b ?c WHERE { | |||
?a ?b ?c | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | |||
} | |||
LIMIT 1000 #please don't make this number too big as it will slow down the site! | |||
</sparql> | |||
===All triples in the wiki, represented as a crude graph=== | |||
<sparql tryit="1"> | <sparql tryit="1"> | ||
# | #defaultView:Graph | ||
# | SELECT ?a ?aLabel ?c ?cLabel WHERE { | ||
?a ?b ?c | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | |||
} | |||
#note query returns every connection in the wikibase so it may fall over! | |||
</sparql> | |||
===People whose assigned gender we have been unable to determine and/or confirm=== | |||
<sparql tryit="1"> | |||
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/> | PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/> | ||
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/> | PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/> | ||
Line 400: | Line 406: | ||
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/> | PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/> | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
PREFIX wdt: <http://www.wikidata.org/prop/direct/> | |||
PREFIX wd: <http://www.wikidata.org/entity/> | |||
SELECT ? | SELECT ?person ?personLabel | ||
?person | WHERE { | ||
? | ?person bnwdt:P3 ?gender . | ||
? | FILTER NOT EXISTS {?person bnwdt:P3 bnwd:Q3 .} #filter out people identified as women | ||
FILTER NOT EXISTS {?person bnwdt:P3 bnwd:Q10 .} #filter out people identified as men | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | |||
} | } | ||
ORDER BY ?personLabel | |||
ORDER BY | |||
</sparql> | </sparql> |