Mr impossible
Useful links
edit- https://tools.wmflabs.org/mix-n-match/ and crucially https://tools.wmflabs.org/mix-n-match/import.php - manual https://meta.wikimedia.org/wiki/Mix%27n%27match/Manual
- https://tools.wmflabs.org/wikidata-todo/beacon.php
- https://tools.wmflabs.org/wikidata-todo/quick_statements.php [Add statements via TSV files]
Procedures for property creation
John Cummings' helpful guides
Visualisation
editEntitree is super Wikidata walkabout is not bad
- https://tools.wmflabs.org/sqid/#/view?id=Q166118 - Archive in SQUID (note subclasses)
- Archive in Graph Builder (force directed graph) - https://angryloki.github.io/wikidata-graph-builder/?property=P279&item=Q166118&mode=reverse
- Property tree (list - hierarchy clear) - https://tools.wmflabs.org/wikidata-todo/tree.html?q=7075&rp=279
- Star visualisation (pretty) - https://tools.wmflabs.org/wikidata-todo/tree.html?q=166118&rp=279&method=d3
See https://www.wikidata.org/wiki/Wikidata:Tools/Visualize_data Propbrowser etc.
Interesting properties
editARCHON Number (P3642)
edit- https://www.wikidata.org/wiki/Wikidata:Property_proposal/ARCHON_number
- https://www.wikidata.org/wiki/Property:P3642
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)
editAround 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)
edithttps://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)
editOnly seem to be about 850 of these - the database contains thousands of entries
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)
edithttps://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)
editThere 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
editAdvanced search for Organisation->Ships in Discovery gives over 4,000 results (there are 7 sub-categories)
- HMS Falmouth (1814) (naval vessel) - https://discovery.nationalarchives.gov.uk/details/c/F133146
- SS Titanic (1912) (merchant vessel - is this right?) - https://discovery.nationalarchives.gov.uk/details/c/F97332
- Earl of Liverpool (slave ship) - https://discovery.nationalarchives.gov.uk/details/c/F212775
- SS Bokhara - https://discovery.nationalarchives.gov.uk/details/c/F98584
Records in NMM or National Museums Liverpool in all three examples.
Wikidata:
- RMS Titanic - https://www.wikidata.org/wiki/Q25173
(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)
- HMS Falmouth - disambiguation https://en.wikipedia.org/wiki/HMS_Falmouth,
- RMS Mauretania - https://www.wikidata.org/wiki/Q741803
- SS Bokhara - https://www.wikidata.org/wiki/Q891219
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
edithttps://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
editProperties 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- reconstruction of family holdings
- reconstruction/comparison of monastic vs diocesan holdings
- manors with dragons (https://en.wikisource.org/wiki/Notes_on_the_folk-lore_of_the_northern_counties_of_England_and_the_borders/Chapter_8)
- development/investment/activity in manors - bridges, markets, fairs
- change of ownership
- clustering/density
- urban/rural divide??
- Use surveys to produce shape files (as a tool, that's a possible hack)
- manors granted to templars/hospitallers?
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
editSpecifically manorial
edit- The Manorial Documents Register itself (via Discovery and Wikidata)
- Manorial authority files - currently in Sharepoint
- English Monastic Database - On event Github. Connects manors with monasteries but needs disambiguating
- Inquisitions PM (see e.g. Atherstone - http://www.inquisitionspostmortem.ac.uk/view/place/882211)
- Open Domesday (see e.g. Atherstone - https://opendomesday.org/place/SP3097/atherstone/) - API at https://opendomesday.org/api/ - will return manors for a given hundred and manors near a given lat/lon
- Victoria County History (e.g. https://www.british-history.ac.uk/vch/hants/vol4/pp311-314#h3-0002) and via Wikidata
Scans of manorial/medieval documents
edit- Conisbrough Court Rolls (https://www.dhi.ac.uk/conisbrough/) - also semi-structured. Quite a bit of cleaning and scraping needed. Has 1324/5, 1349/50, 1380/1, 1480-6, 1536)
- Wakefield Court Rolls (https://archive.org/details/yorkshirearchaeologicalandhistoricalsociety?sort=titleSorter&and[]%20=firstTitle:W), downloadable as plaintext (1331-3, 1338-40, 1348-52 (2 vols), 1433-6, 1537-40) - would need conversion to structured data
- More Wakefield court rolls (https://sourcebooks.fordham.edu/source/1274wakefield-courtrolls.asp) - covers 1274-97. Needs work.
- Commons Images (https://commons.wikimedia.org/wiki/Category:Manors_in_England) - could map the manor based off the location data of the pics??
- Cumbrian manorial documents - explains types, scans with commentary rather than transcription
- BL catalogue of medieval manuscripts
More generically medieval
edit- Fine Rolls (https://finerollshenry3.org.uk/home.html) - loads of manorial references, markets, fairs and changes in ownership
- York Archbishop's Registers (https://archbishopsregisters.york.ac.uk/home_page/index) - lots of interesting manorial references, grants, sales, attacks etc.
- Medieval bridges dataset (https://archaeologydataservice.ac.uk/archives/view/medbridges_lt_2019/)
- England's immigrants - on event github
- Taxatio (clerical taxation) - https://www.dhi.ac.uk/taxatio/
- Gazeteer of markets and fairs (https://archives.history.ac.uk/gazetteer/gazweb2.html) - for Wales see https://twitter.com/docuracy/status/1419924734721073161
- Plague outbreaks (european dataset, lat longs) - downloaded
Data to request/locate
edit- Itinerary of King John (https://neolography.com/timelines/JohnItinerary.html) - would need download, unclear if manors referenced/coded
- Deserted Medieval Villages (http://www.dmvhull.org/ukMap.cfm) - Hull. Request data? (Scrapeable) - how much in Wikidata already? - roughly 250 items link to https://www.wikidata.org/wiki/Q21751582 but they look quite mixed
- ? Slavin's livestock database (Stirling)
- ? 'Manorial Accounts database'
- ? Campbell's medieval crop yields database [but cropyields.ac.uk seems to be broken]
- ? 'Early modern probate inventories database'
- ? 1381 project (http://www.1381.online/)
- ??land registry - theoretically have plots of manors for registration of manorial rights
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
edithttps://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- Ewyas Lacy - some docs, example of non-contiguous boundaries at http://www.ewyaslacy.org.uk/-/Research-paper-Boundary-of-the-Manor-of-Ewyas-Lacy/1566-1705/nw_ewy_3006
- Tinsley Court Rolls project - http://www.historymatters.group.shef.ac.uk/tinsley-rolls-revealing-sheffields-medieval/ - where is this database?
- nottingham university - manorial research guidance - types with examples at https://www.nottingham.ac.uk/manuscriptsandspecialcollections/researchguidance/manorial/types.aspx
Relevant papers
editSee Larry Poos
SPARQL queries
editManor estates in UK (England and Wales
editThere 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
editSELECT ?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
editKeep 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
editFive initial terms
- "Pharmacy and Medicine" - Q11190 (Medicine) - pharmacy is a sub-category of medicine in the LOC taxonomy (https://id.loc.gov/authorities/subjects/sh85083064.html)
- London / Scotland / Wales / Ireland [place vs 'history of a place']
- BBC, Dewey and others attached to the place - e.g. Q22 Scotland
- "Brewing" (vs Brewing Industry - Q11644505)
- BBC (P1617) also thinks this is an important distinction - https://www.bbc.co.uk/things/130e3fdc-f130-4b5d-b7be-accdc8648454 vs https://www.bbc.co.uk/things/246a5b37-5746-4761-9ca2-88b17c6168fa
- LCSH (P244) at https://id.loc.gov/authorities/subjects/sh85016778.html - is this right or has the National Diet Library screwed up? [it is right but the definition is weak]
- Clear it's a sub of Q4899370 which might be a better level for us
- Labour movement - Q208701 (looks at the right sort of level with https://id.loc.gov/authorities/subjects/sh89000876.html - lots of cross identification)
- 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?
editAre 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
editScotland https://www.wikidata.org/wiki/Special:EntityData/Q22.json
entity.Q22.labels.[2 letter language code].value
See Python script
Parallel term checking
editWhat'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
editJSON for Crux Easton: https://www.wikidata.org/wiki/Special:EntityData/Q5190295.json
SPARQL Queries
edithttps://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
editInstances 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'
editArchives
#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
editArchives
#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
editSELECT ?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
editSELECT ?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)
editWhat 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?
editSELECT ?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
editSELECT ?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
editSELECT ?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
editSELECT ?item ?itemLabel ?ARCHONid WHERE { ?item wdt:P3642 "3432". ?item wdt:P3642 ?ARCHONid SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } }
People/Creators
editImages 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
editSELECT 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
editSELECT ?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
editThis 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" } }
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
editSELECT ?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
editSELECT ?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
editUses '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
editWhat 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
11th century manuscripts
editImages
#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)
editSELECT ?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?
editSELECT ?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?
editInstances 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
editPaintings 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?
editSELECT ?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
editSELECT ?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
editWhat 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
editHow do local authorities use Twitter?
editSELECT ?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
editClubs 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?
editReading 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)