query-a9720a5303d71d44bdb2e61fb78a52d7
TODO
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 schema: <http://schema.org/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map{"layer": "?badgeLabel"}
SELECT ?item ?itemLabel ?coordenadas ?sitelink ?badgeLabel ?rgb WHERE {
?item wdt:P625 ?coordenadas .
?sitelink schema:isPartOf <https://fr.wikipedia.org/>.
?sitelink schema:about ?item .
{ ?sitelink wikibase:badge wd:Q17437796 .}
UNION
{ ?sitelink wikibase:badge wd:Q17437798 . }
?sitelink wikibase:badge ?badge
BIND( IF(?badge=wd:Q17437798, "006600" , "ffd700" ) AS ?rgb)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],fr" } .
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v4("?badge")
v2("?coordenadas"):::projected
v1("?item"):::projected
v5("?rgb"):::projected
v3("?sitelink"):::projected
c9(["bd:serviceParam"]):::iri
c11(["#91;AUTO_LANGUAGE#93;,fr"]):::literal
c3([https://fr.wikipedia.org/]):::iri
c7(["wd:Q17437798"]):::iri
c6(["wd:Q17437796"]):::iri
v1 --"wdt:P625"--> v2
v3 --"schema:isPartOf"--> c3
v3 --"schema:about"--> v1
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v3 --"wikibase:badge"--> c7
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v3 --"wikibase:badge"--> c6
end
union0r <== or ==> union0l
end
v3 --"wikibase:badge"--> v4
bind0[/"if(?badge = 'wd:Q17437798','006600','ffd700')"/]
v4 --o bind0
bind0 --as--o v5
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c9 --"wikibase:language"--> c11
end