User:Mr impossible

From Wikidata
Jump to navigation Jump to search

Useful links[edit]

Procedures for property creation

John Cummings' helpful guides

Visualisation[edit]

Entitree is super Wikidata walkabout is not bad


See https://www.wikidata.org/wiki/Wikidata:Tools/Visualize_data Propbrowser etc.

Interesting properties[edit]

ARCHON Number (P3642)[edit]

Mix-and-match

May need to log in to WiDar http://tools.wmflabs.org/widar/

Remember simple stats can be obtained from Property_talk:P3642

UKNAID (P3029)[edit]

Around 50% of person identifiers matched - presumably very few organisations.

"UK National Archives ID" https://www.wikidata.org/wiki/Property_talk:P3029

  • Thousands of incidences (thanks Andrew)
  • all set up to be people or groups of people.

This seems like it could be wrong. E.g. http://discovery.nationalarchives.gov.uk/details/c/F255457 is a manor Are there parishes?

Uses /c prefix

https://www.wikidata.org/wiki/Q325367 shows how this can then link to the below property - here we have a TNA authority files and an 'archives at' property.

  • Mix and match now at:

https://tools.wmflabs.org/mix-n-match/#/catalog/640

Archives at (P485)[edit]

https://www.wikidata.org/wiki/Property:P485

  • 1700 uses - now in excess of 15,000 uses
  • An entity can have 'archives at' a number of different institutions

See all uses: https://www.wikidata.org/wiki/Special:WhatLinksHere/Property:P485

"Inventory number" and weblinks can be added as in this example: https://www.wikidata.org/wiki/Q1512

Theoretically, if we imported Archon and the named entities, we wouldn't need to populate this. It could be called automatically in one slug.

Legacies of British slave ownership ID (P3023)[edit]

Only seem to be about 850 of these - the database contains thousands of entries

https://www.ucl.ac.uk/lbs/

Statues of those represented in the database

SELECT ?statue ?statueLabel WHERE {
  ?statue wdt:P31 wd:Q179700.
  ?statue wdt:P180 ?LOBSOID.
  ?LOBSOID wdt:P3023 ?yp_id.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Legislation.gov.uk ID (P3343)[edit]

https://www.wikidata.org/wiki/Property:P3343

Being used in fewer than 200 items (June 2020). Uses format ukpga/1990/8


SELECT ?law ?lawLabel ?typeLabel WHERE {
   ?law wdt:P3343 ?yp_id .
   OPTIONAL { ?law wdt:P31 ?type }
   SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
   }
 }

Acts tend to not have very well developed properties. https://www.wikidata.org/wiki/Q7830039 is a fuller example, compared to https://www.wikidata.org/wiki/Q7257489

Looks like you could generate 'legal citation of this text' (P1031) from the legislation ID and vice versa.

Example of repealed by property (P2568) https://www.wikidata.org/wiki/Q5937360, https://www.wikidata.org/wiki/Q5493923

Long title and introduced by appear in infoboxes on the wikpedia pages of items like the above. not clear if these are properties. (Linking bills and acts of value??)

In fact, many of these infoboxes include links to LDGU and these could be scraped and added.

In the meantime categories such as https://en.wikipedia.org/wiki/Category:United_Kingdom_Acts_of_Parliament_1946 make it easy to explore pages/entities with missing LDGU identifiers.

APE ID (P7764)[edit]

There used to be very few of these but thousands have now been imported.

See User:Mr_impossible#ARCHON_numbers_matched_with_APE_IDs below. (c.100 matches, August 2020)

Of course what we really need is a query to do the reverse.

This runs APE IDs in the UK (assuming that property is filled):

SELECT ?archive ?archiveLabel ?yp_id ?ape WHERE {
   ?archive wdt:P7764 ?ape.
   ?archive wdt:P17 wd:Q145.
  OPTIONAL {
       ?archive wdt:P3642 ?yp_id .}
   SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
   }
 }

This suggests a lot of not very sensible duplication. E.g. York Explore Archives separate from York Explore, Geological Society Archives separate from the Geological Society.

Ships[edit]

Advanced search for Organisation->Ships in Discovery gives over 4,000 results (there are 7 sub-categories)

Records in NMM or National Museums Liverpool in all three examples.

Wikidata:

(vessel class, cost, significant events, mass, owned by, operator, manufacturer, location of final assembly, powered by, installed capacity, cruise speed, beam, draft, length, height, gross tonnage, speed)

Lloyds Register Foundation

Poor overlap between the information sources.

Passenger lists (catalogued with to/from info) in BT 26, extracted into Refine for 1919.

Archives Hub[edit]

https://tools.wmflabs.org/mix-n-match/?#/catalog/1018

Someone has made a right mess of this, assigning collections to people in not a good way. Probably should intervene. In fact looks like the wikidata property has been deleted (was begun in Feb. 2018)

Manorial Documents Register Hack[edit]

Properties of a Manor[edit]

  • have a parish [may be multiple]
  • coords
  • succession of owners

Has a shape but may be non-contiguous and may be hard to reconstruct (boundaries may also change over time)

'where the majority of the manor lies' - where the demesne is [where the lord's land is] [try to limit to part of parish]

https://www.wikidata.org/wiki/Q2116450 would seem to be a 'manor' in the TNA sense. (Yes: corresponding Wikipedia article https://en.wikipedia.org/wiki/Manor) Our manors use the /c/ extension: http://discovery.nationalarchives.gov.uk/details/c/F274875 (This is the format of P3029) UK example at https://www.wikidata.org/wiki/Q5023984 - Calthorpe in Oxfordshire (Calthorpe oddly is not in the MDR although neighbouring Neithrop is)

Foulbridge is in the MDR and I've added the identifier to the item - https://www.wikidata.org/wiki/Q5474183

VCH ID is at https://www.wikidata.org/wiki/Property:P3628 Could manors be linked in this way?

Take for instance this manor: http://discovery.nationalarchives.gov.uk/details/c/F239978 (Crux Easton)

It's at: https://www.wikidata.org/wiki/Q5190295

with a coordinate location. But data is also linked to at http://www.british-history.ac.uk/vch/hants/vol4/pp311-314 and http://opendomesday.org/place/SU4256/crux-easton/ and http://visionofbritain.org.uk/place/3423

So that's a snapshot in 1066, 1911 and 1870 - and a mix of structured and unstructured data.

A really promising source is http://www.inquisitionspostmortem.ac.uk/view/place/2874423 Has parish, a map location, 'held of'.

Over 4,500 entries for manors. The pain looks like in doing the matching...

Modelling ownership examples[edit]

  • Appleton Wiske Manor (Abbey of St Mary's via creating 'position' and adding a range of 'position helds') - https://www.wikidata.org/wiki/Q105789255
  • Time immemorial concept - not very useful if slavishly used to mean 1189 or whatever. We may have ownership data substantially in advance of that

Possible outcomes / questions[edit]

See Andrew Prescott podcast

Manorial Document types[edit]

  • perambulation of the bounds of the manor
  • terriers list fields [could become treemaps because the size of the plot is given]
  • nice manorial maps in record offices [may be able to match descriptions with maps]

commons - manorial documents category?

Documents about manors vs manorial documents - https://commons.wikimedia.org/wiki/File:Location_map_of_Basset_Domesday_manors.png https://commons.wikimedia.org/wiki/File:Paris_Garden.jpg (https://discovery.nationalarchives.gov.uk/details/c/F239210) https://commons.wikimedia.org/wiki/File:The_agrarian_problem_in_the_sixteenth_century_(1912)_(14783342105).jpg - Whadborough, Leicestershire

Helpful Wikidata edits[edit]

  • Positions (Abbots...) - see [Q66740487]

Data sources[edit]

Specifically manorial[edit]

Scans of manorial/medieval documents[edit]

More generically medieval[edit]

Data to request/locate[edit]

Discovery/image library[edit]

  • SC 8 (c.18k), SC 1 (c.11k items), SC 7 (c.1200 items) metadata
  • Several fine manorial maps (pre-1600) - get printed

Wikidata itself[edit]

  • We will need to describe key data here - e.g. national heritage list for england, images, VCH, Open Domesday, etc.

Viae Regiae / WP:EMEW[edit]

https://www.wikidata.org/wiki/Wikidata:WikiProject_Early_Modern_England_and_Wales

  • Bromyard and East Witton manors (found in Fine Rolls) both in Discovery, neither in Wikidata...

Useful websites[edit]

Relevant papers[edit]

See Larry Poos

SPARQL queries[edit]

Manor estates in UK (England and Wales[edit]

There don't seem to be very many of these and they will all need to be checked.

SELECT ?item ?itemLabel WHERE {
  ?item wdt:P31 wd:Q2116450.
  { ?item wdt:P17 wd:Q25. }
  UNION
  { ?item wdt:P17 wd:Q21. }
  UNION
  { ?item wdt:P17 wd:Q145. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Timeline of abbots of St Mary's Abbey, York[edit]

#defaultView:Timeline
SELECT ?abbot ?abbotLabel ?start ?end WHERE {
  ?abbot p:P39 ?position.
  ?position ps:P39 wd:Q111328784;
    pq:P580 ?start;
    pq:P582 ?end.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Also created for Selby and for the Prior of the Hospital of St John. See https://www.historyofparliamentonline.org/volume/1386-1421/survey/iv-composition-house-lords for abbots attending. St Albans and Waltham clock up a couple of mentions.

Owners of manor estates[edit]


SELECT ?item ?itemLabel ?owner ?ownerLabel WHERE {
  ?item ?prop wd:Q2116450.
  ?item wdt:P17 wd:Q145. 
  ?item wdt:P127 ?owner. 
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Taxonomy terms[edit]

Keep an eye on the visualisation tools - several seem to have stopped returning labels.

But graph builder is still working: https://angryloki.github.io/wikidata-graph-builder/?property=P279&item=Q309&mode=reverse (subclasses of history)

Here's social history in SQUID: https://sqid.toolforge.org/#/view?id=Q908604

(Weirdly wikidata thinks it's a science - humanities is Q80083, fix it?)

Digest list at: https://nationalarchives.gov.uk/accessions/2018/18digests/default.htm

First five terms[edit]

Five initial terms

  1. "Pharmacy and Medicine" - Q11190 (Medicine) - pharmacy is a sub-category of medicine in the LOC taxonomy (https://id.loc.gov/authorities/subjects/sh85083064.html)
  2. London / Scotland / Wales / Ireland [place vs 'history of a place']
      1. BBC, Dewey and others attached to the place - e.g. Q22 Scotland
  3. "Brewing" (vs Brewing Industry - Q11644505)
  4. Labour movement - Q208701 (looks at the right sort of level with https://id.loc.gov/authorities/subjects/sh89000876.html - lots of cross identification)
  5. Education - Q8434

I think, tentatively that documents about London really are about London, the collection of people and buildings in south east england. Whereas documents about brewing are not primarily or directly about the fermentation of yeast but do indeed relate to an industry.

Five more:

  • Art
  • Business - business history (Q471400) vs the concept of 'a business' (Q4830453)
  • Film, media and performing arts
  • Science, technology, engineering and mathematical research
  • Religions (Q9174 - superclass of e.g. Christianity)

How are these terms aligned with commonly used taxonomies such as LOC classifiers/DD and VIAF. What is returned by searching for them?

NARA have started using subject terms but clearly quite haphazardly e.g. https://catalog.archives.gov/id/10640533

What are taxonomy terms doing?[edit]

Are we characterising records, the contents of records, the people represented in records or the study of records? What are people looking for? What terms will be familiar?

  • BAME History [A portmanteau - how many pieces?] UK and international - e.g. Q3244280 'Black Britons' vs the history of (say) the caribbean
  • LGBT history (Q17897 - 1 language only but many related wp articles)
  • Disability (Q12131) - 'disability history' does not seem to have a wikidata entry and probably isn't right anyway

Language shifting[edit]

Scotland https://www.wikidata.org/wiki/Special:EntityData/Q22.json

entity.Q22.labels.[2 letter language code].value

See Python script

Parallel term checking[edit]

What's the Q for an LOC subject term?

SELECT ?item ?itemLabel
WHERE
{
	?item wdt:P244 "sh85058807".
	SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

API Queries[edit]

JSON for Crux Easton: https://www.wikidata.org/wiki/Special:EntityData/Q5190295.json

SPARQL Queries[edit]

https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries [v good documentation]

http://wdq.wmflabs.org/api?q=claim[31:15303967]

- test query: should return (instances of) (national archives)

Or use https://query.wikidata.org

Archives[edit]

Instances of national archives[edit]

#Natarchives
SELECT ?item ?itemLabel
WHERE
{
	?item wdt:P31 wd:Q15303967 .
	SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

(But I'm having trouble with more than 1 property!)

Images for items that are instances of 'archives'[edit]

Archives

#defaultView:ImageGrid
SELECT ?item ?itemLabel ?pic
WHERE
{
	?item ?prop wd:Q166118 . 
	OPTIONAL {
		?item wdt:P18 ?pic
	} 
	SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

ARCHON identifiers

#defaultView:ImageGrid
SELECT ?item ?itemLabel ?pic
WHERE
{
	?item wdt:P3642 ?yp_id. 
	OPTIONAL {
		?item wdt:P18 ?pic
	} 
	SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

Archives on a map[edit]

Archives

#defaultView:Map
SELECT ?instance_of ?coordinate_location WHERE {
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
  
  ?instance_of wdt:P31 wd:Q166118.
  OPTIONAL { ?instance_of wdt:P625 ?coordinate_location. }
}

ARCHON identifiers

#defaultView:Map
SELECT ?archive ?archiveLabel ?location WHERE {
   ?archive wdt:P3642 ?yp_id .
   ?archive wdt:P625 ?location
   SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
   }
 }

Items with an ARCHON code with a Wikipedia article by language Wikipedia[edit]

SELECT ?lang (COUNT(DISTINCT ?item) AS ?count) WHERE {

  ?item wdt:P3642 ?yp_id .     # ARCHON code
  ?article schema:about ?item .
  FILTER (SUBSTR(str(?article), 11, 15) = ".wikipedia.org/") .
  ?article schema:inLanguage ?lang .

} GROUP BY ?lang
ORDER BY DESC (?count)

Items with an ARCHON code by other identifier[edit]

SELECT ?prop ?propLabel ?count WHERE {
    {
        SELECT ?prop (COUNT(DISTINCT ?item) AS ?count) WHERE {
           
           hint:Query hint:optimizer "None" .
           ?item wdt:P3642 ?yp_id .
           ?item ?p ?id .
           ?prop wikibase:directClaim ?p .
           {?prop wdt:P31 wd:Q18614948} # authority controls
          UNION
           {?prop wdt:P31 wd:Q19847637} # unique identifiers
          UNION
           {?prop wdt:P31 wd:Q21745557} # organisations
                   
        }  GROUP BY ?prop
    }
           
    SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .
    }

} ORDER BY DESC (?count)

Union of three types - seems to cover most cases.

This can also be run on P3029 to give a breakdown of how many TNA authorities have been matched to others (over 6000 VIAF matches so far)

What is each archive? (P31)[edit]

What everything with an Archon code is an instance of:

SELECT ?archive ?archiveLabel ?type ?typeLabel WHERE {
   ?archive wdt:P3642 ?yp_id .
   ?archive wdt:P31 ?type
   SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
   }
 }

And the breakdown by type:

SELECT ?type ?typeLabel (COUNT(?subject) AS ?countSubject) WHERE {
  { SELECT DISTINCT ?subject ?type
    WHERE {
      ?subject wdt:P3642 ?object .
      ?subject wdt:P31 ?type
    } 
  
  }
  
     SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .
       }

} GROUP BY ?type ?typeLabel ORDER BY DESC(?countSubject)

The logical extension of this second query is to write new queries listing, say, the instances of archives which are Q43229 (organisations) so that this rather meaningless category can be disambiguated:

SELECT ?archive ?archiveLabel WHERE {
   ?archive wdt:P3642 ?yp_id .
   ?archive wdt:P31 wd:Q43229
   SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
   }
 }

What is the Twitter name of each archive? How do councils use Twitter?[edit]

SELECT ?archive ?archiveLabel ?twitter ?followers WHERE {
   ?archive wdt:P3642 ?yp_id .
   ?archive wdt:P2002 ?twitter .
   ?archive wdt:P8687 ?followers
   SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
   }
} ORDER BY DESC (?followers)

Can be used to cross reference other kinds of identifier like Google Arts and Culture IDs (P4702)

URLs of all ARCHON archives which are instances of regimental museums[edit]

SELECT ?archive ?archiveLabel ?url WHERE {
  ?archive wdt:P3642 ?yp_id.
  ?archive wdt:P31 wd:Q7308408.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
  
  OPTIONAL { ?archive wdt:P856 ?url. }
}

Add additional columns to these (marginally!) more complex queries.

ARCHON numbers matched with APE IDs[edit]


SELECT ?archive ?archiveLabel ?yp_id ?ape WHERE {
   ?archive wdt:P3642 ?yp_id .
   ?archive wdt:P7764 ?ape
   SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
   }
 }

Not that many yet, by the looks of things

Turn ARCHON code into Q[edit]

SELECT ?item ?itemLabel ?ARCHONid
WHERE
{
	?item wdt:P3642 "3432".
    ?item wdt:P3642 ?ARCHONid

	SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

People/Creators[edit]

Images of women linked to TNA authority files[edit]

#defaultView:ImageGrid
SELECT ?item ?itemLabel ?pic
WHERE
{
	?item wdt:P3029 ?yp_id.
    ?item wdt:P21 wd:Q6581072
	OPTIONAL {
		?item wdt:P18 ?pic
	} 
	SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

Andrew Grey's patented TNA/NRA authority file duplicate finder[edit]

SELECT DISTINCT ?item ?itemLabel ?count ?sample1  ?sample2  ?exception
WHERE
{
	{
		SELECT ?item (COUNT(?value) AS ?count) (MIN(?value) AS ?sample1) (MAX(?value) AS ?sample2) {
			?item wdt:P3029 ?val .
			OPTIONAL { wd:P3029 wdt:P1630 ?formatter } .
			BIND( IF( BOUND( ?formatter ), URI( REPLACE( ?formatter, '\\$1', ?val ) ), ?val ) AS ?value ) .
		} GROUP BY ?item HAVING ( ?count > 1 ) LIMIT 100
	} .
	OPTIONAL {
		wd:P3029 p:P2302 [ ps:P2302 wd:Q19474404; pq:P2303 ?exc ] .
		FILTER( ?exc = ?item ) .
	} .
	BIND( BOUND( ?exc ) AS ?exception ) .
	SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } .
}
ORDER BY DESC(?count)

List of TNA ids with Wikidata equivalents[edit]

SELECT ?item ?itemLabel ?TNAid
WHERE
{
	?item wdt:P3029 ?yp_id.
    ?item wdt:P3029 ?TNAid

	SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

This of course allows comparison with other id's, e.g. P4248 - who in our list of authority files was in the German list for liquidation in 1940/1

Can also be used to produce dual lists of two kinds of ID:

SELECT ?item ?itemLabel ?DNBid ?TNAid WHERE {
  ?item wdt:P3029 ?yp_id;
    wdt:P1415 ?DNBid.
  ?item wdt:P3029 ?TNAid.
  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Turn TNA ref into a Q[edit]

This is for Margaret Thatcher (who is duplicated so currently returns two results)

SELECT ?item ?itemLabel ?TNAid
WHERE
{
	?item wdt:P3029 "F43945".
    ?item wdt:P3029 ?TNAid

	SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}

URL for the query: https://query.wikidata.org/#SELECT%20%3Fitem%20%3FitemLabel%20%3FTNAid%0AWHERE%0A%7B%0A%09%3Fitem%20wdt%3AP3029%20%22F43945%22.%0A%20%20%20%20%3Fitem%20wdt%3AP3029%20%3FTNAid%0A%0A%09SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%7D%0A%7D

Same query giving results as JSON: https://query.wikidata.org/sparql?format=JSON&query=SELECT%20%3Fitem%20%3FitemLabel%20%3FTNAid%0AWHERE%0A%7B%0A%09%3Fitem%20wdt%3AP3029%20%22F43945%22.%0A%20%20%20%20%3Fitem%20wdt%3AP3029%20%3FTNAid%0A%0A%09SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20%7D%0A%7D

TNA authority files who are footballers[edit]

SELECT ?item ?itemLabel WHERE {
  ?item wdt:P3029 ?yp_id.
  ?item wdt:P106 wd:Q937857.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Returns 31 hits to 12 from http://discovery.nationalarchives.gov.uk/results/c?_srt=5&_q=football&_naet=P

Interesting to look at the differences - who is not on which list and why. TNA list includes 2 Rugby players ("rugby football") and omits people who might be known for other things - like William Bromley-Davenport - to us an MP. On the other hand Jack Lymer is too obscure to be on the Wikidata list. So far...

Cabinet Ministers[edit]

SELECT ?role ?roleLabel ?start ?end WHERE {
  ?role wdt:P31 wd:Q5.
  ?role p:P39 ?position_held_statement.
  ?position_held_statement ps:P39 wd:Q622568.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
  OPTIONAL { ?position_held_statement pq:P580 ?start. }
  OPTIONAL { ?position_held_statement pq:P582 ?end. }
}
ORDER BY ?start

Arranged by date but the dates are optional so entries missing them are also included.

To do Health Secretary requires more complexity (as would the above if you wanted to link it to Defence)

SELECT ?role ?roleLabel ?start ?end WHERE {
  ?role wdt:P31 wd:Q5.
  ?role p:P39 ?position_held_statement.
  {?position_held_statement ps:P39 wd:Q3397406.} # Health Secretary
  UNION
  {?position_held_statement ps:P39 wd:Q47118657.} # New Health and Social Care Secretary
  UNION
  {?position_held_statement ps:P39 wd:Q4122328.} # Health and Social Services
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
  OPTIONAL { ?position_held_statement pq:P580 ?start. }
  OPTIONAL { ?position_held_statement pq:P582 ?end. }
}
ORDER BY ?start

Romanians with NRA records[edit]

Uses 'country of citizenship' field.

SELECT ?item ?itemLabel WHERE {
  ?item wdt:P3029 ?yp_id.
  ?item wdt:P27 wd:Q218.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

We have (currently matched...) 44 Swedes, 7 Romanians, 354 French, 23 Nigerians, 26 Italians (including the performance artist 'Franko B'), 340 Germans, 6 Norwegians, 20 Spaniards 49 Indians [but 86 more under 'British Raj' Q129286), 4 Pakistanis, 139 Canadians, 636 Americans, 123 South Africans, 208 Australians, 24 Russians (across Q34266 and Q159)

A breakdown can be obtained via:

SELECT ?type ?typeLabel (COUNT(?subject) AS ?countSubject) WHERE {
  { SELECT DISTINCT ?subject ?type
    WHERE {
      ?subject wdt:P3029 ?object .
      ?subject wdt:P27 ?type
    } 
  
  }
  
     SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .
       }

} GROUP BY ?type ?typeLabel ORDER BY DESC(?countSubject)

Collections[edit]

What kinds of claims can we make about manuscripts? (e.g. Domesday Book)

  • Inception/creation P571 (see example date-based queries)
  • Exhibition history (P608) - what exhibitions does Wikidata know about?
  • What manuscripts are not written on parchment? - in fact what are all the possible materials for manuscripts/paintings? (Counts??)

What kinds of claims can we make about paintings?

  • Use of 'archives at' property for non-humans [or rather objects - orgs are fine]
  • Visualise document types (sub-categories) in squidoo or

Sum of all paintings

11th century manuscripts[edit]

Images

#defaultView:ImageGrid
SELECT ?item ?pic WHERE {
  ?item wdt:P31 wd:Q87167.
  OPTIONAL { ?item wdt:P18 ?pic. }
  ?item wdt:P571 ?inception.
  FILTER((?inception >= "1000-01-01T00:00:00Z"^^xsd:dateTime) && (?inception <= "1099-12-31T00:00:00Z"^^xsd:dateTime))
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

List

SELECT ?item ?itemLabel ?collectionLabel WHERE {
  ?item wdt:P31 wd:Q87167.
  ?item wdt:P571 ?inception.
  FILTER((?inception >= "1000-01-01T00:00:00Z"^^xsd:dateTime) && (?inception <= "1099-12-31T00:00:00Z"^^xsd:dateTime))
  OPTIONAL { ?item wdt:P195 ?collection. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

What is in TNA? (P195)[edit]

SELECT ?item ?itemLabel ?descriptionLabel
WHERE {
  ?item wdt:P195 wd:Q392703;
    wdt:P31 ?description.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Add some other objects using the Wikipedia category. What are they instances of? What other properties do they have?

  • What is in collections in Scotland/Cornwall?
SELECT DISTINCT ?item ?itemLabel ?locationLabel ?pic
WHERE {
  ?item wdt:P195 ?location.
  ?location wdt:P131 wd:Q23148.
  OPTIONAL { ?item wdt:P18 ?pic. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

This does Cornwall. (UK is also possible - i.e. it runs). Would be interesting to generate counts county by county.

What materials are manuscripts made from?[edit]

SELECT ?material ?materialLabel (COUNT(?manuscript) AS ?countManuscript) WHERE {
  { SELECT DISTINCT ?manuscript ?material
    WHERE {
      ?manuscript wdt:P31 wd:Q87167.
      ?manuscript wdt:P186 ?material. # 'material used' ... bit vague??
    } 
  }
SERVICE wikibase:label { bd:serviceParam wikibase:language "en" .}
  
} GROUP BY ?material ?materialLabel 
ORDER BY DESC(?countManuscript)

Doesn't easily distinguish between the medium and the (?)material.

Are more Italian or French paintings painted on poplar wood?[edit]

Instances of paintings where the medium used includes poplar wood.

SELECT ?painting ?paintingLabel ?originLabel WHERE {
  ?painting wdt:P31 wd:Q3305213.
  ?painting wdt:P186 wd:Q291034.
OPTIONAL {?painting wdt:P495 ?origin.}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en", "fr", "de". }
}

Gives results in three languages to cover the fact that not all the paintings have English labels. This shows that almost none of these paintings give country of origin so to answer the question we would probably need to look at the nationality of the artist??

SELECT ?painting ?paintingLabel ?originLabel WHERE {
  ?painting wdt:P31 wd:Q3305213.
  ?painting wdt:P186 wd:Q291034.
  ?painting wdt:P170 ?painter.
  ?painter wdt:P19 ?birthplace.
  ?birthplace wdt:P17 wd:Q142. #Italy is Q38
OPTIONAL {?painting wdt:P495 ?origin.}
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en", "fr", "de". }
}

A more sophisticated query would be a union of different country entities in different time periods

Paintings depicting ships[edit]

#defaultView:ImageGrid
SELECT ?painting ?paintingLabel ?pic WHERE {
  ?painting wdt:P31 wd:Q3305213. # paintings
  ?painting wdt:P180 wd:Q35872. # that depict boats
  OPTIONAL { ?painting wdt:P18 ?pic. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Possible to do this for paintings of botanical specimens?

Paintings depicting characters from Shakespeare[edit]

Paintings which depict (P180) entities who have a creator (P170) who is Shakespeare (Q692)

#defaultView:ImageGrid
SELECT ?painting ?paintingLabel ?pic WHERE {
  ?painting wdt:P31 wd:Q3305213. # paintings
  ?painting wdt:P180 ?character.
  ?character wdt:P170 wd:Q692.
  OPTIONAL { ?painting wdt:P18 ?pic. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

What manuscripts are currently missing collections information?[edit]

SELECT ?manuscript ?manuscriptLabel
WHERE
{
    ?manuscript wdt:P31 wd:Q87167.
    MINUS { ?manuscript wdt:P195 [] } .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
ORDER BY ?manuscriptLabel

3475 at the mo (May 2020)

Can also do this for paintings (by artist)

#defaultView:ImageGrid
SELECT ?painting ?paintingLabel ?pic WHERE {
  ?painting wdt:P31 wd:Q3305213;
    wdt:P18 ?pic;
    wdt:P170 wd:Q212754.
  MINUS { ?painting wdt:P195 _:b0. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Items without English Wikipedia entries from a given collection[edit]

SELECT ?item ?itemLabel ?count WHERE {
{
  SELECT ?item (COUNT(?sitelink) AS ?count) WHERE { 
  ?item wdt:P195 wd:Q82133. #Bodleian
  ?sitelink schema:about ?item .
  FILTER NOT EXISTS {
    ?article schema:about ?item .
    ?article schema:isPartOf <https://en.wikipedia.org/> . #Targeting Wikipedia language where subjects has no article.
  }
  } GROUP BY ?item 
ORDER BY DESC (?count) 
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
} ORDER BY DESC (?count)

Attempts to run this regionally (even when heavily limited in terms of both results and geography) seem to time out.

Towards a national collection[edit]

What collections in the UK have items in Wikidata?

SELECT ?collection ?collectionLabel (COUNT(DISTINCT ?item) AS ?count) WHERE {

  ?item wdt:P195 ?collection .    
  ?collection wdt:P131 ?country .
  ?country wdt:P17 wd:Q145.

  SERVICE wikibase:label {bd:serviceParam wikibase:language "en" . }
} GROUP BY ?collection ?collectionLabel

ORDER BY DESC (?count)

We can see from the below query that most UK GLAMs (certainly museums and archives) have the country field filled in:

SELECT ?collection ?collectionLabel WHERE {
  ?collection (wdt:P31/(wdt:P279*)) wd:Q1030034.
  MINUS { ?collection wdt:P17 _:b6. }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY (?collectionLabel)

We can then run queries on the individual collections (or a union of them) to see what the items actually consist of.

Local Authorities[edit]

How do local authorities use Twitter?[edit]

SELECT ?council ?councilLabel ?twitter ?followers WHERE {
  # This is two of five kinds of council. County councils, district councils and London boroughs are the other three
   {?council wdt:P31 wd:Q21561328 .} # English unitary authority council
  UNION
  {?council wdt:P31 wd:Q19414242 .} # English metropolitan district council
  OPTIONAL {
   # ?council wdt:P1001 ?jurisdiction . From jurisdiction population can be got
   ?council wdt:P2002 ?twitter .
   ?council wdt:P8687 ?followers
            }
   SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
   }
 } ORDER BY (?councilLabel)

Schematics of councillors by party[edit]

#defaultView:ImageGrid
SELECT ?council ?councilLabel ?schematic WHERE {
  # This is two of five kinds of council. County councils, district councils and London boroughs are the other three
   {?council wdt:P31 wd:Q21561328 .} # English unitary authority council
  UNION
  {?council wdt:P31 wd:Q19414242 .} # English metropolitan district council
  OPTIONAL {
   # ?council wdt:P1001 ?jurisdiction . From jurisdiction population can be got
   ?council wdt:P5555 ?schematic .
            }
   SERVICE wikibase:label {
    bd:serviceParam wikibase:language "en" .
   }
 } ORDER BY (?councilLabel)

Queries to do[edit]

  • Query to find which institutions have more than 1 archon number attached
  • Who held particular positions on particular dates? [e.g. return main cabinet posts for a given year]
  • Subsidiaries of the University of Cambridge with/without archon numbers
  • TNA authorities who were compensated for slavery
  • Articles on items in UK collections not available in English - e.g. Q77813972
  • Acts of UK Parliament (Q4677783) without a legislation.gov.uk ID

Bisociations[edit]

Clubs and Societies[edit]

(e.g. Travellers, Beefsteak, Carlton, Athenaeum, Special Forces) - See https://www.wikidata.org/wiki/Q492221

Or Fabian Society (Q192186) other political groupings

Travellers Club has only small number of members (https://www.wikidata.org/wiki/Special:WhatLinksHere/Q492221) Beefsteak has even fewer (https://www.wikidata.org/wiki/Special:WhatLinksHere/Q4879775) Carlton has a short list (https://www.wikidata.org/wiki/Special:WhatLinksHere/Q4879775)

Athenaeum has the most developed list of claims and slightly more members listed: https://www.wikidata.org/wiki/Special:WhatLinksHere/Q492758

This query looks at other membership of members of the Travellers Club:

SELECT ?type ?typeLabel (COUNT(?subject) AS ?countSubject) WHERE {
  { SELECT DISTINCT ?subject ?type
    WHERE {
      ?subject wdt:P463 wd:Q492221 .
      ?subject wdt:P463 ?type
    } 
  
  }
  
     SERVICE wikibase:label {
        bd:serviceParam wikibase:language "en" .
       }

} GROUP BY ?type ?typeLabel ORDER BY DESC(?countSubject)

You start to see interesting international overlaps and probabilistic associations (members of the royal society are more likely to be members [this is probably a data artifact since complete RS data seems to be available]). These probably also apply based on political leanings and negatively (members of x are seldom members of y). The same sort of query could be run to look at the occupations of members.

Who else was imprisoned in Reading Gaol?[edit]

Reading Gaol is a record creator (https://discovery.nationalarchives.gov.uk/details/c/F109324) with no current link to Oscar Wilde.

P2632 is place of detention. HM Prison Reading is Q3930959

SELECT ?item ?itemLabel WHERE {
  ?item wdt:P2632 wd:Q3930959.
  ?item wdt:P31 wd:Q5.
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

Now gives a princely two hits, as does the Clink (Q7723415)