sparql-examples

A set of SPARQL examples that are used in different TGX resources

View the Project on GitHub BiGCAT-UM/sparql-examples

072

rq turtle/ttl

Event-series aspect: map

Use at

PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
#defaultView:Map

PREFIX target: <http://www.wikidata.org/entity/Q47501052>

SELECT ?event ?eventLabel ?geo ?image WHERE {
  ?event (wdt:P179 | wdt:P31) target: .
  ?event wdt:P276? / wdt:P625 ?geo .
  OPTIONAL { ?event wdt:P18 ?image . }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en" . }
}

graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v1("?event"):::projected 
  v2("?geo"):::projected 
  v3("?image"):::projected 
  a1((" "))
  c8([http://www.bigdata.com/rdf#serviceParam]):::iri 
  c2([http://www.wikidata.org/entity/Q47501052]):::iri 
  c10(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal 
  subgraph union0[" Union "]
  subgraph union0l[" "]
    style union0l fill:#abf,stroke-dasharray: 3 3;
    v1 --"p:direct/P31"-->  c2
  end
  subgraph union0r[" "]
    style union0r fill:#abf,stroke-dasharray: 3 3;
    v1 --"p:direct/P179"-->  c2
  end
  union0r <== or ==> union0l
  end
  subgraph union1[" Union "]
  subgraph union1l[" "]
    style union1l fill:#abf,stroke-dasharray: 3 3;
    v1 --"p:direct/P276"-->  a1
  end
  subgraph union1r[" "]
    style union1r fill:#abf,stroke-dasharray: 3 3;
  end
  union1r <== or ==> union1l
  end
  a1 --"p:direct/P625"-->  v2
  subgraph optional0["(optional)"]
  style optional0 fill:#bbf,stroke-dasharray: 5 5;
    v1 -."p:direct/P18".->  v3
  end
  subgraph s1["http://wikiba.se/ontology#label"]
    style s1 stroke-width:4px;
    c8 --"wikibase:language"-->  c10
  end