Project:SPARQL/examples: Difference between revisions
From Beyond Notability
Line 287: | Line 287: | ||
# more about the position | # more about the position | ||
?s ( bnps:P17|bnps:P48|bnps:P105 ) ?position . | ?s ( bnps:P17|bnps:P48|bnps:P105 ) ?position . | ||
# employer / organised by / of (incl free text). TODO: check whether these are mutually exclusive; could make this a union | # employer / organised by / of (incl free text). TODO: check whether these are mutually exclusive; could make this a union. | ||
OPTIONAL { ?s bnpq:P18 ?employer .} | OPTIONAL { ?s bnpq:P18 ?employer .} | ||
OPTIONAL { ?s bnpq:P109 ?organised .} | OPTIONAL { ?s bnpq:P109 ?organised .} | ||
Line 293: | Line 293: | ||
# optional { ?s bnpq:P2 ?location . } # sometimes there is location and no employer/org/of | # optional { ?s bnpq:P2 ?location . } # sometimes there is location and no employer/org/of | ||
# dates | # dates | ||
Line 303: | Line 300: | ||
?qual_prop wikibase:qualifier ?pq; | ?qual_prop wikibase:qualifier ?pq; | ||
#wikibase:propertyType ?date_prop_type; # can check date property types if needed | #wikibase:propertyType ?date_prop_type; # can check date property types if needed | ||
wikibase:propertyType wikibase:Time ; # nb | wikibase:propertyType wikibase:Time ; # nb *does not* include edtf dates but AFAICT there are none in qualifiers. | ||
rdfs:label ?date_label . filter(lang(?date_label)="en-gb") . # what kind of date is it. | rdfs:label ?date_label . filter(lang(?date_label)="en-gb") . # what kind of date is it. | ||
} # /dates | } # /dates |
Revision as of 13:58, 11 September 2023
SAL and RAI
People who signed nomination for SAL elections based on personal knowledge, sorted by frequency of signatures
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?SALsignatoryLabel ?SALsignatory (count(*) as ?count) WHERE {
?person bnp:P16 ?SALstatement .
?SALstatement bnps:P16 ?SALproposed .
?SALstatement bnpq:P32 ?SALsignatory .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb".
}
}
GROUP BY ?SALsignatoryLabel ?SALsignatory
ORDER BY DESC(?count)
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
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?person ?personLabel ?SALproposedLabel ?SALsignatorypersonalLabel ?SALsignatorygeneralLabel ?RAIproposedLabel ?RAIsecondedLabel ?date WHERE
{
{
?person bnwdt:P3 bnwd:Q3 .
?person bnp:P16 ?SALstatement .
?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".
}
}
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 :)
People whose elections were proposed to SAL linked in a graph to those who signed their nomination for election based on personal knowledge
#People whose elections were proposed to SAL linked in a graph to those who signed their nomination for election based on personal knowledge
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
#defaultView:Graph
SELECT ?person ?personLabel ?rgb ?SALsignatory ?SALsignatoryLabel WHERE {
?person bnp:P16 ?SALstatement .
?SALstatement bnps:P16 ?SALproposed .
?SALstatement bnpq:P32 ?SALsignatory .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb".
}
BIND( "7C4DCD" AS ?rgb ) .
}
# I don't know how to use 'edgeLabel' to show the types of interaction, but if you have an idea suggest an edit!
People whose elections were proposed to RAI linked in a graph to those who proposed and seconded their nomination for election
# People whose elections were proposed to RAI linked in a graph to those who proposed and seconded their nomination for election
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
#defaultView:Graph
SELECT ?person ?personLabel ?rgb ?RAIproposed ?RAIproposedLabel ?RAIseconded ?RAIsecondedLabel WHERE
{
?person bnwdt:P3 bnwd:Q3 .
?person bnp:P7 ?RAIstatement .
?RAIstatement bnps:P7 ?RAIproposed .
OPTIONAL {?RAIstatement bnpq:P8 ?RAIseconded .}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb".
}
BIND( "7C4DCD" AS ?rgb ) .
}
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
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
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 ?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 .
OPTIONAL {?SALstatement bnpq:P1 ?date .} #option select date of proposal
OPTIONAL {?SALstatement bnpq:P22 ?elected .} #option select if elected
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
ORDER BY ?date
People who proposed elections to SAL, sorted by the frequency of individual co-signatories
# 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 bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?SALproposerLabel ?SALproposer ?co_signatoryLabel ?co_signatory (count(?co_signatory) as ?co_signatory_count) WHERE {
?person bnp:P16 ?SALstatement .
?SALstatement bnps:P16 ?SALproposer .
?SALstatement bnpq:P32 ?co_signatory .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb".
}
}
GROUP BY ?SALproposerLabel ?SALproposer ?co_signatoryLabel ?co_signatory
ORDER BY DESC(?co_signatory_count)
Women who are listed as Fellows of the Society of Antiquaries of London (FSAs) on our wikibase and who are on Wikidata, but are not listed as FSAs on Wikidata
# Women who are listed as Fellows of the Society of Antiquaries of London (FSAs) on our wikibase and who are on Wikidata, but are not listed as FSAs on Wikidata
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
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
WHERE {
?person bnwdt:P3 bnwd:Q3 . #select women
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
?person bnwdt:P75 bnwd:Q8. # find only BN subjects having a FSA (h/t @Tagishsimon)
?person bnp:P117 ?wikidata_ID . #look for wikidata ID on person page
?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
FILTER NOT EXISTS {?item wdt:P166 wd:Q26196499 . } #not FSA on Wikidata
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
ORDER BY ?personLabel
Work
People, the positions that they held, and when they held them (if known)
# People, the positions that they held, and when they held them (if known)
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?person ?personLabel ?position ?positionLabel ?date ?startdate ?enddate
WHERE {
?person bnp:P17 ?hadposition . #using 'held position' for roles not at institutions that typically employed people on a formal, longstanding basis.
?hadposition bnps:P17 ?position
OPTIONAL {?hadposition bnpq:P1 ?date .}
OPTIONAL {?hadposition bnpq:P27 ?startdate .}
OPTIONAL {?hadposition bnpq:P28 ?enddate .}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
ORDER BY ?positionLabel ?dateLabel
People, the positions that they held, the institution that employed them (if known), and date information (if known)
# People, the positions that they held, the institution that employed them (if known), and date information (if known)
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?person ?personLabel ?position ?positionLabel ?employer ?employerLabel ?date ?startdate ?enddate
WHERE {
?person bnp:P105 ?hadposition . #using 'employed as' for roles at institutions that typically employed people on a formal, longstanding basis.
?hadposition bnps:P105 ?position
OPTIONAL {?hadposition bnpq:P18 ?employer .}
OPTIONAL {?hadposition bnpq:P1 ?date .}
OPTIONAL {?hadposition bnpq:P27 ?startdate .}
OPTIONAL {?hadposition bnpq:P28 ?enddate .}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
ORDER BY ?positionLabel ?employerLabel
Women and their work activities, with employers/organisations and dates
# query for women's different kinds of work activity, with employer/organisation and dates where available
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
PREFIX bnpsv: <https://beyond-notability.wikibase.cloud/prop/statement/value/>
PREFIX bnpqv: <https://beyond-notability.wikibase.cloud/prop/qualifier/value/>
SELECT distinct ?personLabel ?work_label ?positionLabel ?date_label ?date
?employerLabel ?organisedLabel ?ofLabel
?s ?person ?work ?position ?employer ?organised ?of
WHERE {
?person bnwdt:P3 bnwd:Q3 . # women
# get work activities: held position / held position (free text) / employed as
?person ( bnp:P17|bnp:P48|bnp:P105 ) ?s .
?person ?work_p ?s . # for activity type label
?work wikibase:claim ?work_p;
rdfs:label ?work_label. filter(lang(?work_label)="en-gb") .
# more about the position
?s ( bnps:P17|bnps:P48|bnps:P105 ) ?position .
# employer / organised by / of (incl free text). TODO: check whether these are mutually exclusive; could make this a union.
OPTIONAL { ?s bnpq:P18 ?employer .}
OPTIONAL { ?s bnpq:P109 ?organised .}
OPTIONAL { ?s ( bnpq:P78 | bnpq:P66 ) ?of .}
# optional { ?s bnpq:P2 ?location . } # sometimes there is location and no employer/org/of
# dates
optional {
?s ?pq ?date .
?qual_prop wikibase:qualifier ?pq;
#wikibase:propertyType ?date_prop_type; # can check date property types if needed
wikibase:propertyType wikibase:Time ; # nb *does not* include edtf dates but AFAICT there are none in qualifiers.
rdfs:label ?date_label . filter(lang(?date_label)="en-gb") . # what kind of date is it.
} # /dates
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
} # /where
ORDER BY ?person
Women with publications listed in indexes of archaeological papers circa 1870 - 1907
# Women with publications listed in indexes of archaeological papers circa 1870 - 1907
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?person ?personLabel
WHERE {
?person bnwdt:P3 bnwd:Q3 . # select women
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
?person bnwdt:P76 bnwd:Q419 . # select people with publications listed in indexes of archaeological papers
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
ORDER BY ?personLabel
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
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
#defaultView:Graph
SELECT ?resident ?residentLabel ?region ?regionLabel
WHERE {
?resident bnwdt:P29 ?residence .
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q2035 .}
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q2036 .}
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q2037 .}
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q2038 .}
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q2039 .}
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q2040 .}
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q2041 .}
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q2042 .}
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q39.}
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q2534.}
?residence bnwdt:P33 ?district .
?district bnwdt:P33 ?county .
?county bnwdt:P33 ?region .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
People whose residence was at one time in the east or south east of England, excluding London
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?resident ?residentLabel ?residenceLabel ?districtLabel ?countyLabel ?regionLabel
WHERE {
?resident bnwdt:P29 ?residence .
?residence bnwdt:P33 ?district .
?district bnwdt:P33 ?county .
?county bnwdt:P33 ?region .
{?county bnwdt:P33 bnwd:Q67 .}
UNION
{?county bnwdt:P33 bnwd:Q85 .}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
ORDER BY ?regionLabel ?countyLabel ?districtLabel ?residenceLabel
People not in London with the district, county, and region at which they were once resident (in the UK) listed
# People not in London with the district, county, and region at which they were once resident (in the UK) listed
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?resident ?residentLabel ?district ?districtLabel ?county ?countyLabel ?region ?regionLabel
WHERE {
?resident bnwdt:P29 ?residence .
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q2035 .}
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q2036 .}
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q2037 .}
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q2038 .}
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q2039 .}
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q2040 .}
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q2041 .}
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q2042 .}
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q39.}
FILTER NOT EXISTS {?resident bnwdt:P29 bnwd:Q2534.}
?residence bnwdt:P33 ?district .
?district bnwdt:P33 ?county .
?county bnwdt:P33 ?region .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
ORDER BY ?regionLabel ?countyLabel ?districtLabel ?residentLabel
People sorted by the number of places they lived, including the number of cites/towns/villages they lived in
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?person ?personLabel (count(?resided) as ?residence_count) (count(distinct ?resided) as ?residence_distinct) WHERE {
?person bnwdt:P3 bnwd:Q3 ;
wikibase:statements ?statements .
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".
}
} group by ?person ?personLabel ?statements order by desc(?residence_count)
# Credit to @Tagishsimon for helping me figure out the counting logic here
Places at which women resided, sorted by how many residences all women had at a given village/town/city/London area
# Places at which women resided, sorted by how many residences all women had at a given village/town/city/London area
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?residence ?residenceLabel (count(?residence) as ?residence_count) #count number of places at which women lived
WHERE {
?person bnwdt:P3 bnwd:Q3 . # select women
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
?person bnwdt:P29 ?residence . # select residences
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
GROUP BY ?residence ?residenceLabel
ORDER BY DESC(?residence_count)
Districts in which women resided, sorted by how many residences all women had in that district (or equivalent sub-level for non-UK residences)
# Districts in which women resided, sorted by how many residences all women had in that district (or equivalent sub-level for non-UK residences)
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?district ?districtLabel (count(?district) as ?district_count) #count number of districts in which women lived
WHERE {
?person bnwdt:P3 bnwd:Q3 . # select women
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
?person bnwdt:P29 ?residence . # select residences
?residence bnwdt:P33 ?district . #select districts
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
GROUP BY ?district ?districtLabel
ORDER BY DESC(?district_count)
Counties in which women resided, sorted by how many residences all women had in that county
# Counties in which women resided, sorted by how many residences all women had in that county
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?county ?countyLabel (count(?county) as ?county_count) #count number of counties in which women lived
WHERE {
?person bnwdt:P3 bnwd:Q3 . # select women
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
?person bnwdt:P29 ?residence . # select residences
?residence bnwdt:P33 ?district . #select districts
?district bnwdt:P33 ?county . #select counties
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
GROUP BY ?county ?countyLabel
ORDER BY DESC(?county_count)
Counties of residence for women recorded in CAS Indexes of Archaeological Papers, sorted by how many residences all women had in that county
# Counties of residence for women recorded in CAS Indexes of Archaeological Papers, sorted by how many residences all women had in that county
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?county ?countyLabel (count(?county) as ?county_count) #count number of counties in which women lived
WHERE {
?person bnwdt:P3 bnwd:Q3 . # select women
?person bnwdt:P76 bnwd:Q419 . #select women recorded in CAS Indexes of Archaeological Papers
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
?person bnwdt:P29 ?residence . # select residences
?residence bnwdt:P33 ?district . #select districts
?district bnwdt:P33 ?county . #select counties
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
GROUP BY ?county ?countyLabel
ORDER BY DESC(?county_count)
Counties of residence for women nominated as FSAs, sorted by how many residences all women had in that county
# Counties of residence for women nominated as FSAs, sorted by how many residences all women had in that county
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?county ?countyLabel (count(?county) as ?county_count) #count number of counties in which women lived
WHERE {
?person bnwdt:P3 bnwd:Q3 . # select women
?person bnwdt:P16 ?signatory . #select women who were nominated for election to FSA
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
?person bnwdt:P29 ?residence . # select residences
?residence bnwdt:P33 ?district . #select districts
?district bnwdt:P33 ?county . #select counties
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
GROUP BY ?county ?countyLabel
ORDER BY DESC(?county_count)
Counties of residence for women nominated to RAI, sorted by how many residences all women had in that county
# Counties of residence for women nominated to RAI, sorted by how many residences all women had in that county
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?county ?countyLabel (count(?county) as ?county_count) #count number of counties in which women lived
WHERE {
?person bnwdt:P3 bnwd:Q3 . # select women
?person bnwdt:P7 ?signatory . #select women who were nominated for election to RAI
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
?person bnwdt:P29 ?residence . # select residences
?residence bnwdt:P33 ?district . #select districts
?district bnwdt:P33 ?county . #select counties
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
GROUP BY ?county ?countyLabel
ORDER BY DESC(?county_count)
Counties of residence for women who spoke at RAI meetings, sorted by how many residences all women had in that county
# Counties of residence for women who spoke at RAI meetings, sorted by how many residences all women had in that county
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?county ?countyLabel (count(?county) as ?county_count) #count number of counties in which women lived
WHERE {
?person bnwdt:P3 bnwd:Q3 . # select women
?person bnwdt:P23 bnwd:Q29 . #select women who spoke at RAI Meeting
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
?person bnwdt:P29 ?residence . # select residences
?residence bnwdt:P33 ?district . #select districts
?district bnwdt:P33 ?county . #select counties
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
GROUP BY ?county ?countyLabel
ORDER BY DESC(?county_count)
Counties of residence for women who exhibited at RAI meetings, sorted by how many residences all women had in that county
# Counties of residence for women who exhibited at RAI meetings, sorted by how many residences all women had in that county
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?county ?countyLabel (count(?county) as ?county_count) #count number of counties in which women lived
WHERE {
?person bnwdt:P3 bnwd:Q3 . # select women
?person bnwdt:P13 bnwd:Q29 . #select women who exhibited at RAI Meeting
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
?person bnwdt:P29 ?residence . # select residences
?residence bnwdt:P33 ?district . #select districts
?district bnwdt:P33 ?county . #select counties
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
GROUP BY ?county ?countyLabel
ORDER BY DESC(?county_count)
Regions in which women resided, sorted by how many residences all women had in that region
# Regions in which women resided, sorted by how many residences all women had in that region
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?region ?regionLabel (count(?region) as ?region_count) #count number of regions in which women lived
WHERE {
?person bnwdt:P3 bnwd:Q3 . # select women
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
?person bnwdt:P29 ?residence . # select residences
?residence bnwdt:P33 ?district . #select districts
?district bnwdt:P33 ?county . #select counties
?county bnwdt:P33 ?region . #select region
FILTER NOT EXISTS {?region bnwdt:P117 "Q145" .} #filter out UK (where UK is sub-region of NI)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
GROUP BY ?region ?regionLabel
ORDER BY DESC(?region_count)
People
Women with their family name at birth and family name after marriage
# Women with their family name at birth and family name after marriage
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?person ?personLabel ?birthname ?marriedname
WHERE {
?person bnwdt:P3 bnwd:Q3 . #select women
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
OPTIONAL {?person bnwdt:P140 ?birthname .} #look for birth name
OPTIONAL {?person bnwdt:P141 ?marriedname .} #look for married name
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en-gb". }
}
ORDER BY ?personLabel
Women with family name at birth, married name and count of married names
# Women with their family name at birth, family name after marriage and count of married names
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?person ?personLabel ?birthname
(GROUP_CONCAT(DISTINCT ?marriedname; SEPARATOR=", ") AS ?marriednames)
(COUNT(?marriedname) AS ?marriedcount)
WHERE {
?person bnwdt:P3 bnwd:Q3 . #select women
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
OPTIONAL {?person bnwdt:P140 ?birthname .} #look for birth name
OPTIONAL {?person bnwdt:P141 ?marriedname .} #look for married name
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en-gb". }
}
group by ?person ?personLabel ?birthname
ORDER BY ?personLabel
Where women in our data are in wikidata, their spouses, fathers, and mothers according to wikidata
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
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 ?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
?person bnp:P117 ?wikidata_ID . #look for wikidata ID on person page
?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!
Women in our data alongside counts of their public and professional activities, sorted by total
## Women in our data alongside counts of their public and professional activities (https://beyond-notability.wikibase.cloud/wiki/Item:Q151)
## Sorted by total PPAs
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
select ?person ?personLabel
(count(distinct ?exhibitor) as ?exhibitions)
(count(distinct ?position) as ?positions)
(count(distinct ?speaker) as ?spoke)
(count(distinct ?attended) as ?attendance)
(count(distinct ?donorof) as ?donated)
(count(distinct ?wasdelegate) as ?delegate)
(count(distinct ?correspondent) as ?correspondents)
(count(distinct ?fellow) as ?fellowships)
(count(distinct ?collab) as ?collaborations)
(count(distinct ?found) as ?founded)
(count(distinct ?loaned) as ?loans)
(count(distinct ?illustrated) as ?illustrations)
(count(distinct ?sold) as ?sales)
(count(distinct ?served) as ?service)
(count(distinct ?job) as ?employed)
(count(distinct ?fundraiser) as ?fundraisers)
(count(distinct ?publish) as ?published)
(count(distinct ?benefact) as ?benefactor)
(count(distinct ?donor) as ?donor_to)
(count(distinct ?collect) as ?collected)
(count(distinct ?performance) as ?performances)
((?exhibitions + ?positions + ?spoke + ?attendance + ?donated + ?delegate + ?correspondents + ?fellowships + ?collaborations + ?founded + ?loans + ?illustrations + ?sales
+ ?service + ?employed + ?fundraisers + ?published + ?benefactor + ?donor_to + ?collected + ?performances) AS ?PPA_total)
where
{
?person bnwdt:P3 bnwd:Q3 .
optional { ?person bnp:P13 ?exhibitor }
optional { ?person bnp:P17 ?position }
optional { ?person bnp:P23 ?speaker }
optional { ?person bnp:P24 ?attended }
optional { ?person bnp:P65 ?donorof }
optional { ?person bnp:P71 ?wasdelegate }
optional { ?person bnp:P73 ?correspondent }
optional { ?person bnp:P75 ?fellow }
optional { ?person bnp:P83 ?collab }
optional { ?person bnp:P85 ?found }
optional { ?person bnp:P87 ?loaned }
optional { ?person bnp:P89 ?illustrated }
optional { ?person bnp:P99 ?sold }
optional { ?person bnp:P102 ?served }
optional { ?person bnp:P105 ?job }
optional { ?person bnp:P106 ?fundraiser }
optional { ?person bnp:P107 ?publish }
optional { ?person bnp:P110 ?benefact }
optional { ?person bnp:P111 ?donor }
optional { ?person bnp:P114 ?collect }
optional { ?person bnp:P120 ?performance }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en-gb". }
}
group by ?person ?personLabel
ORDER BY DESC (?PPA_total)
Women in our data arranged as a network graph by the organisations they were members of
## Women in our data arranged as a network graph by the organisations they were members of
#defaultView:Graph
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
SELECT ?org ?orgLabel ?rgb ?linkTo ?linkToLabel
WHERE {
?linkTo bnwdt:P3 bnwd:Q3 . #select women
FILTER NOT EXISTS {?linkTo bnwdt:P4 bnwd:Q12 .} #filter out project team
?linkTo bnwdt:P67 ?org
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb,en". }
BIND( "7C4DCD" AS ?rgb ) .
}
ORDER BY ?personLabel
Membership of organisations by women, sorted by how many women were members of a given organisation
# Membership of organisations by women, sorted by how many women were members of a given organisation
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?organisation ?organisationLabel (count(?organisation) as ?organisation_count) #count number of organisations that women were members of
WHERE {
?person bnwdt:P3 bnwd:Q3 . # select women
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
?person bnwdt:P67 ?organisation . # selection people who were members of organisations and what those organisations were
FILTER NOT EXISTS {?person bnwdt:P67 bnwd:Q35 .} # filter out Royal Archaeological Institute
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
GROUP BY ?organisation ?organisationLabel
ORDER BY DESC(?organisation_count)
Education
Women educated at a tertiary educational institution located in Oxford or Cambridge
# Women educated at a tertiary educational institution located in Oxford or Cambridge
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?woman ?womanLabel ?educationalinstitution ?educationalinstitutionLabel ?location ?locationLabel
WHERE {
{?woman bnwdt:P3 bnwd:Q3 . #filter women
?woman bnwdt:P94 ?educationalinstitution . #find 'educated at' statement
?educationalinstitution bnwdt:P12 bnwd:Q2914 . #filter to tertiary educational institutions
?educationalinstitution bnwdt:P2 ?location . #find location of educational institution
?location rdfs:label ?locationLabel .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en-gb". }
FILTER(LANG(?locationLabel) = "en") .
FILTER(regex(?locationLabel, "oxford", "i")) .}
UNION
{?woman bnwdt:P3 bnwd:Q3 . #filter women
?woman bnwdt:P94 ?educationalinstitution . #find 'educated at' statement
?educationalinstitution bnwdt:P12 bnwd:Q2914 . #filter to tertiary educational institutions
?educationalinstitution bnwdt:P2 ?location . #find location of educational institution
?location rdfs:label ?locationLabel .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en-gb". }
FILTER(LANG(?locationLabel) = "en") .
FILTER(regex(?locationLabel, "Cambridge$", "i")) .}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en-gb". }
}
ORDER BY ?womanLabel
Women who were FSAs who went to Oxford or Cambridge colleges
#how many women who were FSAs went to Oxford or Cambridge colleges?
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
PREFIX bnpsv: <https://beyond-notability.wikibase.cloud/prop/statement/value/>
SELECT ?person ?personLabel ?college ?collegeLabel ?universityLabel
WHERE {
?person bnwdt:P3 bnwd:Q3 . #select women
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
?person bnwdt:P75 bnwd:Q8. # only BN subjects having a FSA
# educated at (P94) part of (P4) cambridge (Q1181) oxford (Q364)
?person bnwdt:P94 ?college .
?college bnwdt:P4 ?university .
FILTER ( ?university in ( bnwd:Q1181 , bnwd:Q364 ) )
SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb,en".}
}
order by ?personLabel ?collegeLabel
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
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
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 ?wikidata_ID ?viaf_ID ?ads_ID ?worldcat_ID
WHERE {
?person bnwdt:P3 bnwd:Q3 . #select women
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
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 {?person bnwdt:P118 ?worldcat_ID .} #return WorldCat Identities ID
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
ORDER BY ?personLabel
FSAs in the wiki (excluding the project team) and their corresponding IDs - where they exist - on wikidata, viaf, WorldCat Identities, and the Archaeology Data Service
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
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 ?wikidata_ID ?viaf_ID ?ads_ID ?worldcat_ID
WHERE {
?person bnwdt:P3 bnwd:Q3 . #select women
?person bnwdt:P16 ?FSA . #select FSA
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
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 {?person bnwdt:P118 ?worldcat_ID .} #return WorldCat Identities ID
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
ORDER BY ?personLabel
People with IDs on wikidata, their date of birth on wikidata, and the source(s) of that information
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX prov: <http://www.w3.org/ns/prov#>
SELECT ?woman ?womanLabel ?WDitem ?WDdateOfBirth (GROUP_CONCAT(?BirthStatedInEnglish;separator=" | ") AS ?sources)
WHERE {
#Select all women
?woman bnwdt:P3 bnwd:Q3 .
#select all women that have a Wikidata link
?woman bnwdt:P117 ?Qnumber .
#create reference to Wikibase entity
BIND(IRI(concat("http://www.wikidata.org/entity/", ?Qnumber)) as ?WDitem )
#on Wikibase do
SERVICE <https://query.wikidata.org/sparql> {
#get the date of birth
?WDitem wdt:P569 ?WDdateOfBirth .
#get the statement of birth
?WDitem p:P569 ?Birthstatement .
#get its node
?Birthstatement prov:wasDerivedFrom ?BirthRefnode.
#get the value of 'Stated in'
?BirthRefnode pr:P248 ?BirthStatedIn.
#get the english label of the referece 'stated in'
OPTIONAL {?BirthStatedIn rdfs:label ?BirthStatedInEnglish
FILTER (LANG(?BirthStatedInEnglish) = "en")}.
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
GROUP BY ?woman ?womanLabel ?WDitem ?WDdateOfBirth
ORDER BY ?womanLabel
# Credit to Maarten Zeinstra for developing this query
Which women in the wikibase have Wikipedia articles, according to Wikidata?
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
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 ?wikidata ?wikipedia
WHERE {
?person bnwdt:P3 bnwd:Q3 . #select women
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team
?person bnp:P117 ?wikidata_ID . #look for wikidata ID on person page
?wikidata_ID bnpq:P14 ?wikidata_url .
BIND(IRI(REPLACE(?wikidata_url,"https://www.wikidata.org/wiki/","http://www.wikidata.org/entity/")) as ?wikidata )
SERVICE <https://query.wikidata.org/sparql> {
# get English language wikipedia articles in wikidata entries, where listed
OPTIONAL {
?wikipedia schema:about ?wikidata .
?wikipedia schema:inLanguage 'en' .
FILTER (SUBSTR(str(?wikipedia), 1, 25) = 'https://en.wikipedia.org/')
}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
ORDER BY ?personLabel
Women with no date of death in our wikibase who have a date of death on Wikidata
# Women who have no date of death in our wikibase and have a date of death on Wikidata
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
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 ?wd_dod
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:P15 ?bn_dod . } # *don't* have P15 date of death
?person bnp:P117 ?wikidata_ID . #look for wikidata ID on person page
?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
?item wdt:P570 ?wd_dod . #date of death on Wikidata P570
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
ORDER BY ?personLabel
Women with no date of birth in our wikibase who have a date of birth in Wikidata
# Women who have no date of birth in our wikibase and have a date of birth on Wikidata
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
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 ?wd_dob
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:P26 ?bn_dob . } # *don't* have P15 date of death
?person bnp:P117 ?wikidata_ID . #look for wikidata ID on person page
?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
?item wdt:P569 ?wd_dob . #date of birth on Wikidata P569
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
ORDER BY ?personLabel
Fishing Expeditions
All properties in use in the wikibase with property type, label and description (if present)
# query for information about properties that are being used in the wikibase
## fyi: not actually necessary to declare these properties
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX schema: <http://schema.org/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT DISTINCT
?property
?propertyType
?propertyLabel
(group_concat(?propertyAltLabel; separator=" | ") as ?propertyAltLabels)
?propertyDescription
WHERE {
?property a wikibase:Property ;
rdfs:label ?propertyLabel ; # label
wikibase:propertyType ?propertyType . # datatype
# add alternative labels if present (can be multiple)
OPTIONAL { ?property skos:altLabel ?propertyAltLabel . }
# add description if present
OPTIONAL {
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb,en".
?property schema:description ?propertyDescription .
}
}
FILTER(LANG(?propertyLabel) = 'en-gb')
# fix label language dups; but Q why doesn't SERVICE work?
# A: https://en.wikibooks.org/wiki/SPARQL/FILTER#FILTER_on_values_in_Labels
# nb a few objects found with en-gb label missing
}
group by ?property ?propertyLabel ?propertyType ?propertyDescription
order by ?propertyLabel
All the Things for Organisations
# Exploratory query to get all info on an item page including qualifiers (but not references) for each organisation in the wikibase
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
select ?item ?itemLabel
?prop ?propLabel ?prop_type
?stmt_value ?stmt_valueLabel
?qual_prop ?qual_value ?qual_label ?qual_prop_type
?statement
where {
?item bnwdt:P12 bnwd:Q2316 . # instance of organisation
# get all the things about ?item
?item ?p ?statement .
# to get item Label without using service. couple of missing en-gb labels somewhere
# ?item rdfs:label ?item_label . filter(lang(?item_label)="en-gb") .
# get stuff about ?p
?prop wikibase:claim ?p;
wikibase:statementProperty ?ps; # "Links property entity to statement simple value predicate"
#wikibase:statementValue ?psv; # "Links property entity to statement full value predicate"
wikibase:propertyType ?prop_type.
# get stuff about ?statement
?statement ?ps ?stmt_value.
# get any qualifiers
optional {
?statement ?qual_p ?qual_value .
?qual_prop wikibase:qualifier ?qual_p;
wikibase:propertyType ?qual_prop_type ;
rdfs:label ?qual_label. filter(lang(?qual_label)='en-gb') .
}
# OPTIONAL { ?item skos:altLabel ?alt_label . }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
order by ?item_label ?prop_label
Dates
All the Dates for Women FSAs
# union query to get [hopefully] every date associated with women FSAs including main dates and qualifier dates and date precision
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
PREFIX bnpsv: <https://beyond-notability.wikibase.cloud/prop/statement/value/>
PREFIX bnpqv: <https://beyond-notability.wikibase.cloud/prop/qualifier/value/>
SELECT distinct ?person ?personLabel ?date_prop_label ?date_value ?date_precision ?qual ?qualLabel ?date_prop_type
#?s #statement url [for grouping]
#?date_prop #property url/id
WHERE {
{ # main dates
?person bnwdt:P3 bnwd:Q3 . #select women
?person bnwdt:P75 bnwd:Q8. # find only BN subjects having a FSA
# get stuff about ?person
?person ?p ?s .
# get stuff about ?p .
?date_prop wikibase:claim ?p;
wikibase:statementProperty ?ps ;
wikibase:statementValue ?psv .
?date_prop wikibase:propertyType ?date_prop_type .
?date_prop rdfs:label ?date_prop_label. filter(lang(?date_prop_label)="en-gb") .
# get dates detail via ?s and psv
# TODO: I think this gets edtf dates in simplified std wiki date format. could handle them separately to keep the extra info.
# https://github.com/ProfessionalWiki/WikibaseEdtf
?s ?psv ?wdv .
?wdv wikibase:timeValue ?date_value ;
wikibase:timePrecision ?date_precision .
} # /main dates
UNION
{ # qualifier dates
?person bnwdt:P3 bnwd:Q3 . # women
?person bnwdt:P75 bnwd:Q8. # only BN subjects having a FSA
# get stuff about ?person
?person ?p ?s .
# get stuff about ?p .
?prop wikibase:claim ?p;
#wikibase:propertyType ?prop_type ;
wikibase:statementProperty ?ps.
?prop rdfs:label ?prop_label. filter(lang(?prop_label)="en-gb") .
# get stuff about ?s.
?s ?ps ?qual.
# get stuff about qual if you want
# optional {
# what sort of thing is qual
# ?qual bnwdt:P12 ?inst . # instance of can be multiple so could get some dups
#} # /qual optional
# get qualifier dates [are there any Edtf in qualifier dates?]
?s ?pq ?pqs .
# this needs to be limited to dates... I think
FILTER(DATATYPE(?pqs) = xsd:dateTime).
# get stuff about pq
?qual_prop wikibase:qualifier ?pq;
wikibase:propertyType ?date_prop_type.
?qual_prop rdfs:label ?date_prop_label . filter(lang(?date_prop_label)="en-gb") . # what sort of date is it.
# get dates detail. TODO: how to get the /entity/ url for date_prop?
?s ?date_prop ?pqv .
?pqv wikibase:timeValue ?date_value.
?pqv wikibase:timePrecision ?date_precision.
} # /qual dates
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
} # /where
ORDER BY ?person ?date_value
Fetch any of multiple kinds of EDTF date for a woman
# a union query to fetch stuff for multiple properties, in this case dates recorded in EDTF which need slightly different handling from PIT dates
# TODO: this excludes any EDTF dates in qualifiers; not sure if there are any.
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?person ?personLabel ?date_edtf ?date_type
WHERE { ?person bnwdt:P3 bnwd:Q3 .
FILTER NOT EXISTS { ?person bnwdt:P4 bnwd:Q12 . }
## short form of UNION using |
?person ( bnwdt:P131 | bnwdt:P132 | bnwdt:P133 ) ?date_edtf .
## cf. full length UNION
## {?person bnwdt:P131 ?date_edtf } union {?person bnwdt:P132 ?date_edtf } union {?person bnwdt:P133 ?date_edtf }
## need to know what kind of date it is
?person ?date_type ?date_edtf .
## filter for edtf dates
## docs: https://github.com/ProfessionalWiki/WikibaseEdtf
FILTER ( datatype(?date_edtf) = xsd:edtf ) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en, en-gb". }
}
ORDER BY ?personLabel
Full values: dates
# query for full values to access the timeValue and timePrecision of a date, in this case a date of birth.
## why is a more complex query needed?
## simple value for a date doesn't differentiate between (eg) "1880" and "1 January 1880"; both are returned as 1 January 1880 (and SELECT DISTINCT will collapse them into a single result)
## there are 14 codes for precision from billion years to second. 7: century, 8: decade, 9: year, 10: month, 11: day
## NB additional bnpsv: prefix
## https://www.mediawiki.org/wiki/Wikibase/Indexing/RDF_Dump_Format#Value_representation
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
PREFIX bnpsv: <https://beyond-notability.wikibase.cloud/prop/statement/value/>
SELECT DISTINCT ?item ?itemLabel ?date ?precision
WHERE {
?item bnp:P26 ?statement. # date of birth (precision of these varies quite a bit)
?statement bnpsv:P26 ?valueNode.
?valueNode wikibase:timeValue ?date.
?valueNode wikibase:timePrecision ?precision.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY ?date
Any main level date for women
# a query to get all types of main date for women
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
PREFIX bnpsv: <https://beyond-notability.wikibase.cloud/prop/statement/value/>
SELECT DISTINCT ?person ?personLabel ?date_label ?date ?date_prop_type ?date_prop
WHERE {
?person bnwdt:P3 bnwd:Q3 . # women
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .}
?person ?p ?s .
?date_prop wikibase:claim ?p;
wikibase:statementValue ?psv ;
wikibase:propertyType ?date_prop_type; # property type = wikibase:Time OR wikibase:Edtf
rdfs:label ?date_label. filter(lang(?date_label)="en-gb") . # what kind of date it is
?s ?psv ?wdv . # for the date value
?wdv wikibase:timeValue ?date . #timeValue gets pit and edtf
# ?wdv wikibase:timePrecision ?date_precision . # optional
# nb also possible to filter either/or time/edtf by property type
# filter(?date_prop_type in (wikibase:Edtf, wikibase:Time ) ) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY ?personLabel ?date
Admin
Women about whom we have recorded fewer than 3 pieces of information
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
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".
}
}
People for whom their item records is given as 'Mrs'
SELECT ?id ?name
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". }
}
All triples in the wiki, limited to 1000
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!
All triples in the wiki, represented as a crude graph
#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!
People whose assigned gender we have been unable to determine and/or confirm
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
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
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
People who have a spouse statement and - optionally - marriage date statements for checking if there is any misalignment with 'Spouse not in wikibase' statements
# people who have a spouse statement and - optionally - marriage date statements for checking if there is any misalignment with 'Spouse not in wikibase' statements
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?person ?personLabel ?spouse ?spouseLabel ?edtfmarriagespouse ?edtfmarriagespouseLabel ?PITmarriagespouse ?PITmarriagespouseLabel WHERE {
?person bnwdt:P41 ?spouse .
OPTIONAL {?person bnp:P132 ?edtfmarriagestatement .
?edtfmarriagestatement bnps:P132 ?edtfmarriagedate .
?edtfmarriagestatement bnpq:P41 ?edtfmarriagespouse .}
OPTIONAL {?person bnp:P130 ?PITmarriagestatement .
?PITmarriagestatement bnps:P130 ?PITmarriagedate .
?PITmarriagestatement bnpq:P41 ?PITmarriagespouse .}
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb".
}
}
ORDER BY DESC(?edtfmarriagespouseLabel) DESC(?PITmarriagespouseLabel)
Tools for batch processing and quality assurance work
All people (by assigned gender), filtering out those already listed as instance of human
# All people (by assigned gender), filtering out those already listed as instance of human
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
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 ?assigned_genderLabel
WHERE {
?person bnwdt:P3 ?assigned_gender . #select person
FILTER NOT EXISTS {?person bnwdt:P12 bnwd:Q2137 .} #filter out people already listed as instance of human
FILTER NOT EXISTS {?person bnwdt:P12 bnwd:Q12 .} #filter out project team
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
ORDER BY ?personLabel
All places (by coordinate location on wikidata), filtering out places already listed as instance of locality
# All places (by coordinate location on wikidata), filtering out places already listed as instance of locality
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX pr: <http://www.wikidata.org/prop/reference/>
PREFIX prov: <http://www.w3.org/ns/prov#>
SELECT ?place ?placeLabel ?WDitem ?WDcoordinate_location
WHERE {
?place bnwdt:P33 ?admin_area . #select items with 'located in the administrative territorial entity' statements
?place bnwdt:P117 ?Qnumber . #get wikidata ID
FILTER NOT EXISTS {?place bnwdt:P12 bnwd:Q2147 .} #filter out places already listed as instance of locality
#create reference to Wikibase entity
BIND(IRI(concat("http://www.wikidata.org/entity/", ?Qnumber)) as ?WDitem )
#on Wikibase do
SERVICE <https://query.wikidata.org/sparql> {
?WDitem wdt:P625 ?WDcoordinate_location . #get coordinate location on wikidata
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". }
}
GROUP BY ?place ?placeLabel ?WDitem ?WDcoordinate_location
ORDER BY ?placeLabel
All items without a P12 (instance of) triple
# All items without a P12 (instance of) triple
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT distinct ?item ?itemLabel WHERE {
?item ?b ?c ;
FILTER NOT EXISTS {?item bnwdt:P12 ?anything .}
## FILTER(STRSTARTS(STR(?item), "https://beyond-notability.wikibase.cloud/entity/Q")) . # limit results to "Q" entities
## FILTER(REGEX(STR(?item), "^https://beyond-notability.wikibase.cloud/entity/[PQ]")) . # or to Ps and Qs
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb".
}
}
Counts of items for each value of the property "instance of" (P12)
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?value ?valueLabel (count(*) as ?count)
WHERE {
VALUES (?p) { (bnwdt:P12) }
?s ?p ?value.
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
GROUP BY ?value ?valueLabel
ORDER BY lcase(?valueLabel) # order by is case sensitive
# or to order by count
# order by ?count
Get all items (with 'instance of' statement) for duplicate checking in OpenRefine
# Get all items (with 'instance of' statement) for duplicate checking in OpenRefine
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT ?item ?itemLabel WHERE {
?item bnwdt:P12 ?anything .
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb".
}
}
ORDER BY ?itemLabel
All uses of <unknown value>
# Query to look for uses of <unknown value> (now including qualifiers)
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/>
PREFIX bnwds: <https://beyond-notability.wikibase.cloud/entity/statement/>
PREFIX bnwdv: <https://beyond-notability.wikibase.cloud/value/>
PREFIX bnwdt: <https://beyond-notability.wikibase.cloud/prop/direct/>
PREFIX bnp: <https://beyond-notability.wikibase.cloud/prop/>
PREFIX bnps: <https://beyond-notability.wikibase.cloud/prop/statement/>
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/>
SELECT distinct ?item ?itemLabel ?stmtLabel ?sub_Label ?unknown_value_forLabel ?unknown_value_for
WHERE
{
{
# qualifiers
?item ?p ?s.
?s ?sub ?sub_ .
?stmt wikibase:claim ?p.
?stmt wikibase:statementProperty ?sub.
?s ?pq ?pq_ .
?unknown_value_for wikibase:qualifier ?pq .
FILTER( isBLANK(?pq_) ) . # filter for <unknown value>
}
UNION
{
# top level
?item ?p ?s.
?s ?ps ?ps_ .
?unknown_value_for wikibase:claim ?p.
?unknown_value_for wikibase:statementProperty ?ps.
FILTER( isBLANK(?ps_) ) .
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?itemLabel ?unknown_value_forLabel