query-b90455de9bc846ce0809131a977eec6e

rq turtle/ttl

TODO

Use at

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{"hide": ["?rgb", "?coordinates"]}
SELECT DISTINCT ?item ?itemLabel ?coordinates ?wiki ?rgb
WHERE
{
  ?item wdt:P31 / wdt:P279* wd:Q928830 . # subway station
  ?item wdt:P17 wd:Q142 . # in France
  ?item wdt:P625 ?coordinates .
  OPTIONAL
  {
    ?frwiki schema:about ?item .
    ?frwiki schema:isPartOf <https://fr.wikipedia.org/> .
  }
  OPTIONAL
  {
    ?enwiki schema:about ?item .
    ?enwiki schema:isPartOf <https://en.wikipedia.org/> .
  }
  BIND (IF(BOUND(?frwiki), "00FF00", "FF0000") AS ?rgb)
  BIND (COALESCE(?frwiki, ?enwiki) AS ?wiki)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "fr,en" . }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?coordinates"):::projected v4("?enwiki") v3("?frwiki") v1("?item"):::projected v5("?rgb"):::projected v6("?wiki"):::projected a1((" ")) c9([https://fr.wikipedia.org/]):::iri c3(["wd:Q928830"]):::iri c10([https://en.wikipedia.org/]):::iri c12(["bd:serviceParam"]):::iri c14(["fr,en"]):::literal c5(["wd:Q142"]):::iri v1 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c3 v1 --"wdt:P17"--> c5 v1 --"wdt:P625"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."schema:about".-> v1 v3 --"schema:isPartOf"--> c9 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v4 -."schema:about".-> v1 v4 --"schema:isPartOf"--> c10 end bind0[/"if(bound(?frwiki),'00FF00','FF0000')"/] v3 --o bind0 bind0 --as--o v5 bind1[/"?frwiki?enwiki"/] v3 --o bind1 v4 --o bind1 bind1 --as--o v6 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c12 --"wikibase:language"--> c14 end