User:MartinPoulter/queries/khalili
Overview queries
editGraph visualisation of the entire Khalili data set
editSELECT ?item1 ?image ?item1Label ?item2 ?image2 ?item2Label ?edgeLabel
WITH { SELECT ?item1 WHERE {
?item1 wdt:P195?/wdt:P361? wd:Q63160499
} } AS %item1
WITH {SELECT (?item1 AS ?item2) WHERE {INCLUDE %item1} } AS %item2
WHERE {
INCLUDE %item1.
INCLUDE %item2.
?item1 ?prop ?item2.
?edge wikibase:directClaim ?prop ; a wikibase:Property
OPTIONAL {?item1 wdt:P18 ?image}
OPTIONAL {?item2 wdt:P18 ?image2}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
All items in Khalili Collections, including images, ordered by collection and inventory number
editThe following query uses these:
- Properties: collection (P195) , part of (P361) , inventory number (P217) , image (P18)
SELECT ?i ?iLabel ?collLabel ?inv ?image WHERE { ?i wdt:P195 ?coll. ?coll wdt:P361? wd:Q63160499. OPTIONAL {?i wdt:P217 ?inv} OPTIONAL {?i wdt:P18 ?image} SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY ?collLabel ?inv
100 most interesting Khalili Collections objects from Hajj and Islamic Art collections
edit#title:100 most interesting Khalili Collections Islamic objects
SELECT ?item ?itemLabel (SAMPLE(?typeLabel) AS ?what) ?itemDescription ?image ?s WHERE {
VALUES ?coll {wd:Q66455355 wd:Q66458773} # Islamic Art and Hajj collection
?item wdt:P195 ?coll
FILTER (?item NOT IN (wd:Q3114572, wd:Q109341408, wd:Q2997010, wd:Q108543136, wd:Q107663626) ).# Exclude objects in multiple collections
?item wdt:P18 ?image.
?item wdt:P31 ?type.
?item wikibase:statements ?s
SERVICE wikibase:label { bd:serviceParam wikibase:language "ar,[AUTO_LANGUAGE],en".
?type rdfs:label ?typeLabel. ?item rdfs:label ?itemLabel. ?item schema:description ?itemDescription }
} GROUP BY ?item ?itemLabel ?itemDescription ?image ?s
ORDER BY DESC(?s)
LIMIT 100
Maps
editColour-coded global map of Khalili objects with images on Commons
editThe following query uses these:
- Properties: part of (P361) , collection (P195) , image (P18) , locality of creation (P1071) , described at URL (P973) , coordinate location (P625)
Features: map (Q24515275)
#title:Selected objects from the Khalili Collections
#defaultView:Map{"hide": ["?coords", "?layer"]}
SELECT ?item ?itemLabel ?image ?coords ?layer ?where WHERE {
?coll wdt:P361 wd:Q63160499. # all Khalili Collections
?i wdt:P195 ?coll; wdt:P18 ?image ; wdt:P1071 ?place; wdt:P973 ?item . ?place wdt:P625 ?coords.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". ?i rdfs:label ?itemLabel. ?coll rdfs:label ?layer .?place rdfs:label ?where }
}
Map of Enamels of the World collection
edit#title:Selected objects from the Khalili Collection of Enamels of the World
#defaultView:Map{"hide": ["?coords", "?layer"]}
SELECT ?item ?itemLabel ?image ?coords ?where WHERE {
VALUES ?coll {wd:Q66457023}
?i wdt:P195 ?coll; wdt:P18 ?image; wdt:P1071 ?place; wdt:P973 ?item . ?place wdt:P625 ?coords.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". ?i rdfs:label ?itemLabel . ?place rdfs:label ?where }
}
Map of the Islamic Art collection
edit#title:Selected objects from the Khalili Collection of Islamic Art
#defaultView:Map{"hide": ["?coords", "?layer"]}
SELECT ?item ?itemLabel ?image ?coords WHERE {
VALUES ?coll {wd:Q66455355}. # wd:Q66457023
?i wdt:P195 ?coll; wdt:P18 ?image ; wdt:P1071 ?place; wdt:P973 ?item . ?place wdt:P625 ?coords.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". ?i rdfs:label ?itemLabel }
}
Timelines
editTimeline of Enamels of the World with images on Commons
editThe following query uses these:
- Properties: collection (P195) , image (P18) , described at URL (P973) , locality of creation (P1071) , inception (P571)
SELECT ?obj ?objLabel ?pubdate ?pubdatePrecision ?image ?url ?locationLabel WHERE { ?obj wdt:P195 wd:Q66457023; p:P571/psv:P571 ?pubdateStatementNode. ?pubdateStatementNode wikibase:timeValue ?pubdate ; wikibase:timePrecision ?pubdatePrecision # get precision of the publication date OPTIONAL {?obj wdt:P18 ?image} OPTIONAL {?obj wdt:P973 ?kc_url} OPTIONAL {?obj wdt:P1071 ?location} BIND(if(BOUND(?kc_url), ?kc_url, ?obj) AS ?url) SERVICE wikibase:label {bd:serviceParam wikibase:language "en"} }
Timeline of KC Japanese Art with images on Commons
editThe following query uses these:
- Items: Nasser D. Khalili Collection of Japanese Art (Q66455644) , item of collection or exhibition (Q18593264)
- Properties: collection (P195) , instance of (P31) , image (P18) , described at URL (P973) , inception (P571)
SELECT ?obj ?objLabel ?pubdate ?pubdatePrecision ?typeLabel ?image ?url WHERE { ?obj wdt:P195 wd:Q66455644; p:P571/psv:P571 ?pubdateStatementNode. ?pubdateStatementNode wikibase:timeValue ?pubdate ; wikibase:timePrecision ?pubdatePrecision # get precision of the publication date OPTIONAL {?obj wdt:P31 ?type FILTER(?type != wd:Q18593264)} OPTIONAL {?obj wdt:P18 ?image} OPTIONAL {?obj wdt:P973 ?kc_url} BIND(if(BOUND(?kc_url), ?kc_url, ?obj) AS ?url) SERVICE wikibase:label {bd:serviceParam wikibase:language "en"} }
Timeline of some coins in the Khalili Collections
editThe following query uses these:
- Properties: collection (P195) , part of (P361) , instance of (P31) , subclass of (P279) , image (P18) , described at URL (P973) , inception (P571)
#title: Some coins in the Khalili Collections SELECT DISTINCT ?obj ?objLabel ?typeLabel ?image ?pubdate ?pubdatePrecision ?url WHERE { ?obj wdt:P195/wdt:P361 wd:Q63160499; wdt:P31 ?type. # Subclass of currency or instance of coin_type {?type wdt:P279?/wdt:P279 wd:Q8142} UNION {?type wdt:P279?/wdt:P31 wd:Q113813711 } ?obj wdt:P18 ?image; wdt:P973 ?url. ?obj p:P571/psv:P571 ?pubdateStatementNode. ?pubdateStatementNode wikibase:timeValue ?pubdate; wikibase:timePrecision ?pubdatePrecision # get precision of the creation date SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } }
This query as a Histropedia timeline
Timeline of some Qurans in the Khalili Collection of Islamic Art
edit#title: Qurans and Quran-fragments in the Khalili Collections
SELECT DISTINCT ?item ?itemLabel ?placeLabel ?pubdate ?pubdatePrecision ?url ?img WHERE {
?item wdt:P195 wd:Q66455355 # collection: Khalili Collection of Islamic Art
{?item wdt:P1574 wd:Q428 } UNION {?item wdt:P1574/wdt:P31 wd:Q234262 }. # Quran or a sura
?item p:P571/psv:P571 ?pubdateStatementNode.
?pubdateStatementNode wikibase:timeValue ?pubdate ;
wikibase:timePrecision ?pubdatePrecision # get precision of the creation date
# OPTIONAL {?item wdt:P217 ?inventory}
OPTIONAL {?item wdt:P1071 ?place}
OPTIONAL {?item wdt:P973 ?url}
OPTIONAL {?item wdt:P18 ?img}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
This query as a Histropedia timeline
Timeline of Islamic metalwork
edit#title:Islamic metalwork in the Khalili Collections
SELECT ?link ?itemLabel ?image ?date ?datePrecision ?placeLabel ?collectionLabel WHERE {
VALUES ?collection {wd:Q66455355 wd:Q66458773}
?item p:P195 [ps:P195 ?collection; pq:P217 ?inv ] FILTER(STRSTARTS(?inv, "MTW"))
?item wdt:P18 ?image; wdt:P973 ?link; p:P571/psv:P571 ?node.
OPTIONAL {?item wdt:P1071 ?place}
?node wikibase:timeValue ?date;
wikibase:timePrecision ?datePrecision
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en"}
}
This query as a Histropedia timeline
Islamic art from 650 to 1250
edit#defaultView:ImageGrid
#title: Khalili Collection of Islamic Art from 650 to 1250
SELECT DISTINCT ?objLabel ?placeLabel ?image (YEAR(?pubdate) AS ?year) WHERE {
?obj wdt:P195 wd:Q66455355.
?obj wdt:P18 ?image; wdt:P973 ?url; wdt:P1071 ?place .
MINUS {?obj wdt:P31 wd:Q49848 }
?obj p:P571/psv:P571 ?node. ?node wikibase:timeValue ?pubdate ;
wikibase:timePrecision ?pubdatePrecision # get precision of the creation date
FILTER (YEAR(?pubdate) < 1251) FILTER (YEAR(?pubdate) >649)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} ORDER BY ?pubdate
Timeline of Fatamid, Umayyad and Abbasid Caliphs
editSELECT ?item ?itemLabel ?caliphLabel ?image ?start ?end ?wp WHERE {
VALUES ?caliph {wd:Q14979753 wd:Q28541943 wd:Q67497236}
?item p:P39 ?s.?s ps:P39 ?caliph
# OPTIONAL {?item wdt:P53 ?family}
OPTIONAL {?s pq:P580 ?start}
OPTIONAL {?s pq:P582 ?end}
OPTIONAL {?item wdt:P18 ?img}
OPTIONAL {?item wdt:P158 ?sealimg}
OPTIONAL {?item wdt:P6802 ?relatedimg}
BIND(COALESCE(?img, ?sealimg, ?relatedimg) AS ?image)
OPTIONAL {?wp schema:about ?item; schema:isPartOf <https://en.wikipedia.org/>}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?start
Historical connections
editPeople (including mythical/legendary) connected to multiple objects in the Collections
editSELECT (COUNT(?i1) AS ?count_of_objects) ?topic ?topicLabel WHERE {
?i1 wdt:P195/wdt:P361 wd:Q63160499. # Object from Khalili Collections
VALUES ?type {wd:Q5 wd:Q95074 wd:Q64520857 wd:Q4271324 wd:Q13002315 wd:Q178885}
# human, fictional character, fictional char thought historical mythical character, legendary figure, deity
?i1 ?rel1 ?topic . ?topic wdt:P31 ?type . # Object has some sort of connection to the topic
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} GROUP BY ?topic ?topicLabel
ORDER BY DESC(?count_of_objects)
Objects related in some way to Shah Jahan
edit#title:Objects related in some way to Shah Jahan
SELECT DISTINCT ?property ?i ?object_name (SAMPLE(?obj_type) AS ?object_type) ?collection ?url WHERE {
?i wdt:P195 ?coll.
?i ?rel wd:Q83672 . ?i wdt:P31 ?type
OPTIONAL {?i wdt:P973 ?url}.
?prop wikibase:directClaim ?rel ; a wikibase:Property
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?i rdfs:label ?object_name. ?coll rdfs:label ?collection.
?prop rdfs:label ?property. ?type rdfs:label ?obj_type}
} GROUP BY ?i ?object_name ?collection ?property ?url
ORDER BY ?property ?collection
Image gallery version of above
edit#title:Objects related to Shah Jahan
#defaultView:ImageGrid{"hide":["?thumbnail","?noimg"]}
SELECT DISTINCT ?collection (CONCAT(?property," ",?targetlabel) AS ?proplabel) (SAMPLE(?obj_type) AS ?object_type) (SAMPLE(?image) AS ?thumbnail) ?q ?qLabel ?noimg WHERE {
VALUES ?target {wd:Q83672}
?i ?rel ?target; wdt:P195 ?coll; wdt:P31 ?type
OPTIONAL {?i wdt:P18 ?img}
BIND(IF(BOUND(?img), ?img, <http://commons.wikimedia.org/wiki/Special:FilePath/No%20image%20available.svg>) AS ?image)
BIND(IF(BOUND(?img), 0, 1) AS ?noimg)
OPTIONAL {?i wdt:P973 ?url}
BIND(COALESCE(?url, ?i) as ?q)
MINUS {?coll wdt:P31 wd:Q61781831}
?prop wikibase:directClaim ?rel; a wikibase:Property
SERVICE wikibase:label {bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?i rdfs:label ?qLabel. ?coll rdfs:label ?collection.
?prop rdfs:label ?property. ?type rdfs:label ?obj_type. ?target rdfs:label ?targetlabel}
} GROUP BY ?q ?qLabel ?collection ?property ?targetlabel ?noimg
ORDER BY ?noimg ?proplabel ?collection
Graphical version of above, for a different person
edit#defaultView:Graph
#title:Objects in collections related to Abdülmecid I
SELECT ?from ?fromLabel ?image1 ?to ?toLabel ?image2 ?edgeLabel
WITH {
SELECT ?start ?startimage ?image1 ?from ?prop ?coll WHERE {
VALUES ?start {wd:Q174772}. # Choose person to start with
?start wdt:P18 ?startimage.
?from ?rel ?start; wdt:P195 ?coll.
MINUS {?coll wdt:P31 wd:Q61781831} # Exclude curatorial departments
?prop wikibase:directClaim ?rel ; a wikibase:Property.
OPTIONAL {?from wdt:P18 ?image1}.
} } as %core
WHERE {
{
SELECT ?from ?image1 (?start AS ?to) (?startimage AS ?image2) (?prop AS ?edge) WHERE {
INCLUDE %core.
} ORDER BY ?coll # put objects from the same collection close together
}
UNION {
SELECT ?from ?image1 (?coll AS ?to) ?image2 (wd:P195 AS ?edge) WHERE {
INCLUDE %core.
OPTIONAL {?coll wdt:P18 ?image2}.
}
} UNION {
SELECT ?from ?image1 (?type AS ?to) ("" AS ?image2) (wd:P31 AS ?edge) WHERE {
INCLUDE %core.
?from wdt:P31 ?type.
}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?from rdfs:label ?fromLabel. ?edge rdfs:label ?edgeLabel. ?to rdfs:label ?toLabel}
}
See more: Wiki Playtime Blog: "Historical people and modern collections: a Wikidata exploration" February 2022
Objects in Khalili Collections related to Abdulmecid I (graphical version)
edit#defaultView:Graph
#title:Khalili Collections objects related to Abdülmecid I
SELECT ?from ?fromLabel ?image1 ?to ?toLabel ?image2 ?edgeLabel
WITH {
SELECT ?start ?startimage ?image1 ?from ?prop ?coll WHERE {
VALUES ?start {wd:Q174772}. # Choose person to start with
?start wdt:P18 ?startimage.
?from ?rel ?start; wdt:P195 ?coll. ?coll wdt:P361 wd:Q63160499.
?prop wikibase:directClaim ?rel ; a wikibase:Property.
OPTIONAL {?from wdt:P18 ?image1}.
} } as %core
WHERE {
{
SELECT ?from ?image1 (?start AS ?to) (?startimage AS ?image2) (?prop AS ?edge) WHERE {
INCLUDE %core.
} ORDER BY ?coll # put objects from the same collection close together
}
UNION {
SELECT ?from ?image1 (?coll AS ?to) ?image2 (wd:P195 AS ?edge) WHERE {
INCLUDE %core.
OPTIONAL {?coll wdt:P18 ?image2}.
}
} UNION {
SELECT ?from ?image1 (?type AS ?to) ("" AS ?image2) (wd:P31 AS ?edge) WHERE {
INCLUDE %core.
?from wdt:P31 ?type.
}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?from rdfs:label ?fromLabel. ?edge rdfs:label ?edgeLabel. ?to rdfs:label ?toLabel}
}
Objects in Khalili Collections related to Abbas II (graphical version)
edit#defaultView:Graph
#title:Khalili Collections objects related to Abbas II
SELECT ?from ?fromLabel ?image1 ?to ?toLabel ?image2 ?edgeLabel
WITH {
SELECT ?start ?startimage ?image1 ?from ?prop ?coll WHERE {
VALUES ?start {wd:Q157159}. # Choose person to start with
?start wdt:P18 ?startimage.
?from ?rel ?start; wdt:P195 ?coll. ?coll wdt:P361 wd:Q63160499.
?prop wikibase:directClaim ?rel ; a wikibase:Property.
OPTIONAL {?from wdt:P18 ?image1}.
} } as %core
WHERE {
{
SELECT ?from ?image1 (?start AS ?to) (?startimage AS ?image2) (?prop AS ?edge) WHERE {
INCLUDE %core.
} ORDER BY ?coll # put objects from the same collection close together
}
UNION {
SELECT ?from ?image1 (?coll AS ?to) ?image2 (wd:P195 AS ?edge) WHERE {
INCLUDE %core.
OPTIONAL {?coll wdt:P18 ?image2}.
}
} UNION {
SELECT ?from ?image1 (?type AS ?to) ("" AS ?image2) (wd:P31 AS ?edge) WHERE {
INCLUDE %core.
?from wdt:P31 ?type.
}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?from rdfs:label ?fromLabel. ?edge rdfs:label ?edgeLabel. ?to rdfs:label ?toLabel}
}
Individuals connected (somehow) to objects in multiple Khalili Collections
editSELECT DISTINCT ?i1 ?i1Label ?i2 ?i2Label ?topic ?topicLabel WHERE {
?i1 wdt:P195 ?coll1. ?coll1 wdt:P361 wd:Q63160499. # Object from Khalili Collections
?i2 wdt:P195 ?coll2. ?coll2 wdt:P361 wd:Q63160499. # Object from Khalili Collections
FILTER (STR(?coll1) > STR(?coll2)) # Different collections
?i1 ?rel1 ?topic . ?topic wdt:P31 wd:Q5 . # Both connected to the same topic
?i2 ?rel2 ?topic .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?topicLabel
Literary works of which Khalili has an exemplar
edit#title:Works of which the Khalili Collections have an exemplar
SELECT ?item ?itemLabel ?workLabel ?authorLabel ?inventory ?pages ?url WHERE {
?item p:P195 ?s. ?s ps:P195/wdt:P361 wd:Q63160499. # In Khalili Collections
?s pq:P217 ?inventory. # inventory number attached to the collection property
?item wdt:P1574 ?work. # exemplar of a work
OPTIONAL {?item wdt:P973 ?url}
OPTIONAL {?work wdt:P50 ?author}
OPTIONAL {?item wdt:P1104 ?pages}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?workLabel
Patrons (for whom the object was commissioned or dedicated)
edit#title:Patrons of objects in the Khalili Collections
SELECT DISTINCT ?i ?iLabel ?collLabel ?propLabel ?patronLabel ?url WHERE {
?i wdt:P195 ?coll.
?coll wdt:P361? wd:Q63160499.
VALUES ?rel {wdt:P88 wdt:P825}
?i ?rel ?patron .
?i wdt:P973 ?url.
?prop wikibase:directClaim ?rel ; a wikibase:Property
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?patronLabel ?collLabel
Parts of the Nurse's Quran and their collections
edit#defaultView:Graph
SELECT ?from ?fromLabel ?image1 ?to ?toLabel ?image2 ?edgeLabel
WITH {
SELECT ?start ?startimage ?image1 ?from ?prop ?coll WHERE {
VALUES ?start {wd:Q107998577}. # Nurse's Quran
?start wdt:P18 ?startimage.
?from ?rel ?start; wdt:P195 ?coll.
MINUS {?coll wdt:P31 wd:Q61781831} # Exclude curatorial departments
?prop wikibase:directClaim ?rel ; a wikibase:Property.
OPTIONAL {?from wdt:P18 ?image1}.
} } as %core
WHERE {
{
SELECT ?from ?image1 (?start AS ?to) (?startimage AS ?image2) (?prop AS ?edge) WHERE {
INCLUDE %core.
} ORDER BY ?coll # put objects from the same collection close together
}
UNION {
SELECT ?from ?image1 (?coll AS ?to) ?image2 (wd:P195 AS ?edge) WHERE {
INCLUDE %core.
OPTIONAL {?coll wdt:P18 ?image2}.
}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?from rdfs:label ?fromLabel. ?edge rdfs:label ?edgeLabel. ?to rdfs:label ?toLabel}
}
Items from the Abbasid Caliphate in collections
edit#defaultView:ImageGrid
#title:Items from the Abbasid Caliphate in collections
SELECT DISTINCT ?item ?itemLabel ?collectionLabel (SAMPLE(?img) AS ?image) WHERE {
?item wdt:P195 ?collection FILTER (?collection != wd:Q67429139). # exclude a subcollection
?item wdt:P495|wdt:P2348 wd:Q12536. # country of origin or time period
OPTIONAL {?item wdt:P18 ?img}
OPTIONAL {?item wdt:P973 ?url}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} GROUP BY ?item ?itemLabel ?collectionLabel
ORDER BY ?collectionLabel
Objects in the Khalili Collections whose main text is in Naskh script
editThe following query uses these:
- Properties: collection (P195) , part of (P361) , script style (P9302) , image (P18) , described at URL (P973)
Features: ImageGrid (Q24515278)
#defaultView:ImageGrid{"hide" :["?image"]}
#title: Objects in the Khalili Collections whose main text is in Naskh script
SELECT (?link AS ?q) ?qLabel ?image WHERE {
?item wdt:P195/wdt:P361 wd:Q63160499; wdt:P9302 wd:Q1510712; wdt:P18 ?image ; wdt:P973 ?link.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". ?item rdfs:label ?qLabel }
}
Depictions
editThings depicted in art works of the Khalili Collections (sample images for each item)
edit#defaultView:ImageGrid{"hide" :["?img"]}
#title: Things depicted in art works of the Khalili Collections
SELECT (URI(CONCAT("https://tools.wmflabs.org/reasonator/?q=", STRAFTER(STR(?depicted),"/entity/") )) as ?q) (?nameplusdesc AS ?qLabel) (SAMPLE(?image) AS ?img) WHERE {
?work wdt:P195/wdt:P361 wd:Q63160499; wdt:P18 ?image ; wdt:P973 ?link; wdt:P180 ?depicted.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?depicted rdfs:label ?name . ?depicted schema:description ?desc }
BIND(IF(BOUND(?desc), CONCAT(?name, ", ", ?desc), ?name) AS ?nameplusdesc)
} GROUP BY ?depicted ?nameplusdesc
ORDER BY UCASE(?qLabel)
Same but with links to the Khalili Collections web site
edit#defaultView:ImageGrid{"hide" :["?img"]}
#title: Things depicted in art works of the Khalili Collections
SELECT (?link as ?q) (?nameplusdesc AS ?qLabel) ?img WHERE {
{SELECT (SAMPLE(?work) AS ?w) ?depicted {
?work wdt:P195/wdt:P361 wd:Q63160499; wdt:P180 ?depicted.
} GROUP BY ?depicted }
?w wdt:P18 ?img ; wdt:P973 ?link;
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?depicted rdfs:label ?name . ?depicted schema:description ?desc }
BIND(IF(BOUND(?desc), CONCAT(?name, ", ", ?desc), ?name) AS ?nameplusdesc)
} ORDER BY UCASE(?qLabel)
Paintings
edit#title:Paintings in the Khalili Collections
SELECT ?item ?itemLabel ?collectionLabel ?inv ?image WHERE {
?item wdt:P31 wd:Q3305213.
?item wdt:P195 ?collection. ?collection wdt:P361 wd:Q63160499.
?item wdt:P217 ?inv.
OPTIONAL {?item wdt:P18 ?image}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?collectionLabel ?inv
Things depicted in art works of the Khalili Collections (all depictions of things that have an image)
edit#defaultView:ImageGrid{"hide" :["?image"]}
#title: Things depicted in art works of the Khalili Collections
SELECT (URI(CONCAT("https://tools.wmflabs.org/reasonator/?q=", STRAFTER(STR(?depicted),"/entity/") )) as ?q) (?nameplusdesc AS ?qLabel) ?image WHERE {
?work wdt:P195/wdt:P361 wd:Q63160499; wdt:P18 ?image ; wdt:P973 ?link; wdt:P180 ?depicted.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?depicted rdfs:label ?name . ?depicted schema:description ?desc }
BIND(IF(BOUND(?desc), CONCAT(?name, ", ", ?desc), ?name) AS ?nameplusdesc)
}
ORDER BY UCASE(?qLabel)
Things depicted in multiple Khalili Collections
edit#title:Things depicted in multiple Khalili Collections
SELECT ?depicted ?depictedLabel (COUNT(DISTINCT ?coll) AS ?collections) (COUNT(?work) AS ?works) WHERE {
?work wdt:P195 ?coll. ?coll wdt:P361 wd:Q63160499. # Work in Khalili Collections
?work wdt:P180 ?depicted.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} GROUP BY ?depicted ?depictedLabel HAVING(?collections > 1)
ORDER BY DESC(?collections) DESC(?works)
Entity index for the Khalili Collections web site
edit#title: Things connected to art works of the Khalili Collections
SELECT DISTINCT (?nameplusdesc AS ?label) (GROUP_CONCAT(STR(?link)) AS ?links) WHERE {
VALUES ?prop {wdt:P180 wdt:P50 wdt:P88 wdt:P1774 wdt:P31}
# depicted creator commissioned_by workshop_of instance_of
?work wdt:P195 ?coll. ?coll wdt:P361 wd:Q63160499. ?work wdt:P973 ?link; ?prop ?depicted.
FILTER (CONTAINS(STR(?link), "khalilicollections"))
FILTER (?depicted NOT IN (wd:Q79496108, wd:Q153988, wd:Q22669850, wd:Q87167, wd:Q48498,
wd:Q49848, wd:Q639460, wd:Q987767, wd:Q1922981, wd:Q2142903,
wd:Q18593264, wd:Q29382731, wd:Q368972, wd:Q3305213,
wd:Q17379525, wd:Q22075301, wd:Q191851))
# enamel bowl calligraphic_work manuscript illuminated_manuscript document casket container glassware
# jewellery item_of_collection metal_artwork lacquerware painting pottery_ware textile_artwork vase
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?depicted rdfs:label ?name. ?depicted schema:description ?desc}
BIND(IF(BOUND(?desc), CONCAT(?name, ", ", ?desc), ?name) AS ?nameplusdesc)
} GROUP BY ?nameplusdesc
ORDER BY UCASE(?label)
Depictions of the Kaaba in the Khalili Collection of Hajj and the Arts of Pilgrimage
edit#defaultView:ImageGrid{"hide" :["?img"]}
#title:Depictions of the Kaaba in the Khalili Collection of Hajj and the Arts of Pilgrimage
SELECT ?work (?link as ?q) ?qLabel ?inv ?img WHERE {
?work p:P195 [ps:P195 wd:Q66458773 ; pq:P217 ?inv] ; # Khalili Collection of Hajj and the Arts of Pilgrimage
wdt:P180 wd:Q29466; # Depicting the Kaaba
wdt:P18 ?img;
wdt:P973 ?link;
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?work rdfs:label ?qLabel }
} ORDER BY UCASE(?qLabel)
Depictions of lions in the Khalili Collections
edit#defaultView:ImageGrid{"hide" :["?img"]}
#title:Depictions of lions in the Khalili Collections
SELECT (?link as ?q) ?qLabel ?inv ?img ?collLabel WHERE {
?coll wdt:P361 wd:Q63160499. # Khalili Collections
?work p:P195 [ps:P195 ?coll ; pq:P217 ?inv];
wdt:P180 wd:Q140; # Depicting a lion
wdt:P18 ?img;
wdt:P973 ?link;
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?work rdfs:label ?qLabel. ?coll rdfs:label ?collLabel }
} ORDER BY ?collLabel UCASE(?qLabel)
Depictions of elephants in the Khalili Collections
edit#defaultView:ImageGrid{"hide" :["?img"]}
#title:Depictions of elephants in the Khalili Collections
SELECT (?link as ?q) ?qLabel ?inv ?img ?collLabel WHERE {
?coll wdt:P361 wd:Q63160499. # Khalili Collections
?work p:P195 [ps:P195 ?coll ; pq:P217 ?inv];
wdt:P180 wd:Q7378; # Depicting an elephant
wdt:P18 ?img;
wdt:P973 ?link;
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?work rdfs:label ?qLabel. ?coll rdfs:label ?collLabel }
} ORDER BY ?collLabel UCASE(?qLabel)
Depictions of eagles in the Khalili Collections
edit#defaultView:ImageGrid{"hide" :["?img"]}
#title:Depictions of eagles in the Khalili Collections
SELECT (?link as ?q) ?qLabel ?inv ?img ?collLabel WHERE {
?coll wdt:P361 wd:Q63160499. # Khalili Collections
?work p:P195 [ps:P195 ?coll ; pq:P217 ?inv];
wdt:P180 wd:Q2092297; # Depicting an eagle
wdt:P18 ?img;
wdt:P973 ?link;
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?work rdfs:label ?qLabel. ?coll rdfs:label ?collLabel }
} ORDER BY ?collLabel UCASE(?qLabel)
Depictions of irises (the flower) in the Khalili Collections
edit#defaultView:ImageGrid{"hide" :["?img"]}
#title:Depictions of irises in the Khalili Collections
SELECT (?work as ?q) ?qLabel ?inv ?img ?collLabel WHERE {
?coll wdt:P361 wd:Q63160499. # Khalili Collections
?work p:P195 [ps:P195 ?coll ; pq:P217 ?inv] ;
wdt:P180 wd:Q156901; # depicting an iris (flower)
wdt:P18 ?img;
wdt:P973 ?link;
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?work rdfs:label ?qLabel. ?coll rdfs:label ?collLabel }
} ORDER BY ?collLabel UCASE(?qLabel)
Art works in the Khalili Collections that do not yet have a depiction statement
edit#defaultView:ImageGrid{"hide" :["?image"]}
#title: Art works of the Khalili Collections with no depiction statements
SELECT ?work ?workLabel ?image WHERE {
?work wdt:P195/wdt:P361 wd:Q63160499; wdt:P18 ?image ; wdt:P973 ?link . MINUS{?work wdt:P180 ?depicted}.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} order by ?workLabel
Things depicted in the Jami' al-Tawarikh of Rashid al-Din
edit#title:Things depicted in the Jami' al-Tawarikh of Rashid al-Din
SELECT ?part ?partLabel ?inv (GROUP_CONCAT(?label; separator=", ") AS ?depicted)
WHERE {
?part wdt:P361 wd:Q107663668; wdt:P217 ?inv
OPTIONAL{?part wdt:P180 ?thing. ?thing rdfs:label ?label FILTER(lang(?label)="en")}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?part ?partLabel ?inv
ORDER BY UCASE(?inv)
Graph version of above query
edit#defaultView:Graph
SELECT ?from ?fromLabel ?image1 ?to ?toLabel ?image2 ?edgeLabel
WHERE {
{
?from wdt:P361 wd:Q107663668.
wd:Q107663668 wdt:P18 ?image2.
BIND(wd:Q107663668 AS ?to)
BIND("part of" as ?edgeLabel)
OPTIONAL{?from wdt:P18 ?image1}
}
UNION { ?from wdt:P361 wd:Q107663668; wdt:P180 ?to. # depiction
BIND("depicts" as ?edgeLabel)
OPTIONAL{?from wdt:P18 ?image1}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Depictions in the Khalili Falnamah
edit#defaultView:Graph
SELECT ?from ?fromLabel ?image1 ?to ?toLabel ?image2 ?edgeLabel
WHERE {
{
?from wdt:P361 wd:Q107663675.
wd:Q107663675 wdt:P18 ?image2.
BIND(wd:Q107663675 AS ?to)
BIND("part of" as ?edgeLabel)
OPTIONAL{?from wdt:P18 ?image1}
}
UNION { ?from wdt:P361 wd:Q107663675; wdt:P180 ?to. # depiction
BIND("depicts" as ?edgeLabel)
OPTIONAL{?from wdt:P18 ?image1}
}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Paintings in the Shahnamah of Shah Alam II
edit#Paintings in the Shahnamah of Shah Alam II
SELECT ?item ?itemLabel ?inv WHERE {
?item wdt:P361 wd:Q116993057; wdt:P217 ?inv
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Paintings in the Shahnamah of Prince Murad Bakhsh
edit#Paintings in the Shahnamah of Prince Murad Bakhsh
SELECT ?item ?itemLabel ?inv WHERE {
?item wdt:P361 wd:Q120965348; wdt:P217 ?inv
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Translations
editTranslations of Wikipedia articles related to the Khalili Collections partnership (most recent first)
editNote: English Wikipedia dates are when the article came into existence, usually as a draft, not when it became a mainspace article.
Note: Persian Wikipedia's API doesn't return date results for some reason.
The following query uses these:
- Items: Nasser Khalili (Q3336241) , Nasser D. Khalili Collection of Japanese Art (Q66455644) , Khalili Collection of Japanese Kimono (Q66458747) , Khalili Collections (Q63160499) , Nasser D. Khalili Collection of Swedish Textiles (Q66454754) , Nasser D. Khalili Collection of Aramaic Documents (Q66456991) , Khalili Collection: Enamels of the World (Q66457023) , Khalili Collection: Hajj and the Arts of Pilgrimage (Q66458773) , Nasser D. Khalili Collection of Spanish Metalwork (Q66455051) , Plazido Zuloaga (Q27763745) , list of collections of Japanese art (Q92731365) , Khalili Imperial Garniture (Q95639662) , Imperial Household Artist (Q11481067) , list of museums of Islamic art (Q2982930) , Yabu Meizan (Q46103484) , Kawade Shibatarō (Q21664940) , Namikawa Yasuyuki (Q11362747) , Namikawa Sōsuke (Q11566135) , sitara (Q106372429) , Nasser D. Khalili Collection of Islamic Art (Q66455355) , Mahmal (Q6735263) , Anis Al-Hujjaj (Q107060104) , Muḥammad Ṣādiq (Q13142198) , Dar al-Kiswa (Q110621552) , Universal Declaration on Cultural Diversity (Q3042743) , talismanic shirt (Q21074703) , Hajj: Journey to the Heart of Islam (Q113673240) , Khalili Foundation (Q6735866) , The Giant 'Uj and the Prophets Moses, Jesus and Muhammad (Q107663626) , Hatip Mehmed Efendi (Q64746992) , Maqamat of al-Hariri (Q16641327) , Mihrab (Q12810868) , Ahmed Cherkaoui (Q2827531) , Soheila Sokhanvari (Q115048320) , Falnama (Q4480950) , Gulshan-i 'Ishq (Q109811416) , Empire of the Sultans: Ottoman Art of the Khalili Collection (Q122258635) , Heaven on Earth: Art From Islamic Lands (Q122067620)
- Properties: ISO 639-1 code (P218)
#title:Translations relevant to the Khalili Collections partnership SELECT ?item1Label ?langname ?sitelink ?articleCreationDate WHERE { VALUES ?item1 {wd:Q3336241 wd:Q66455644 wd:Q66458747 wd:Q63160499 wd:Q66454754 wd:Q66456991 wd:Q66457023 wd:Q66458773 wd:Q66455051 wd:Q27763745 wd:Q92731365 wd:Q95639662 wd:Q11481067 wd:Q2982930 wd:Q46103484 wd:Q21664940 wd:Q11362747 wd:Q11566135 wd:Q106372429 wd:Q66455355 wd:Q6735263 wd:Q107060104 wd:Q13142198 wd:Q110621552 wd:Q3042743 wd:Q21074703 wd:Q113673240 wd:Q6735866 wd:Q107663626 wd:Q64746992 wd:Q16641327 wd:Q12810868 wd:Q2827531 wd:Q115048320 wd:Q4480950 wd:Q109811416 wd:Q122258635 wd:Q122067620} ?sitelink schema:about ?item1 . # get Wikimedia pages FILTER(CONTAINS(str(?sitelink), ".wikipedia.org/")) # only Wikipedia articles ?sitelink schema:inLanguage ?langcode; schema:name ?title ; schema:isPartOf ?site. OPTIONAL { ?language wdt:P218 ?langcode; rdfs:label ?langlabel FILTER(lang(?langlabel) = "en") } # Convert short code to full language name BIND(COALESCE(?langlabel, ?langcode) AS ?langname) BIND(REPLACE(SUBSTR(STR(?site), 9), '/', '') AS ?endpoint) OPTIONAL{ SERVICE wikibase:mwapi { bd:serviceParam wikibase:api "Generator" ; wikibase:endpoint ?endpoint ; mwapi:generator "allpages" ; mwapi:gapfrom ?title ; mwapi:gapto ?title ; mwapi:prop "revisions" ; mwapi:rvdir "newer" ; wikibase:limit "once" . ?t wikibase:apiOutput "revisions/rev/@timestamp" . ?o wikibase:apiOrdinal true } FILTER (?o = 0) BIND (xsd:dateTime(?t) AS ?articleCreationDate) } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } } ORDER BY DESC(?articleCreationDate) ?item1Label
Recently edited articles relevant to the Khalili Collections partnership and their sizes
editThe following query uses these:
- Items: Nasser Khalili (Q3336241) , Nasser D. Khalili Collection of Japanese Art (Q66455644) , Khalili Collection of Japanese Kimono (Q66458747) , Khalili Collections (Q63160499) , Nasser D. Khalili Collection of Swedish Textiles (Q66454754) , Nasser D. Khalili Collection of Aramaic Documents (Q66456991) , Khalili Collection: Enamels of the World (Q66457023) , Khalili Collection: Hajj and the Arts of Pilgrimage (Q66458773) , Nasser D. Khalili Collection of Spanish Metalwork (Q66455051) , Plazido Zuloaga (Q27763745) , list of collections of Japanese art (Q92731365) , Khalili Imperial Garniture (Q95639662) , Imperial Household Artist (Q11481067) , list of museums of Islamic art (Q2982930) , Yabu Meizan (Q46103484) , Kawade Shibatarō (Q21664940) , Namikawa Yasuyuki (Q11362747) , Namikawa Sōsuke (Q11566135) , sitara (Q106372429) , Nasser D. Khalili Collection of Islamic Art (Q66455355) , Mahmal (Q6735263) , Anis Al-Hujjaj (Q107060104) , Muḥammad Ṣādiq (Q13142198) , Dar al-Kiswa (Q110621552) , Universal Declaration on Cultural Diversity (Q3042743) , talismanic shirt (Q21074703) , Hajj: Journey to the Heart of Islam (Q113673240) , Khalili Foundation (Q6735866) , The Giant 'Uj and the Prophets Moses, Jesus and Muhammad (Q107663626) , Hatip Mehmed Efendi (Q64746992) , Maqamat of al-Hariri (Q16641327) , Mihrab (Q12810868) , Ahmed Cherkaoui (Q2827531) , Soheila Sokhanvari (Q115048320) , Falnama (Q4480950) , Gulshan-i 'Ishq (Q109811416) , Empire of the Sultans: Ottoman Art of the Khalili Collection (Q122258635) , Heaven on Earth: Art From Islamic Lands (Q122067620)
- Properties: ISO 639-1 code (P218)
#title:Recently edited articles relevant to the Khalili Collections partnership SELECT ?item1Label ?langname ?sitelink ?size ?lastEdited WHERE { VALUES ?item1 {wd:Q3336241 wd:Q66455644 wd:Q66458747 wd:Q63160499 wd:Q66454754 wd:Q66456991 wd:Q66457023 wd:Q66458773 wd:Q66455051 wd:Q27763745 wd:Q92731365 wd:Q95639662 wd:Q11481067 wd:Q2982930 wd:Q46103484 wd:Q21664940 wd:Q11362747 wd:Q11566135 wd:Q106372429 wd:Q66455355 wd:Q6735263 wd:Q107060104 wd:Q13142198 wd:Q110621552 wd:Q3042743 wd:Q21074703 wd:Q113673240 wd:Q6735866 wd:Q107663626 wd:Q64746992 wd:Q16641327 wd:Q12810868 wd:Q2827531 wd:Q115048320 wd:Q4480950 wd:Q109811416 wd:Q122258635 wd:Q122067620} ?sitelink schema:about ?item1 . # get Wikimedia pages FILTER(CONTAINS(str(?sitelink), ".wikipedia.org/")) # only Wikipedia articles ?sitelink schema:inLanguage ?langcode; schema:name ?title ; schema:isPartOf ?site. OPTIONAL { ?language wdt:P218 ?langcode; rdfs:label ?langlabel FILTER(lang(?langlabel) = "en") } # Convert short code to full language name BIND(COALESCE(?langlabel, ?langcode) AS ?langname) BIND(REPLACE(SUBSTR(STR(?site), 9), '/', '') AS ?endpoint) OPTIONAL{ SERVICE wikibase:mwapi { bd:serviceParam wikibase:api "Generator" ; wikibase:endpoint ?endpoint ; mwapi:generator "allpages" ; mwapi:gapfrom ?title ; mwapi:gapto ?title ; mwapi:prop "revisions" ; mwapi:rvprop "timestamp|size" . ?t wikibase:apiOutput "revisions/rev/@timestamp" . ?bytes wikibase:apiOutput "revisions/rev/@size" . } BIND (xsd:dateTime(?t) AS ?lastEdited) BIND (xsd:integer(?bytes) AS ?size) } SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" } } ORDER BY DESC(?lastEdited) ?item1Label
Non-English labels for Khalili Collections items
edit#title:Non-English labels for Khalili Collections items
SELECT ?lang ?count WITH {
SELECT ?work ?label WHERE {
?work wdt:P195?/wdt:P361? wd:Q63160499. # Khalili Collections, or individual collections, or objects within collections
?work (rdfs:label|skos:altLabel) ?label
FILTER(lang(?label) != "en") } } AS %core
WHERE { {
SELECT ?lang (COUNT(?label) AS ?count) WHERE {
INCLUDE %core.
BIND(lang(?label) AS ?langcode).
OPTIONAL { ?language wdt:P218 ?langcode; rdfs:label ?langname FILTER(lang(?langname) = "en")}
BIND(IF (BOUND(?langname), ?langname, ?langcode) AS ?lang)
} GROUP BY ?lang
} UNION {
SELECT ("TOTAL" AS ?lang) (COUNT(?label) AS ?count) WHERE {
INCLUDE %core.
} }
} order BY DESC(?count) ?lang
Terms relating to the two Islamic Art collections that lack Arabic labels
edit#title:Types of object in the Khalili Collections (Islamic) with no Arabic name
SELECT DISTINCT ?type ?typeLabel ?typeDescription ?typetypeLabel (SAMPLE(?image) as ?img) WHERE {
VALUES ?coll {wd:Q66455355 wd:Q66458773} # Islamic Art and Hajj collection
?item wdt:P195 ?coll
FILTER (?item NOT IN (wd:Q3114572, wd:Q109341408, wd:Q2997010, wd:Q108543136, wd:Q107663626) ).# Exclude objects in multiple collections
?item wdt:P18 ?image.
?item wdt:P31 ?type. OPTIONAL{ ?type wdt:P279 ?typetype}.
FILTER NOT EXISTS {?type rdfs:label ?arabicLabel FILTER(lang(?arabicLabel) = "ar") }
SERVICE wikibase:label { bd:serviceParam wikibase:language "ar,[AUTO_LANGUAGE],en". }
} GROUP BY ?type ?typeLabel ?typeDescription ?typetypeLabel
Run on 21 November 2023: 70 results
Translated labels that have not been added to objects with the same English name
editSELECT ?item2 (CONCAT("L",LANG(?label_for)) AS ?lang) ?label_for WHERE {
?item wdt:P195/wdt:P361 wd:Q63160499. # Object from one of the Khalili Collections
?item rdfs:label ?label_for FILTER(lang(?label_for) != "en"). # Translated label
?item rdfs:label ?label_en FILTER(lang(?label_en) = "en"). # Original label
?item2 wdt:P195/wdt:P361 wd:Q63160499. # Another object from the Khalili Collections
?item2 rdfs:label ?label_en. # Same English label as the object whose label is translated
FILTER NOT EXISTS {?item2 rdfs:label ?label_for} # Suggested label isn't already there (prevents item1=item2)
}
Data quality
editCount of items and statements about KC objects
editSELECT ?collectionLabel ?items ?statements WHERE {
{SELECT ?collectionLabel (COUNT(?i) AS ?items) (SUM(?stat) AS ?statements) WHERE
{
?i wdt:P195 ?collection. ?collection wdt:P361 wd:Q63160499.
?i wikibase:statements ?stat
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} GROUP BY ?collectionLabel
} UNION {
SELECT ?collectionLabel (COUNT(?i) AS ?items) (SUM(?stat) AS ?statements)
WHERE
{?i wdt:P195 ?collection. ?collection wdt:P361 wd:Q63160499.
?i wikibase:statements ?stat
BIND ("Total" AS ?collectionLabel)
} GROUP BY ?collectionLabel
}
} ORDER BY ?collectionLabel
- As of 2021-08-02, 8,486 statements
- As of 2022-09-24, 10,499 statements
- As of 2024-07-01, 11,612 statements
Percentage completeness for some properties
editSELECT ?collection ?collectionLabel ?total_objects ?proplabel (round(100*COUNT(DISTINCT ?i)/?total_objects) AS ?percentage)
WITH { SELECT ?collection (COUNT(?j) AS ?total_objects) WHERE
{?j wdt:P195 ?collection. ?collection wdt:P361 wd:Q63160499 }
GROUP BY ?collection } as %totals
WHERE {
INCLUDE %totals.
?i wdt:P195 ?collection. # in Khalili Collections
{?i wdt:P186 ?value. BIND("Material" as ?proplabel)}
UNION {?i wdt:P571 ?value. BIND("Inception" as ?proplabel)}
UNION {?i wdt:P495 ?value. BIND("Country of origin" as ?proplabel)}
UNION {?i wdt:P1071 ?value. BIND("Location of creation" as ?proplabel)}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
} GROUP BY ?collection ?collectionLabel ?proplabel ?total_objects
ORDER BY DESC(?total_objects) ?collectionLabel ?proplabel
Objects without an inception date
editSELECT ?item ?itemLabel ?collectionLabel ?url
WHERE {
?item wdt:P195 ?collection.?collection wdt:P361 wd:Q63160499 # in Khalili Collections
MINUS {?item wdt:P571 ?value} # no inception date
OPTIONAL {?item wdt:P973 ?url}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
ORDER BY ?collectionLabel ?itemLabel
KC items with no images in Commons, but more than a century old
edit#title:Khalili Collections objects without images
SELECT ?i ?iLabel ?collLabel ?inv (YEAR(?date) AS ?year) WHERE {
?i wdt:P195 ?coll.
?coll wdt:P361? wd:Q63160499.
OPTIONAL {?i wdt:P217 ?inv}
OPTIONAL {?i wdt:P571 ?date} FILTER (YEAR($date) < 1920).
MINUS {?i wdt:P18 []}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?collLabel ?inv
Unreferenced statements about Khalili Collections objects
edit#title:Unreferenced statements about Khalili Collections objects
SELECT ?item ?prop ?statement ?itemLabel ?url WHERE {
?item wdt:P195/wdt:P361? wd:Q63160499.
?item wdt:P973 ?url.
?item ?prop ?statement FILTER(STRSTARTS(STR(?prop), "http://www.wikidata.org/prop/direct/") )
FILTER(?prop not in (wdt:P973, wdt:P18, wdt:P571)).
FILTER NOT EXISTS {
?item ?prop ?statement .
?statement prov:wasDerivedFrom ?derivedFrom }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY ?item ?prop
ArtUK IDs (reconciled to existing records)
edit#title:Objects in the Khalili Collections with an ArtUK ID
SELECT ?item ?itemLabel ?collectionLabel (URI(CONCAT("https://artuk.org/discover/artworks/",?id)) as ?artuk) ?khalili WHERE {
?item wdt:P195 ?collection. ?collection wdt:P361 wd:Q63160499.
OPTIONAL {?item wdt:P973 ?khalili}
?item wdt:P1679 ?id
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
ArtUK IDs (not reconciled to existing records)
editIdeally, this should give no results.
#title:Objects in the Khalili Collections with an ArtUK ID but no indication of which collection
SELECT ?item ?itemLabel ?desc (URI(CONCAT("https://artuk.org/discover/artworks/",?id)) as ?artuk) WHERE {
?item wdt:P1679 ?id.
?item schema:description ?desc FILTER(CONTAINS(LCASE(?desc), "khalili"))
MINUS{?item wdt:P195/wdt:P361 wd:Q63160499}
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
}
Cultural diversity
editRatifications of the Convention on the Protection and Promotion of the Diversity of Cultural Expressions
edit#title:Ratifications of the Convention on the Protection and Promotion of the Diversity of Cultural Expressions
#defaultView:Timeline
SELECT ?item ?itemLabel ?date WHERE {
wd:Q253300 p:P6193 ?s .
?s pq:P585 ?date.
?s ps:P6193 ?item
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}