579
edits
m (→Lecturers) |
|||
(18 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Project:SPARQL/admin | Admin/batch tools queries]] | |||
==SAL and RAI== | ==SAL and RAI== | ||
Line 552: | Line 554: | ||
</sparql> | </sparql> | ||
=== Lecturers === | |||
<sparql tryit="1"> | |||
#title:lecturers | |||
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 ?positionLabel | |||
?organisedLabel ?ofLabel | |||
?qual_propLabel ?qualLabel | |||
#?position ?of ?work ?organised ?date_precision ?qual_prop ?date ?qual ?workLabel | |||
?s | |||
WHERE { | |||
?person bnwdt:P3 bnwd:Q3 . # women | |||
# 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 . | |||
?s ?bnps ?position . | |||
# freelance and extension lecturing (q701 and q3021) | |||
{ ?s ?bnps bnwd:Q701 . } union { ?s ?bnps bnwd:Q3021 . } | |||
# employer / organised by / of (incl free text). | |||
OPTIONAL { ?s bnpq:P109 ?organised .} | |||
OPTIONAL { ?s ( bnpq:P78 | bnpq:P66 ) ?of .} | |||
# optional { ?s bnpq:P2 ?location . } # do locations separately. | |||
# dates with precision | |||
# optional { | |||
# ?s (bnpqv:P1 | bnpqv:P27 | bnpqv:P28 ) ?pqv. | |||
# ?s ?pqq ?pqv . # just gets the uri but doesnt seem to cause dups | |||
# ?pqv wikibase:timeValue ?date . | |||
# ?pqv wikibase:timePrecision ?date_precision . | |||
# } | |||
# qualifiers | |||
optional { | |||
?s ?pq ?qual . | |||
?qual_prop wikibase:qualifier ?pq . | |||
} # /dates | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en-gb". } | |||
} # /where | |||
ORDER BY ?person ?s | |||
</sparql> | |||
== Professional Activities and Organisations == | == Professional Activities and Organisations == | ||
Line 567: | Line 630: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
SELECT distinct ?personLabel ?serviceLabel ?qual_propLabel ?qualLabel | |||
SELECT distinct ?personLabel ?serviceLabel ?qual_propLabel ?qualLabel ?qual ?person ?s # ?service | |||
WHERE { | WHERE { | ||
?person bnwdt:P3 bnwd:Q3 . # select women | ?person bnwdt:P3 bnwd:Q3 . # select women | ||
Line 573: | Line 637: | ||
?person bnp:P102 ?s . # served on P102 | ?person bnp:P102 ?s . # served on P102 | ||
?s bnps:P102 ?service . | |||
optional { #qualifiers, if any | optional { #qualifiers, if any | ||
?s ?pq ?qual . | ?s ?pq ?qual . | ||
?qual_prop wikibase:qualifier ?pq. | ?qual_prop wikibase:qualifier ?pq. | ||
} # /quals | } # /quals | ||
Line 593: | Line 648: | ||
ORDER BY ?personLabel ?s | ORDER BY ?personLabel ?s | ||
</sparql> | </sparql> | ||
Line 758: | Line 814: | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
#title:ppa buckets (revised February 2024) | #title:ppa buckets (revised February 2024) | ||
# broad PPA grouping categories to use for overviews and analysis within categories | |||
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 774: | Line 832: | ||
?ppa wikibase:claim ?p; | ?ppa wikibase:claim ?p; | ||
wikibase:statementProperty ?ps. | wikibase:statementProperty ?ps. | ||
# note: i think you need rdfs:label (*Label won't work) for the bind() | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en-gb". | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en-gb". | ||
?ppa rdfs:label ?ppa_label. | ?ppa rdfs:label ?ppa_label. | ||
} # /label service | } # /label service | ||
Line 785: | Line 845: | ||
?s ?ps ?ppa_value. | ?s ?ps ?ppa_value. | ||
# note: it would be possible to write this to use ppa rather than ppa_label | |||
# BUT then it would be much more opaque and difficult to edit if (when!) we make any changes to the buckets. | |||
bind( | bind( | ||
if( str(?ppa_label) in ("attended", "exhibited at", "organiser of", "performed at", "spoke at", "was delegate at (free text)", "was delegate at (item)" ), "events", | if( str(?ppa_label) in ("attended", "exhibited at", "organiser of", "performed at", "spoke at", "was delegate at (free text)", "was delegate at (item)" ), "events", | ||
Line 807: | Line 868: | ||
</sparql> | </sparql> | ||
=== | === Suffrage-related activities === | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
# | #title:initial query for suffrage activities | ||
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/> | PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/> | ||
Line 822: | Line 882: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
# | SELECT distinct ?person ?personLabel ?mainLabel ?sub_Label ?qualLabel ?locationLabel ?date | ||
# ?pq ?sub_ ?qual ?main | |||
?s | |||
WHERE { | WHERE { | ||
?person bnwdt:P3 bnwd:Q3 . #select women | |||
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team | |||
?person ?p ?s . | |||
?s ?sub ?sub_ . | |||
?main wikibase:claim ?p. | |||
?main wikibase:statementProperty ?sub. | |||
# sub_ i/o - some do have suffrage activity | |||
# optional { ?sub_ bnwdt:P12 ?sub_io . ?sub_ bnwdt:P12 bnwd:Q1166 . } | |||
# union | |||
{ | |||
# a qualifier (anywhere) has i/o suffrage activity | |||
?s bnpq:P12 bnwd:Q1166. | |||
} | |||
# what about a main rather than qualifier having i/o suffrage activity? i don't think there are any atm but could be. | |||
# union | |||
# { # this might find extra linked i/o suffrage but i'm not sure it works. | |||
# ?sub_ bnwdt:P12 bnwd:Q1166 . | |||
# } | |||
union | |||
{ | |||
# does *not* have i/o suffrage activity in any qualifiers ... slows things right down and doesn't seem to make any difference to results? | |||
#filter not exists { ?s bnpq:P12 bnwd:Q1166. } | |||
# ... but a qualifier *does* have i/o suffrage activity. i think! | |||
?s ?pq ?qual . | |||
?qual bnwdt:P12 bnwd:Q1166 . | |||
} # /union | |||
optional { | |||
# date qualifiers. [assumes no edtf in quals. ] all seem to be p.i.t. | |||
?s ?dpq ?date . | |||
?qual_date wikibase:qualifier ?dpq . | |||
?qual_date wikibase:propertyType wikibase:Time. | |||
} | |||
optional { ?s bnpq:P78 ?of. } # outside the union seems much speedier | |||
optional { ?s bnpq:P2 ?location . } | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en-gb". } | |||
} | } | ||
order by ?personLabel ?mainLabel | |||
</sparql> | </sparql> | ||
===People | ==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=== | |||
<sparql tryit="1"> | <sparql tryit="1"> | ||
# People | # 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 bnwd: <https://beyond-notability.wikibase.cloud/entity/> | ||
Line 881: | Line 955: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
SELECT ?resident ?residentLabel ? | #defaultView:Graph | ||
SELECT ?resident ?residentLabel ?region ?regionLabel | |||
WHERE { | WHERE { | ||
?resident bnwdt:P29 ?residence . | ?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". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | ||
} | } | ||
</sparql> | </sparql> | ||
===People | ===People whose residence was at one time in the east or south east of England, excluding London=== | ||
<sparql tryit="1"> | <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 908: | Line 987: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
SELECT ?resident ?residentLabel ? | SELECT ?resident ?residentLabel ?residenceLabel ?districtLabel ?countyLabel ?regionLabel | ||
WHERE { | WHERE { | ||
?resident bnwdt:P29 ?residence . | ?resident bnwdt:P29 ?residence . | ||
?residence bnwdt:P33 ?district . | ?residence bnwdt:P33 ?district . | ||
?district bnwdt:P33 ?county . | ?district bnwdt:P33 ?county . | ||
?county bnwdt:P33 ?region . | ?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". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | ||
} | } | ||
ORDER BY ?regionLabel ?countyLabel ?districtLabel ? | ORDER BY ?regionLabel ?countyLabel ?districtLabel ?residenceLabel | ||
</sparql> | </sparql> | ||
===People | ===People whose residence was at one time in North East England or Yorkshire and the Humber=== | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
# People whose residence was at one time in North East England or Yorkshire and the Humber | |||
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 940: | Line 1,014: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
SELECT ? | SELECT ?resident ?residentLabel ?residenceLabel ?districtLabel ?countyLabel ?regionLabel | ||
WHERE { | |||
?resident bnwdt:P29 ?residence . | |||
?residence bnwdt:P33 ?district . | |||
?district bnwdt:P33 ?county . | |||
SERVICE wikibase:label { | ?county bnwdt:P33 ?region . | ||
{?county bnwdt:P33 bnwd:Q72 .} | |||
UNION | |||
{?county bnwdt:P33 bnwd:Q200 .} | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | |||
} | |||
ORDER BY ?regionLabel ?countyLabel ?districtLabel ?residenceLabel | |||
</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"> | ||
# | # 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 bnwd: <https://beyond-notability.wikibase.cloud/entity/> | ||
Line 965: | Line 1,041: | ||
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: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". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | ||
} | } | ||
ORDER BY ?regionLabel ?countyLabel ?districtLabel ?residentLabel | |||
</sparql> | </sparql> | ||
=== | ===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"> | ||
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 989: | Line 1,073: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
SELECT ? | 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:P4 bnwd:Q12 .} #filter out project team | FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team | ||
?person | ?person bnp:P29/bnps:P29 ?resided. | ||
SERVICE wikibase:label { | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | 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> | ||
=== | ===Places at which women resided, sorted by how many residences all women had at a given village/town/city/London area=== | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
# | # 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 bnwd: <https://beyond-notability.wikibase.cloud/entity/> | ||
Line 1,014: | Line 1,098: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
SELECT ? | SELECT ?residence ?residenceLabel (count(?residence) as ?residence_count) #count number of places at which women lived | ||
WHERE { | WHERE { | ||
?person bnwdt:P3 bnwd:Q3 . # select women | ?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 bnwdt:P29 ?residence . # select residences | ?person bnwdt:P29 ?residence . # select residences | ||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | ||
} | } | ||
GROUP BY ? | GROUP BY ?residence ?residenceLabel | ||
ORDER BY DESC(? | ORDER BY DESC(?residence_count) | ||
</sparql> | </sparql> | ||
=== | ===Districts in which women resided, sorted by how many residences all women had in that district (or equivalent sub-level for non-UK residences)=== | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
# | # 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 bnwd: <https://beyond-notability.wikibase.cloud/entity/> | ||
Line 1,040: | Line 1,122: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
SELECT ? | SELECT ?district ?districtLabel (count(?district) as ?district_count) #count number of districts in which women lived | ||
WHERE { | WHERE { | ||
?person bnwdt:P3 bnwd:Q3 . # select women | ?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 bnwdt:P29 ?residence . # select residences | ?person bnwdt:P29 ?residence . # select residences | ||
?residence bnwdt:P33 ?district . #select districts | ?residence bnwdt:P33 ?district . #select districts | ||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | ||
} | } | ||
GROUP BY ? | GROUP BY ?district ?districtLabel | ||
ORDER BY DESC(? | ORDER BY DESC(?district_count) | ||
</sparql> | </sparql> | ||
===Counties in which women resided, sorted by how many residences all women had in that county=== | |||
<sparql tryit="1"> | <sparql tryit="1"> | ||
# Counties | # 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 bnwd: <https://beyond-notability.wikibase.cloud/entity/> | ||
Line 1,070: | Line 1,150: | ||
WHERE { | WHERE { | ||
?person bnwdt:P3 bnwd:Q3 . # select women | ?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 bnwdt:P29 ?residence . # select residences | ?person bnwdt:P29 ?residence . # select residences | ||
Line 1,081: | Line 1,160: | ||
</sparql> | </sparql> | ||
====Counties of residence for women | ====Counties of residence for women recorded in CAS Indexes of Archaeological Papers, sorted by how many residences all women had in that county==== | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
# Counties of residence for women | # 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 bnwd: <https://beyond-notability.wikibase.cloud/entity/> | ||
Line 1,097: | Line 1,176: | ||
WHERE { | WHERE { | ||
?person bnwdt:P3 bnwd:Q3 . # select women | ?person bnwdt:P3 bnwd:Q3 . # select women | ||
?person bnwdt: | ?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 | FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team | ||
?person bnwdt:P29 ?residence . # select residences | ?person bnwdt:P29 ?residence . # select residences | ||
Line 1,108: | Line 1,187: | ||
</sparql> | </sparql> | ||
====Counties of residence for women | ====Counties of residence for women nominated as FSAs, sorted by how many residences all women had in that county==== | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
# Counties of residence for women | # 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 bnwd: <https://beyond-notability.wikibase.cloud/entity/> | ||
Line 1,124: | Line 1,203: | ||
WHERE { | WHERE { | ||
?person bnwdt:P3 bnwd:Q3 . # select women | ?person bnwdt:P3 bnwd:Q3 . # select women | ||
?person bnwdt: | ?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 | FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team | ||
?person bnwdt:P29 ?residence . # select residences | ?person bnwdt:P29 ?residence . # select residences | ||
Line 1,135: | Line 1,214: | ||
</sparql> | </sparql> | ||
====Counties of residence for women | ====Counties of residence for women nominated to RAI, sorted by how many residences all women had in that county==== | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
# Counties of residence for women | # 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 bnwd: <https://beyond-notability.wikibase.cloud/entity/> | ||
Line 1,151: | Line 1,230: | ||
WHERE { | WHERE { | ||
?person bnwdt:P3 bnwd:Q3 . # select women | ?person bnwdt:P3 bnwd:Q3 . # select women | ||
?person bnwdt: | ?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 | FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team | ||
?person bnwdt:P29 ?residence . # select residences | ?person bnwdt:P29 ?residence . # select residences | ||
Line 1,162: | Line 1,241: | ||
</sparql> | </sparql> | ||
====Counties of residence for women | ====Counties of residence for women who spoke at RAI meetings, sorted by how many residences all women had in that county==== | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
# 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 bnwd: <https://beyond-notability.wikibase.cloud/entity/> | ||
Line 1,174: | Line 1,254: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | 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 | |||
SELECT | |||
WHERE { | WHERE { | ||
?person bnwdt:P3 bnwd:Q3 . # select women | ?person bnwdt:P3 bnwd:Q3 . # select women | ||
?person bnwdt: | ?person bnwdt:P23 bnwd:Q29 . #select women who spoke at RAI Meeting | ||
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 bnwdt:P29 ?residence . # select residences | ?person bnwdt:P29 ?residence . # select residences | ||
?residence bnwdt:P33 ?district . #select districts | ?residence bnwdt:P33 ?district . #select districts | ||
?district bnwdt:P33 ?county . #select counties | ?district bnwdt:P33 ?county . #select counties | ||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | |||
} | } | ||
GROUP BY ?county ?countyLabel | |||
ORDER BY DESC(?county_count) | |||
</sparql> | </sparql> | ||
====Counties of residence for women | ====Counties of residence for women who exhibited at RAI meetings, sorted by how many residences all women had in that county==== | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
# 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 bnwd: <https://beyond-notability.wikibase.cloud/entity/> | ||
Line 1,220: | Line 1,281: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | 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 | |||
SELECT | |||
WHERE { | WHERE { | ||
?person bnwdt:P3 bnwd:Q3 . # select women | ?person bnwdt:P3 bnwd:Q3 . # select women | ||
?person bnwdt: | ?person bnwdt:P13 bnwd:Q29 . #select women who exhibited at RAI Meeting | ||
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 bnwdt:P29 ?residence . # select residences | ?person bnwdt:P29 ?residence . # select residences | ||
?residence bnwdt:P33 ?district . #select districts | ?residence bnwdt:P33 ?district . #select districts | ||
?district bnwdt:P33 ?county . #select counties | ?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) | |||
</sparql> | |||
====Counties of residence for women recorded in CAS Indexes of Archaeological Papers, on a map==== | |||
<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 1,264: | Line 1,308: | ||
#defaultView:Map{"hide":["?geo", "?wikidata"]} | #defaultView:Map{"hide":["?geo", "?wikidata"]} | ||
#title:Counties of residence for women | #title:Counties of residence for women recorded in CAS Indexes of Archaeological Papers | ||
SELECT distinct ?person ?personLabel ?county ?countyLabel ?wikidata ?geo | SELECT distinct ?person ?personLabel ?county ?countyLabel ?wikidata ?geo | ||
WHERE { | WHERE { | ||
?person bnwdt:P3 bnwd:Q3 . # select women | ?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 | FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team | ||
?person bnwdt:P29 ?residence . # select residences | ?person bnwdt:P29 ?residence . # select residences | ||
?residence bnwdt:P33 ?district . #select districts | ?residence bnwdt:P33 ?district . #select districts | ||
Line 1,284: | Line 1,327: | ||
SERVICE <https://query.wikidata.org/sparql> { | SERVICE <https://query.wikidata.org/sparql> { | ||
optional { ?wikidata wdt:P625 ?geo1 . } # geocoords if available | optional { | ||
?wikidata wdt:P625 ?geo1 . | |||
BIND(geof:longitude(?geo1) AS ?long) | |||
BIND(geof:latitude(?geo1) AS ?lat) | |||
} # geocoords if available | |||
} # /wikidata service | } # /wikidata service | ||
} #/wikidata optional | } #/wikidata optional | ||
Line 1,294: | Line 1,341: | ||
</sparql> | </sparql> | ||
==== Counties of residence for women | ====Counties of residence for women nominated as FSAs, on a map==== | ||
<sparql tryit="1"> | <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 1,306: | Line 1,354: | ||
#defaultView:Map{"hide":["?geo", "?wikidata"]} | #defaultView:Map{"hide":["?geo", "?wikidata"]} | ||
#title:Counties of residence for women | #title:Counties of residence for women nominated as FSAs | ||
SELECT distinct ?person ?personLabel ?county ?countyLabel ?wikidata ?geo | SELECT distinct ?person ?personLabel ?county ?countyLabel ?wikidata ?geo | ||
WHERE { | WHERE { | ||
?person bnwdt:P3 bnwd:Q3 . # select women | ?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 | FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team | ||
?person bnwdt:P29 ?residence . # select residences | ?person bnwdt:P29 ?residence . # select residences | ||
Line 1,334: | Line 1,382: | ||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | ||
} | } | ||
</sparql> | |||
==== Counties of residence for women | ==== Counties of residence for women nominated to RAI, on a map ==== | ||
<sparql tryit="1"> | <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 1,351: | Line 1,397: | ||
#defaultView:Map{"hide":["?geo", "?wikidata"]} | #defaultView:Map{"hide":["?geo", "?wikidata"]} | ||
#title:Counties of residence for women nominated to RAI | |||
SELECT distinct ?person ?personLabel ?county ?countyLabel ?wikidata ?geo | SELECT distinct ?person ?personLabel ?county ?countyLabel ?wikidata ?geo | ||
Line 1,356: | Line 1,403: | ||
?person bnwdt:P3 bnwd:Q3 . # select women | ?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 bnwdt: | ?person bnwdt:P7 ?signatory . #select women who were nominated for election to RAI | ||
?person bnwdt:P29 ?residence . # select residences | ?person bnwdt:P29 ?residence . # select residences | ||
Line 1,380: | Line 1,427: | ||
</sparql> | </sparql> | ||
==== Counties of residence for women | ==== Counties of residence for women who spoke at RAI meetings, on a map==== | ||
<sparql tryit="1"> | <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 1,397: | Line 1,438: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
#defaultView:Map{"hide":["?geo", "?wikidata"]} | #defaultView:Map{"hide":["?geo", "?wikidata"]} | ||
#title:Counties of residence for women who spoke at RAI meetings | |||
SELECT distinct | SELECT distinct ?person ?personLabel ?county ?countyLabel ?wikidata ?geo | ||
WHERE { | WHERE { | ||
?person bnwdt:P3 bnwd:Q3 . # select women | ?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 bnwdt:P23 bnwd:Q29 . #select women who spoke at RAI Meeting | |||
?person bnwdt:P29 ?residence . # select residences | ?person bnwdt:P29 ?residence . # select residences | ||
?residence bnwdt:P33 ?district . #select districts | ?residence bnwdt:P33 ?district . #select districts | ||
Line 1,439: | Line 1,458: | ||
SERVICE <https://query.wikidata.org/sparql> { | SERVICE <https://query.wikidata.org/sparql> { | ||
optional { ?wikidata wdt:P625 ?geo1 . } # geocoords if available | optional { ?wikidata wdt:P625 ?geo1 . } # geocoords if available | ||
} # /wikidata service | } # /wikidata service | ||
} #/wikidata optional | } #/wikidata optional | ||
BIND(COALESCE(?geo1, ?geo2) AS ?geo). # if geo1 available use | BIND(COALESCE(?geo1, ?geo2) AS ?geo). # if geo1 available use that, then try geo2 | ||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | ||
} | } | ||
</sparql> | </sparql> | ||
=== | ==== Counties of residence for women who exhibited at RAI meetings, on a map ==== | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
# | #title:Counties of residence for women who exhibited at RAI meetings | ||
PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/> | PREFIX bnwd: <https://beyond-notability.wikibase.cloud/entity/> | ||
Line 1,462: | Line 1,483: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
SELECT ? | #defaultView:Map{"hide":["?geo", "?wikidata"]} | ||
SELECT distinct ?person ?personLabel ?county ?countyLabel ?wikidata ?geo | |||
WHERE { | WHERE { | ||
?person bnwdt:P3 bnwd:Q3 . # select women | ?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 bnwdt:P13 bnwd:Q29 . #select women who exhibited at RAI Meeting | |||
?person bnwdt:P29 ?residence . # select residences | ?person bnwdt:P29 ?residence . # select residences | ||
?residence bnwdt:P33 ?district . #select districts | ?residence bnwdt:P33 ?district . #select districts | ||
?district bnwdt:P33 ?county . #select counties | ?district bnwdt:P33 ?county . #select counties | ||
optional { ?county bnwdt:P153 ?geo2 . } # for geocoords added to BN | |||
optional { | |||
?county bnp:P117 ?ws . # wikidata id P117 | |||
?ws 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> { | |||
optional { ?wikidata wdt:P625 ?geo1 . } # geocoords if available | |||
} # /wikidata service | |||
} #/wikidata optional | |||
BIND(COALESCE(?geo1, ?geo2) AS ?geo). # if geo1 available use that, then try geo2 | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | ||
} | } | ||
</sparql> | </sparql> | ||
==== Counties of residence for women in any of the above five categories, mapped==== | |||
= | <sparql tryit="1"> | ||
## IMPORTANT: LIMITATIONS OF THE MAP | |||
## Only the top category of activity (layer) can be seen when all are selected (the default) | |||
## To see each layer, you need to deselect all in the layers menu (diamond shaped icon, top right corner of the map) and view one layer at a time. Unfortunately this is the only way to compare them at the moment. | |||
## (But I'll look into how I might be able to improve on this) | |||
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 1,492: | Line 1,530: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
#title:Counties of residence for women who were nominated for election or had publications recorded or spoke/exhibited at RAI | |||
#defaultView:Map{"hide":["?geo", "?wikidata"]} | |||
SELECT distinct ?county ?countyLabel ?wikidata ?geo ?layer #?person ?personLabel | |||
WHERE { | WHERE { | ||
?person bnwdt:P3 bnwd:Q3 . # women | ?person bnwdt:P3 bnwd:Q3 . # select women | ||
?person | FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team | ||
{ | |||
#women who were nominated for election to FSA | RAI | |||
# | ?person ( bnp:P16 | bnp:P7 ) ?stmt . | ||
} | |||
? | union | ||
{ | |||
# women with publications recorded in indexes of archaeological papers | |||
?person bnp:P76 ?stmt . | |||
? | ?stmt bnps:P76 bnwd:Q419 . | ||
} | |||
union | |||
{ | |||
# | # women who spoke|exhibited at RAI Meeting | ||
? | ?person (bnp:P23 | bnp:P13) ?stmt . | ||
?stmt (bnps:P23 | bnps:P13) bnwd:Q29 . | |||
} | |||
# get the p labels for layers | |||
?person ?p ?stmt . | |||
?claim wikibase:claim ?p; | |||
rdfs:label ?layer. filter(lang(?layer)="en-gb"). | |||
# get geo stuff | |||
?person bnwdt:P29 ?residence . # select residences | |||
?residence bnwdt:P33 ?district . #select districts | |||
?district bnwdt:P33 ?county . #select counties | |||
optional { ?county bnwdt:P153 ?geo2 . } # for geocoords added to BN | |||
optional { | |||
?county bnp:P117 ?ws . # wikidata id P117 | |||
?ws 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> { | |||
optional { ?wikidata wdt:P625 ?geo1 . } # geocoords if available | |||
} # /wikidata service | |||
} #/wikidata optional | |||
BIND(COALESCE(?geo1, ?geo2) AS ?geo). # if geo1 available use it, if not try geo2 | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | ||
} | } | ||
order by ?layer | |||
</sparql> | |||
===Regions in which women resided, sorted by how many residences all women had in that region=== | |||
<sparql tryit="1"> | |||
# 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) | |||
</sparql> | </sparql> | ||
=== | |||
=== Women living in London during the 1890s === | |||
<sparql tryit="1"> | <sparql tryit="1"> | ||
Line 1,554: | Line 1,625: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
SELECT distinct ?personLabel ?date_label ?date ?person ?address ?address_item ?londonLabel ?geo ?long ?lat | SELECT distinct ?personLabel ?date_label ?date ?person ?address ?address_item ?londonLabel ?geo ?long ?lat | ||
Line 1,600: | Line 1,670: | ||
} | } | ||
ORDER BY ?person ?date | ORDER BY ?person ?date | ||
</sparql> | </sparql> | ||
=== | ==== Map of Women living in 1890s London ==== | ||
<sparql tryit="1"> | <sparql tryit="1"> | ||
# | #title:Women living in 1890s London | ||
# Query for women living in (greater) london in the 1890s | |||
# 1 row per person per address per date, could be reduced to 1 row per person if preferred. | |||
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 1,614: | Line 1,687: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
#defaultView:Map | #defaultView:Map | ||
SELECT distinct ?personLabel ?date_label ?date ?person ?address ?address_item ?londonLabel ?geo ?long ?lat | |||
WHERE { | WHERE { | ||
?person bnwdt:P3 bnwd:Q3 . # | ?person bnwdt:P3 bnwd:Q3 . # women | ||
?person bnp:P29 ?s . # resided at | |||
?s bnps:P29 ?london . | |||
?person bnp: | ?london bnwdt:P33+ bnwd:Q322 . # in Q322 greater london. | ||
# | |||
# optional street address (text) | |||
optional { | |||
?s bnpq:P31 ?address . | |||
} | |||
# optional street address (item) | |||
optional { | |||
?s bnpq:P100 ?address_item . | |||
} | |||
# dates. About 30? not dated. | |||
#optional { | |||
?s ?pq ?date . | |||
# ?date wikibase:timeValue ?date_value. # if you don't want date label this should work instead | |||
?qual_prop wikibase:qualifier ?pq; | |||
wikibase:propertyType wikibase:Time ; # nb excludes edtf dates | |||
rdfs:label ?date_label . filter(lang(?date_label)="en-gb") . # what kind of date is it. | |||
# } # /dates | |||
# filter 1890-1899 | |||
FILTER("1890-01-01"^^xsd:dateTime <= ?date && ?date < "1899-12-31"^^xsd:dateTime). | |||
# address geocoordinates | |||
optional { | |||
?s ?pqq ?geo . | |||
?qual_geo wikibase:qualifier ?pqq; | |||
wikibase:propertyType wikibase:GlobeCoordinate. | |||
BIND(geof:longitude(?geo) AS ?long) | |||
BIND(geof:latitude(?geo) AS ?lat) | |||
} | |||
# todo booth codes | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | ||
} | } | ||
ORDER BY ?person ?date | |||
</sparql> | </sparql> | ||
=== Where did women who published in Folklore/Folk-lore Record live? === | |||
=== | |||
<sparql tryit="1"> | <sparql tryit="1"> | ||
# | # Map of all places of residence for women who had publications in Folklore/Folk-lore Record | ||
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 1,667: | Line 1,746: | ||
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/> | ||
#defaultView:Map | |||
SELECT | #defaultView:Map{"hide":["?geo", "?count"]} | ||
SELECT ?person ?personLabel ?residenceLabel ?residence ?geo (count( ?person) as ?count) #(concat(str(?count), " publication") as ?count_lbl) | |||
WHERE { | 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 . # people with publications listed in indexes of archaeological papers. [262] | |||
?person bnp:P76 ?s . | |||
## works published in P101. folklore / folk-lore record q487 q490 | |||
?s bnpq:P101 ?in . | |||
{?s bnpq:P101 bnwd:Q487 } union { ?s bnpq:P101 bnwd:Q490 . } | |||
# why does above pick up these two journals as well? | |||
FILTER ( ?in not in ( bnwd:Q665 , bnwd:Q636 ) ) . | |||
?person bnwdt:P29 ?residence . | |||
optional { ?residence bnwdt:P153 ?geo2 . } # for geocoords added to BN | |||
optional { | |||
?residence bnp:P117 ?ws . # wikidata id P117 | |||
?ws 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> { | |||
optional {?wikidata wdt:P625 ?geo1 . } # geocoords if available | |||
} # /wikidata service | |||
} #/wikidata optional | |||
BIND(COALESCE(?geo1, ?geo2) AS ?geo). # if geo1 available use that, then try geo2 | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en-gb". } | SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } | ||
} | |||
group by ?person ?personLabel ?residenceLabel ?residence ?geo | |||
ORDER BY ?geo | |||
</sparql> | |||
=== BN people and other things located near Devizes === | |||
<sparql tryit="1"> | |||
## testing use of geof:distance | |||
#title:BN items located within 30 km of Devizes, Wiltshire | |||
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:Map | |||
SELECT distinct ?item ?itemLabel ?locationLabel ?location ?wikidata ?wd_geo ?wd_long ?wd_lat | |||
WHERE { | |||
{?item bnwdt:P29 ?location . } # resided at location | |||
#union | |||
#{?location bnwdt:P12 bnwd:Q2147 .} # OR location has instance of locality. is there a way to get this in the same structure? | |||
union | |||
{?item bnwdt:P2 ?location . } # item has property P2 location | |||
# any other possibles ? | |||
## limit to places in admin territory p33 england q617. (keep numbers down to avoid wikidata timing out) | |||
?location bnwdt:P33+ bnwd:Q617. | |||
?location bnwdt:P117 ?ws . # wikidata id | |||
bind(iri(concat("http://www.wikidata.org/entity/", str(?ws))) as ?wikidata) . | |||
SERVICE <https://query.wikidata.org/sparql> { | |||
wd:Q1026699 wdt:P625 ?start. # devizes coordinates | |||
?wikidata wdt:P625 ?wd_geo . | |||
#BIND(geof:longitude(?wd_geo) AS ?wd_long) . | |||
#BIND(geof:latitude(?wd_geo) AS ?wd_lat) . | |||
FILTER(geof:distance(?wd_geo, ?start) < 30). # < 30 km from ?start. | |||
} # /wikidata service | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en-gb". } | |||
} | } | ||
ORDER BY ?locationLabel | ORDER BY ?locationLabel | ||
Line 1,968: | Line 2,101: | ||
} | } | ||
ORDER BY ?locationLabel | ORDER BY ?locationLabel | ||
</sparql> | |||
=== IWD 2024 Map of five women's places === | |||
<sparql tryit="1"> | |||
## how many places for the five women can I get on a map? a slightly ridiculous query. | |||
#title:Four stories, five women, many places for #IWD2024 | |||
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:Map{"hide":["?geo"],"layer":"?person", "markercluster":true } | |||
SELECT distinct ?person ?personLabel ?propLabel ?placeLabel ?geo ?loc2Label (year(?date) as ?year) | |||
WHERE { | |||
VALUES (?person) {(bnwd:Q894) (bnwd:Q462) (bnwd:Q549) (bnwd:Q921) (bnwd:Q1053) } # | |||
?person ( bnp:P29 | bnp:P94 | bnp:P23 | bnp:P13 | bnp:P120 ) ?s . | |||
?s ( bnps:P29 | bnps:P94 | bnps:P23 | bnps:P13 | bnps:P120 ) ?place . | |||
?person ?p ?s . | |||
?prop wikibase:claim ?p; | |||
wikibase:statementProperty ?ps. | |||
optional { ?s ( bnpq:P1 | bnpq:P27 ) ?date . } | |||
#optional { ?s bnpq:P31 ?street . } | |||
# LOLplaces | |||
#1 geocoords in quals for place itself - should be detailed geo added manually, cf London district geocoords which =main P153 | |||
#2 wikdiata geocoords for place | |||
#3 geocoords in quals for linked place | |||
#4 wikidata geocoords for linked place | |||
#5 wikidata geocoords in place P2 qual | |||
#6 `of` qual geocoords | |||
#7 `of` P2 wikidata geocoords | |||
#8 `of` wikidata geocoords | |||
#9 place main geocoords - likely to be broad london postal districts so should be last resort | |||
#10 linked place main geocoords | |||
optional { ?s bnpq:P153 ?geo1 . } # place has geocoords directly *in qualifier* | |||
optional { ?place bnwdt:P2 ?linked_p1 . # linked place has geocoords *in qualifier* (this is primarily for SAL?) | |||
?linked_p1 bnp:P2 ?llp_s . | |||
?llp_s bnps:P2 ?llp_p1. | |||
?llp_s bnpq:P153 ?geo2 . | |||
} | |||
optional { ?place bnwdt:P117 ?pws . # place has wikidata page that has geoocords (main P625, not anywhere else) | |||
bind(iri(concat("http://www.wikidata.org/entity/", str(?pws))) as ?pwikidata) . | |||
SERVICE <https://query.wikidata.org/sparql> { | |||
?pwikidata wdt:P625 ?geo3 . | |||
} | |||
} | |||
optional { ?place bnwdt:P2 ?linked_p2 . # linked place has wikidata geocoords | |||
?linked_p2 bnwdt:P117 ?lws . # wikidata id P117 | |||
bind(iri(concat("http://www.wikidata.org/entity/", str(?lws))) as ?lwikidata) . | |||
SERVICE <https://query.wikidata.org/sparql> { | |||
?lwikidata wdt:P625 ?geo4 . | |||
} | |||
} | |||
optional { ?s bnpq:P2 ?qp1 . # P2 qualifier location has wikidata geocoords | |||
?qp1 bnwdt:P117 ?qws . | |||
bind(iri(concat("http://www.wikidata.org/entity/", str(?qws))) as ?qwikidata) . | |||
SERVICE <https://query.wikidata.org/sparql> { | |||
?qwikidata wdt:P625 ?geo5 . | |||
} | |||
} | |||
optional { ?s bnpq:P78 ?ofp1 . # 'of' (organisation) has geocoords in P2 qualifier | |||
?ofp1 bnp:P2 ?ofp1_s . | |||
?ofp1_s bnps:P2 ?ofp1_p . | |||
?ofp1_s bnpq:P153 ?geo6 . } | |||
optional { ?s bnpq:P78 ?ofp2 . # 'of' (organisation) P2 location has wikidata geocoords | |||
?ofp2 bnwdt:P2 ?ofp2_p . | |||
?ofp2_p bnwdt:P117 ?ofl2ws . | |||
bind(iri(concat("http://www.wikidata.org/entity/", str(?ofl2ws))) as ?ofl2wikidata) . | |||
SERVICE <https://query.wikidata.org/sparql> { | |||
?ofl2wikidata wdt:P625 ?geo7 . } | |||
} | |||
optional { ?s bnpq:P78 ?ofp3 . # 'of' (organisation) has wikidata geocoords | |||
?ofp3 bnwdt:P117 ?ofpws . # wikidata id P117 | |||
bind(iri(concat("http://www.wikidata.org/entity/", str(?ofpws))) as ?ofpwikidata) . | |||
SERVICE <https://query.wikidata.org/sparql> { | |||
?ofpwikidata wdt:P625 ?geo8 . } | |||
} | |||
optional { ?place bnwdt:P153 ?geo9 . } # main geocoords (mainly london postal districts - should be last resort as v broad.) | |||
optional { ?place bnwdt:P2 ?linked_p10 . # linked place main geocoords | |||
?linked_p10 bnwdt:P153 ?geo10 . | |||
} | |||
BIND(COALESCE(?geo1, ?geo2, ?geo3, ?geo4, ?geo5, ?geo6, ?geo7, ?geo8, ?geo9, ?geo10) AS ?geo). # if geo1 available use that, then geo2, etc, in order of preference | |||
bind(coalesce(?linked_p1, ?linked_p2, ?qp1, ?ofp1, ?ofp2, ?ofp3 ) as ?loc2). # hopefully get extra context where place is just sthg like "meeting". though exactly what will be variable! | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE], en, en-gb". } | |||
} | |||
order by ?personLabel ?date ?placeLabel | |||
</sparql> | </sparql> | ||
Line 3,323: | Line 3,570: | ||
</sparql> | </sparql> | ||
=== One woman === | |||
<sparql tryit="1"> | |||
#title:All About a Woman | |||
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 ?propLabel ?spsLabel ?qual_propLabel ?pqsLabel ?link ?s | |||
# ?main_date ?main_precision ?qual_date ?qual_precision | |||
# ?prop ?sps ?pqs ?pq | |||
WHERE | |||
{ | |||
VALUES (?person) {(bnwd:Q569)} # add (bnwd:Qxxx) if you want more than one person. | |||
?person ?p ?s . | |||
?prop wikibase:claim ?p; | |||
wikibase:statementProperty ?ps; # simple value | |||
wikibase:statementValue ?psv. # full value | |||
# exclude external IDs | |||
# filter not exists { ?prop wikibase:propertyType wikibase:ExternalId . } | |||
?s ?ps ?sps. | |||
# full date via ?psv | |||
OPTIONAL { | |||
?s ?psv ?spsv . | |||
?spsv wikibase:timeValue ?main_date . | |||
?spsv wikibase:timePrecision ?main_precision . | |||
} | |||
# qualifiers. | |||
optional { | |||
?s ?pq ?pqs . | |||
?qual_prop wikibase:qualifier ?pq . | |||
?qual_prop wikibase:qualifierValue ?pqp . | |||
optional { | |||
# full date via ?pqp | |||
?s ?pqp ?qv . | |||
?qv wikibase:timeValue ?qual_date. | |||
?qv wikibase:timePrecision ?qual_precision. | |||
} | |||
} | |||
# direct link to property | |||
BIND (REPLACE(STR(?prop), "^.*/([^/]*)$", "$1") as ?pid). | |||
bind(iri(concat(str(?person), "#", ?pid)) as ?link ) . | |||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en-gb". } | |||
} | |||
order by ?propLabel ?s | |||
</sparql> | |||
===Working with property paths: organisations and locations=== | ===Working with property paths: organisations and locations=== | ||
Line 3,729: | Line 4,042: | ||
</sparql> | </sparql> | ||
=== Women having children === | |||
===Women | |||
<sparql tryit="1"> | <sparql tryit="1"> | ||
#title:women having children | |||
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 3,742: | Line 4,054: | ||
PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | PREFIX bnpq: <https://beyond-notability.wikibase.cloud/prop/qualifier/> | ||
# lol defaultView:Timeline{"hide":["?s", "?date_prec", ""]} | |||
} | |||
# P131 had child in / P45 child | |||
# a handful of P45 named children don't have dob though probably have dob in wikidata | |||
SELECT distinct ?person ?personLabel ?childLabel ?date_value ?date_prec ?had_child_edtf ?note | |||
?s | |||
SELECT distinct ?person ?personLabel | |||
where { | |||
?person bnwdt:P3 bnwd:Q3 . # select women | |||
FILTER NOT EXISTS {?person bnwdt:P4 bnwd:Q12 .} #filter out project team | |||
{ | |||
# had child in (unnamed children) | |||
?person bnp:P131 ?s . | |||
?s bnps:P131 ?had_child_edtf . # keep the edtf date for reference, though i think you can just use the time value/prec with these. | |||
# get dates detail via ?s and psv | |||
# gets edtf dates in std wiki date format | |||
# https://github.com/ProfessionalWiki/WikibaseEdtf | |||
?s ?psv ?wdv . | |||
?wdv wikibase:timeValue ?date_value . | |||
?wdv wikibase:timePrecision ?date_prec . | |||
# filter edtf date. | |||
FILTER ( datatype(?had_child_edtf) = xsd:edtf ) . #shows only the raw EDTF string from the query results | |||
# interesting, when you put this after wikibase:timeValue it seems to get every timey-wimey statement for women who have had child in ? (but only one) | |||
#?person bnwdt:P131 ?had_child . | |||
# not much added in quals for had child. only maybe note P47. some have sourcing circumstances. | |||
optional { ?s bnpq:P47 ?note . } # | |||
} | |||
union | |||
} | |||
{ | { | ||
# named children (are any in both sections??? from dates looks possible a couple might be [wherry / hodgson]) | |||
?person bnp:P45 ?s. | |||
?s bnps:P45 ?child . | |||
optional { ?child bnp:P26 ?ss . | |||
?ss bnps:P26 ?dob . | |||
?ss ?psv ?wdv . | |||
?wdv wikibase:timeValue ?date_value . | |||
?wdv wikibase:timePrecision ?date_prec . | |||
} | |||
} | } | ||
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en,en-gb". } | |||
} | } | ||
order by ?person ?date_value | |||
order by ? | |||
</sparql> | </sparql> |
edits