query-b1005a5220e703213a1b2db35c51e025

rq turtle/ttl

Mapping Bot returns

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
   SELECT DISTINCT (?itemdesc AS ?layer) ?loc ?item ?itemLabel ?gotimg ?itemtypeLabel WHERE {
     SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
     VALUES ?item { wd:Q43396168 wd:Q1612113 wd:Q800825 wd:Q10314411 wd:Q5124894 wd:Q5519335 wd:Q43393601 wd:Q5124855 wd:Q6842247 wd:Q30624440 wd:Q6502991 wd:Q17792014 wd:Q1046939 wd:Q276382 wd:Q15849096 wd:Q723359 wd:Q4819399 wd:Q25384171 wd:Q56667183 wd:Q4881486 wd:Q5021768 wd:Q17771263 wd:Q17572099 wd:Q101003894 wd:Q43389980 wd:Q6665021 wd:Q43390004 wd:Q116788697 wd:Q67913321 wd:Q17844144 wd:Q17124680 }
     ?item wdt:P31 ?itemtype.
     OPTIONAL {?item wdt:P625 ?iloc.}.
     OPTIONAL {?item p:P115 ?tpark. ?tpark ps:P115 ?teampark. optional {?teampark wdt:P625 ?teamparkloc.}.}.
     OPTIONAL {?item wdt:P551 ?home. ?home wdt:P625 ?homeloc.}.
     OPTIONAL {?item wdt:P159 ?hq. ?hq wdt:P625 ?hqloc.}.
     optional {?item wdt:P18 ?gotimg.}.
     BIND (IF (BOUND(?iloc), ?iloc, (IF (BOUND(?teamparkloc), ?teamparkloc, (IF (BOUND(?homeloc), ?homeloc,(IF (BOUND(?hqloc), ?hq,?null)))))    )) AS ?loc).
     BIND (IF(?itemtype = wd:Q476028, "Football club", 
           IF(?itemtype = wd:Q55488, "Station",    
           IF(?itemtype = wd:Q5, "Person", "Site"))) AS ?itemdesc).
   }

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v11("?gotimg"):::projected v7("?home") v8("?homeloc") v9("?hq") v10("?hqloc") v3("?iloc") v1("?item"):::projected v13("?itemdesc"):::projected v2("?itemtype") v14("?layer") v12("?loc"):::projected v5("?teampark") v6("?teamparkloc") v4("?tpark") c2(["bd:serviceParam"]):::iri c4(["#91;AUTO_LANGUAGE#93;,en"]):::literal subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c2 --"wikibase:language"--> c4 end bind0[/VALUES ?item/] bind0-->v1 bind00(["wd:Q43396168"]) bind00 --> bind0 bind01(["wd:Q1612113"]) bind01 --> bind0 bind02(["wd:Q800825"]) bind02 --> bind0 bind03(["wd:Q10314411"]) bind03 --> bind0 bind04(["wd:Q5124894"]) bind04 --> bind0 bind05(["wd:Q5519335"]) bind05 --> bind0 bind06(["wd:Q43393601"]) bind06 --> bind0 bind07(["wd:Q5124855"]) bind07 --> bind0 bind08(["wd:Q6842247"]) bind08 --> bind0 bind09(["wd:Q30624440"]) bind09 --> bind0 bind010(["wd:Q6502991"]) bind010 --> bind0 bind011(["wd:Q17792014"]) bind011 --> bind0 bind012(["wd:Q1046939"]) bind012 --> bind0 bind013(["wd:Q276382"]) bind013 --> bind0 bind014(["wd:Q15849096"]) bind014 --> bind0 bind015(["wd:Q723359"]) bind015 --> bind0 bind016(["wd:Q4819399"]) bind016 --> bind0 bind017(["wd:Q25384171"]) bind017 --> bind0 bind018(["wd:Q56667183"]) bind018 --> bind0 bind019(["wd:Q4881486"]) bind019 --> bind0 bind020(["wd:Q5021768"]) bind020 --> bind0 bind021(["wd:Q17771263"]) bind021 --> bind0 bind022(["wd:Q17572099"]) bind022 --> bind0 bind023(["wd:Q101003894"]) bind023 --> bind0 bind024(["wd:Q43389980"]) bind024 --> bind0 bind025(["wd:Q6665021"]) bind025 --> bind0 bind026(["wd:Q43390004"]) bind026 --> bind0 bind027(["wd:Q116788697"]) bind027 --> bind0 bind028(["wd:Q67913321"]) bind028 --> bind0 bind029(["wd:Q17844144"]) bind029 --> bind0 bind030(["wd:Q17124680"]) bind030 --> bind0 v1 --"p:direct/P31"--> v2 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P625".-> v3 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:P115".-> v4 v4 --"p:statement/P115"--> v5 subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v5 -."p:direct/P625".-> v6 end end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P551".-> v7 v7 --"p:direct/P625"--> v8 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P159".-> v9 v9 --"p:direct/P625"--> v10 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v1 -."p:direct/P18".-> v11 end bind1[/"if(bound(?iloc),?iloc,if(bound(?teamparkloc),?teamparkloc,if(bound(?homeloc),?homeloc,if(bound(?hqloc),?hq,?null))))"/] v3 --o bind1 v6 --o bind1 v8 --o bind1 v10 --o bind1 v9 --o bind1 null --o bind1 bind1 --as--o v12 bind2[/"if(?itemtype = 'wd:Q476028','Football club',if(?itemtype = 'wd:Q55488','Station',if(?itemtype = 'wd:Q5','Person','Site')))"/] v2 --o bind2 bind2 --as--o v13 bind3[/"?itemdesc"/] v13 --o bind3 bind3 --as--o v14