query-27df7aa14b48e97e0ff9594aba748bd3

rq turtle/ttl

Query #2: Graph of identified researchers within an organization used to identify potential collaborators (clustered by occupation)

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
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#>
PREFIX bd: <http://www.bigdata.com/rdf#>
#defaultView:Graph
SELECT ?item ?itemLabel ?itemDescription ?orcidIdURL ?image ?occupation ?occupationLabel ("CF0A2C" as ?rgb)
WHERE 
{
  ?item wdt:P31 wd:Q5 ; # instance of a human
        rdfs:label ?itemLabel .
  ?item wdt:P108 wd:Q2302311 ; # University of Nevada, Las Vegas
        wdt:P108 ?employer .
  ?item wdt:P106 ?occupation .
  OPTIONAL { ?item wdt:P18 ?image . }
  OPTIONAL {?item wdt:P496 ?orcidId . }
  BIND (URI(CONCAT("https://orcid.org/", ENCODE_FOR_URI (?orcidId))) AS ?orcidIdURL)
  FILTER (?employer IN (wd:Q2302311)) # Filter out employers NOT the University of Nevada, Las Vegas
  FILTER (lang(?itemLabel) = "en") # Display English label
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}
ORDER BY ?itemLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?employer") v5("?image"):::projected v3("?item"):::projected v1("?itemLabel"):::projected v4("?occupation"):::projected v6("?orcidId") v7("?orcidIdURL"):::projected v8("?rgb") c11(["bd:serviceParam"]):::iri c2(["wd:Q2302311"]):::iri c4(["wd:Q5"]):::iri c1(["en"]):::literal f0[["?itemLabel = 'en'"]] f0 --> v1 f1[["?employer = 'wd:Q2302311'"]] f1 --> v2 v3 --"wdt:P31"--> c4 v3 --"rdfs:label"--> v1 v3 --"wdt:P108"--> c2 v3 --"wdt:P108"--> v2 v3 --"wdt:P106"--> v4 subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P18".-> v5 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v3 -."wdt:P496".-> v6 end bind2[/"concat('https://orcid.org/',encode-for-uri(?orcidId))"/] v6 --o bind2 bind2 --as--o v7 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c11 --"wikibase:language"--> c1 end bind3[/"'CF0A2C'"/] bind3 --as--o v8