query-d83967a54b928279e03ec9385c2af3cc

rq turtle/ttl

Map of organisations/companies developing/manufacturing a vaccine in trials

Use at

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#>
#defaultView:Map
SELECT DISTINCT ?item ?itemLabel ?org ?orgLabel ?loc
WHERE 
{
  { ?item wdt:P31 wd:Q87719492 } UNION {
    VALUES ?v { wd:Q84263196 wd:Q82069695 }
    VALUES ?vv { wd:Q134808 wd:Q28051899 }
    ?item wdt:P31 ?vv.
    ?item wdt:P1924 ?v.
  }
  OPTIONAL
  {
    VALUES ?type { wd:Q3560939 wd:Q96695067 wd:Q96841548 wd:Q578537 wd:Q97153934 wd:Q97153933 wd:Q58623657 wd:Q99518999 }
    ?item wdt:P31 ?type
  }
  OPTIONAL {
    VALUES ?p { wdt:P176 wdt:P178 }
    ?item ?p ?org.
    OPTIONAL { ?org wdt:P159 [ wdt:P625 ?hloc ]. }
    OPTIONAL { ?org wdt:P625 ?cloc. }
    BIND (IF (BOUND(?hloc), ?hloc, ?cloc) AS ?loc)
    ?org rdfs:label ?orgLabel. FILTER( LANG(?orgLabel)="en" )
  }
  ?item rdfs:label ?itemLabel. FILTER( LANG(?itemLabel)="en" )
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v10("?cloc") v9("?hloc") v3("?item"):::projected v1("?itemLabel"):::projected v11("?loc"):::projected v8("?org"):::projected v2("?orgLabel"):::projected v7("?p") v6("?type") v4("?v") v5("?vv") a1((" ")) c3(["wd:Q87719492"]):::iri f0[["?itemLabel = 'en'"]] f0 --> v1 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; bind1[/VALUES ?v/] bind1-->v4 bind10(["wd:Q84263196"]) bind10 --> bind1 bind11(["wd:Q82069695"]) bind11 --> bind1 bind2[/VALUES ?vv/] bind2-->v5 bind20(["wd:Q134808"]) bind20 --> bind2 bind21(["wd:Q28051899"]) bind21 --> bind2 v3 --"wdt:P31"--> v5 v3 --"wdt:P1924"--> v4 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P31"--> c3 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; bind3[/VALUES ?type/] bind3-->v6 bind30(["wd:Q3560939"]) bind30 --> bind3 bind31(["wd:Q96695067"]) bind31 --> bind3 bind32(["wd:Q96841548"]) bind32 --> bind3 bind33(["wd:Q578537"]) bind33 --> bind3 bind34(["wd:Q97153934"]) bind34 --> bind3 bind35(["wd:Q97153933"]) bind35 --> bind3 bind36(["wd:Q58623657"]) bind36 --> bind3 bind37(["wd:Q99518999"]) bind37 --> bind3 v3 -."wdt:P31".-> v6 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; bind4[/VALUES ?p/] bind4-->v7 bind40(["wdt:P176"]) bind40 --> bind4 bind41(["wdt:P178"]) bind41 --> bind4 v3 -->v7--> v8 subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; a1 -."wdt:P625".-> v9 v8 --"wdt:P159"--> a1 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v8 -."wdt:P625".-> v10 end bind5[/"if(bound(?hloc),?hloc,?cloc)"/] v9 --o bind5 v10 --o bind5 bind5 --as--o v11 v8 --"rdfs:label"--> v2 end v3 --"rdfs:label"--> v1