query-6313286b236d26af619c07d4bb9eef2b
Visualize UNLV faculty by occupation
Use at
- https://query.wikidata.org/sparql
#GRAPH OF UNLV FACULTY BY OCCUPATION
#defaultView:Graph
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?item ?itemLabel ?itemDescription ?occupation ?occupationLabel ("CF0A2C" as ?rgb) ?image
WHERE {
?item wdt:P31 wd:Q5 ;
wdt:P108 wd:Q2302311 ;
wdt:P106 ?occupation .
#?item wdt:P1416 wd:Q73644758 . # use to limit set by affiliation (i.e. UNLV Libraries Q73644758)
#FILTER(?occupation != wd:Q1622272) # use to remove an occupation from the set
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
OPTIONAL { ?item wdt:P18 ?image. }
}
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?image"):::projected
v1("?item"):::projected
v2("?occupation"):::projected
v4("?rgb")
c7(["bd:serviceParam"]):::iri
c4(["wd:Q2302311"]):::iri
c2(["wd:Q5"]):::iri
c9(["en"]):::literal
v1 --"wdt:P31"--> c2
v1 --"wdt:P108"--> c4
v1 --"wdt:P106"--> v2
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
subgraph optional0["(optional)"]
style optional0 fill:#bbf,stroke-dasharray: 5 5;
v1 -."wdt:P18".-> v3
end
bind0[/"'CF0A2C'"/]
bind0 --as--o v4