query-aa947e72c8ed9f3274f2cecb10b32c6a
New tool: Wikidata Image Positions. Two examples: (P2677)relative position within image , according to their (P180)depicts of a given item along with all the elements it (P18)image . It shows you the Wikidata Image Positions qualifiers: (P2677)relative position within image Hi all! I built a tool to show image areas indicated by Situation Room The Coronation of Napoleon statements with position qualifiers: (P180)depicts You can explore more examples by using this query, which finds the items with the most
Use at
- https://query.wikidata.org/sparql
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?item ?itemLabel (GROUP_CONCAT(distinct ?natLb; separator=" - ") as ?nature) (COUNT(distinct ?depictspos) as ?nb_depicts) ?display
WHERE
{
?item p:P180[ pq:P2677 ?depictspos ] .
?item wdt:P31 ?nat.
?nat rdfs:label ?natLb . filter (lang(?natLb) = "en") .
BIND(IRI((CONCAT("https://tools.wmflabs.org/wd-image-positions/item/", REPLACE(str(?item),"http://www.wikidata.org/entity/","")))) as ?display )
SERVICE wikibase:label {
bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en".
}
} GROUP BY ?item ?itemLabel ?display
ORDER BY DESC(?nb_depicts)
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?depictspos"):::projected
v6("?display"):::projected
v4("?item"):::projected
v5("?nat")
v2("?natLb"):::projected
v7("?nature")
v8("?nb_depicts")
a1((" "))
c7(["bd:serviceParam"]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
f0[["?natLb = 'en'"]]
f0 --> v2
a1 --"p:qualifier/P2677"--> v3
v4 --"p:P180"--> a1
v4 --"p:direct/P31"--> v5
v5 --"rdfs:label"--> v2
bind1[/"concat('https://tools.wmflabs.org/wd-image-positions/item/',replace(str(?item),'http://www.wikidata.org/entity/',''))"/]
v4 --o bind1
bind1 --as--o v6
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind4[/"?natLb"/]
v2 --o bind4
bind4 --as--o v7
bind5[/"count(?depictspos)"/]
v3 --o bind5
bind5 --as--o v8