Project:SPARQL/starters

From Beyond Notability

Place and Time

Where people lived and when

One way into the data is through the locations people lived in and when they lived there. This query does that for London in the the 1890s but could be adapted (on lines 17 and 30) to look for other places - or regions - and different dates.

# 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 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 ?personLabel ?residenceLabel ?date_label ?date ?person ?residence 

WHERE {  
  ?person bnwdt:P3 bnwd:Q3 . # women
  ?person bnp:P29 ?s .   # resided at
    ?s bnps:P29 ?residence . 
      ?residence bnwdt:P33+ bnwd:Q322 .  # in Q322 greater london. 
    
  # 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).
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en-gb". } 
}
ORDER BY ?person ?date

Try it!


Organisational connections

Counting women members

This query returns organisations which had women as members, and the number of women in our dataset who were members of those organisations. As such it is a relatively straightforward query. The power of running this query across linked data, however, is in following the links to an organisation of interest (perhaps because they are ranked surprisingly high or low in our data) and then seeing who were members of that organisation by hitting the 'What Links Here' link on the organisation item page.

# 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)

Try it!


Nodes in networks

Who was working to advance women in the field

Faced with lots of data it can be hard to see the people that mattered, the apparent pockets of influence, the nodes in the network. This simple query makes a start at that, returning people who signed nominations for women to be elected as Fellows of the Society of Antiquaries of London based on their personal knowledge of the individual, their good standing, their expertise, etc. And whilst the results of the query need interpreting against other evidence, it provides points of entry, ways of thinking about who was doing the labour of getting women's work recognised at a national level.

# 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)

Try it!