query-f9b0c6c561e0d3c9329bc01196b0a30b

rq turtle/ttl

Grafo de vecindad de conceptos de la Pandamia COVID-19Plantilla de visualización en grafo.

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX bd: <http://www.bigdata.com/rdf#>
# Neighbourhood graph of the covid core items
#PREFIX target: <http://www.wikidata.org/entity/Q84263196> # COVID-19 disease
#PREFIX target: <http://www.wikidata.org/entity/Q82069695> # SARS-CoV-2
PREFIX target: <http://www.wikidata.org/entity/Q81068910> # COVID-19 Pandemia 2019-2020
#defaultView:Graph
SELECT ?node ?nodeLabel ?childNode ?childNodeLabel ?rgb WHERE {
  {
    BIND(target: AS ?node)
    ?node ?p ?i.
    ?childNode ?x ?p.
    ?childNode rdf:type wikibase:Property.
    FILTER(STRSTARTS(STR(?i), "http://www.wikidata.org/entity/Q"))
    FILTER(STRSTARTS(STR(?childNode), "http://www.wikidata.org/entity/P"))

  }
  UNION
  {
    BIND("EFFBD8" AS ?rgb)
    target: ?p ?childNode.
    ?node ?x ?p.
    ?node rdf:type wikibase:Property.
    FILTER(STRSTARTS(STR(?childNode), "http://www.wikidata.org/entity/Q"))
  }

 MINUS { ?node wdt:P31/wdt:P279* wd:Q51118821} #Exclusión items internos de proyectos Wikimedia
  MINUS { ?childNode wdt:P31/wdt:P279* wd:Q51118821} #Exclusión relaciones internas de proyectos Wikimedia
  MINUS { ?childNode wdt:P31/wdt:P279* wd:Q15138389} #Exclusión relaciones internas de artículos Wikimedia
  SERVICE wikibase:label { bd:serviceParam wikibase:language "es,en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?childNode"):::projected v2("?i") v3("?node"):::projected v4("?p") v6("?rgb"):::projected v5("?x") a1((" ")) a2((" ")) a3((" ")) c13(["es,en"]):::literal c4(["wikibase:Property"]):::iri c9(["wd:Q15138389"]):::iri c5(["wd:Q81068910"]):::iri c8(["wd:Q51118821"]):::iri c11(["bd:serviceParam"]):::iri subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; f0[["starts-with(str(?childNode),'http://www.wikidata.org/entity/Q')"]] f0 --> v1 bind1[/"'EFFBD8'"/] bind1 --as--o v6 c5 -->v4--> v1 v3 -->v5--> v4 v3 --"a"--> c4 end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; f2[["starts-with(str(?childNode),'http://www.wikidata.org/entity/P')"]] f2 --> v1 f3[["starts-with(str(?i),'http://www.wikidata.org/entity/Q')"]] f3 --> v2 bind4[/"'wd:Q81068910'"/] bind4 --as--o v3 v3 -->v4--> v2 v1 -->v5--> v4 v1 --"a"--> c4 end union0r <== or ==> union0l end subgraph minus5["MINUS"] style minus5 stroke-width:6px,fill:pink,stroke:red; v3 --"wdt:P31"--> a1 a1 --"wdt:P279"--> c8 end subgraph minus6["MINUS"] style minus6 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> a2 a2 --"wdt:P279"--> c8 end subgraph minus7["MINUS"] style minus7 stroke-width:6px,fill:pink,stroke:red; v1 --"wdt:P31"--> a3 a3 --"wdt:P279"--> c9 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c13 end