sparql-examples

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

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

170

rq turtle/ttl

Sponsor aspect: Scatterplot of project budgets associated with a funder

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#>
# title: Scatterplot of project budgets associated with a funder

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

#defaultView:ScatterChart
SELECT ?start_time ?budget ?project ?projectLabel WHERE {
  ?project wdt:P859+ target: .
  ?project wdt:P2769 ?budget .
  ?project (wdt:P580 | wdt:P571) ?start_time .
  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;
  v2("?budget"):::projected 
  v1("?project"):::projected 
  v3("?start_time"):::projected 
  c7([http://www.bigdata.com/rdf#serviceParam]):::iri 
  c2([http://www.wikidata.org/entity/Q1200258]):::iri 
  c9(["#91;AUTO_LANGUAGE#93;,mul,en"]):::literal 
  v1 --"p:direct/P859"-->  c2
  v1 --"p:direct/P2769"-->  v2
  subgraph union0[" Union "]
  subgraph union0l[" "]
    style union0l fill:#abf,stroke-dasharray: 3 3;
    v1 --"p:direct/P571"-->  v3
  end
  subgraph union0r[" "]
    style union0r fill:#abf,stroke-dasharray: 3 3;
    v1 --"p:direct/P580"-->  v3
  end
  union0r <== or ==> union0l
  end
  subgraph s1["http://wikiba.se/ontology#label"]
    style s1 stroke-width:4px;
    c7 --"wikibase:language"-->  c9
  end