query-3478f20d3f2ce906b309296ec6c1c5e8
Manuscripts with IIIF links (not just notable ones)
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:ImageGrid{"hide": ["?image","?placeholder"]}
SELECT ?placeholder ?image ?qLabel (GROUP_CONCAT(DISTINCT ?collectionLabel; separator="; ") AS ?where)
(URI(CONCAT('https://tools.wmflabs.org/mirador/?manifest=', STR(?iiif))) AS ?iiiflink)
WHERE {
?q (wdt:P31/wdt:P279*) wd:Q87167; wdt:P6108 ?iiif; wikibase:sitelinks ?sitecount.
?q p:P195 ?s. ?s ps:P195 ?collection . MINUS {?s pq:P582 []}.
MINUS {?s ps:P195 wd:Q1322278 }
OPTIONAL {?q 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 ?placeholder)
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
?q rdfs:label ?qLabel. ?collection rdfs:label ?collectionLabel
}
}
GROUP BY ?placeholder ?qLabel ?image ?iiif ?sitecount
ORDER BY ?placeholder DESC(?sitecount)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v6("?collection")
v10("?collectionLabel"):::projected
v4("?iiif"):::projected
v12("?iiiflink")
v8("?image"):::projected
v7("?img")
v9("?placeholder"):::projected
v3("?q")
v9("?qLabel"):::projected
v5("?s")
v2("?sitecount")
v11("?where")
a2((" "))
a1((" "))
c9(["wd:Q1322278"]):::iri
c3(["wd:Q87167"]):::iri
c12(["bd:serviceParam"]):::iri
c14(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v3 --"p:direct/P31"--> a1
a1 --"p:direct/P279"--> c3
v3 --"p:direct/P6108"--> v4
v3 --"wikibase:sitelinks"--> v2
v3 --"p:P195"--> v5
v5 --"p:statement/P195"--> v6
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v5 --"p:qualifier/P582"--> a2
end
subgraph minus1["MINUS"]
style minus1 stroke-width:6px,fill:pink,stroke:red;
v5 --"p:statement/P195"--> c9
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v3 -."p:direct/P18".-> v7
end
bind2[/"if(bound(?img),?img,http://commons.wikimedia.org/wiki/Special:FilePath/No%20image%20available.svg)"/]
v7 --o bind2
bind2 --as--o v8
bind3[/"if(bound(?img),'0^^xsd:integer','1^^xsd:integer')"/]
v7 --o bind3
bind3 --as--o v9
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c12 --"wikibase:language"--> c14
v3 --"rdfs:label"--> v9
v6 --"rdfs:label"--> v10
end
bind5[/"?collectionLabel"/]
v10 --o bind5
bind5 --as--o v11
bind6[/"concat('https://tools.wmflabs.org/mirador/?manifest=',str(?iiif))"/]
v4 --o bind6
bind6 --as--o v12