query-f4854beb6137821bbe08dab20d4eba0c

rq turtle/ttl

show a map of NFDI

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 pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Map
SELECT DISTINCT ?p ?pLabel ?affiliationType ?affiliationTypeLabel ?w ?wLabel ?geoLoc ?geoHead
# ?p:consortium, ?w:institution
WHERE 
{
  ?p wdt:P31 wd:Q98270496 ;
  p:P1416 ?statement .
  ?statement ps:P1416 ?w .

  # type of affiliation
  OPTIONAL { ?statement pq:P3831 ?affiliationType }
  # location of institution
  OPTIONAL { ?w wdt:P625 ?geoLoc }
  # location of headquarters of institution
  OPTIONAL { ?w wdt:P159/wdt:P625 ?geoHead }
  # coalesce locations of institution and headquarters
  BIND(COALESCE(?geoLoc, ?geoHead) AS ?geoLoc)  
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en,[AUTO_LANGUAGE]" }
} ORDER BY ASC(?pLabel) ASC(?affiliationTypeLabel) ASC(?wLabel)

Query found at