query-796636e65b8c7c8e1e455d11cfd2774b

rq turtle/ttl

title: WGTN People SELECT DISTINCT ?academic ?academicLabel ?academicDescription ?academicAltLabel ?scholia ?lccnurl ?viafurl ?orcidurl ?dob ?dod ?genderLabel ?ethnicLabel ?tribeLabel WHERE { # wd:Q1150437 == Victoria University of Wellington # wd:Q42417045 == Wellington College of Education # wd:Q17067645 == THW Press

## section where we express who we are interested in ?academic wdt:P31 wd:Q5 . # academic is a person { ?academic wdt:P69 ?inst # employed VALUES ?inst { wd:Q1150437 wd:Q42417045 } . } UNION { ?academic wdt:P108 ?inst # educated VALUES ?inst { wd:Q1150437 wd:Q42417045 } . } UNION { ?thesis wdt:P4101 wd:Q1150437 . # thesis submitted to Victoria University of Wellington ?thesis wdt:P50 ?academic . # author of } UNION { ?book wdt:P123 wd:Q17067645 . # book published by THW Press ?book wdt:P50 ?academic . }

## section where we express what we want to know about them

OPTIONAL { ?academic wdt:P21 ?gender . } .
OPTIONAL { ?academic wdt:P172 ?ethnic . } .
OPTIONAL { ?academic wdt:P12011 ?tribe . } .

OPTIONAL { ?academic wdt:P569 ?dob . } .
OPTIONAL { ?academic wdt:P570 ?dod . } .

BIND( URI(CONCAT('https://scholia.toolforge.org/author/', STRAFTER(STR(?academic), "/entity/"))) AS ?scholia ) . OPTIONAL { ?academic wdt:P244 ?lccn . BIND( IRI(CONCAT('https://lccn.loc.gov/', STR(?lccn))) AS ?lccnurl ) . } . OPTIONAL { ?academic wdt:P214 ?viaf . BIND( IRI(CONCAT('https://viaf.org/viaf/', STR(?viaf))) AS ?viafurl ) . } . OPTIONAL { ?academic wdt:P496 ?orcid . BIND( IRI(CONCAT('https://orcid.org/', STR(?orcid))) AS ?orcidurl ) . } .

SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } }

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title: WGTN People
SELECT DISTINCT ?academic ?academicLabel ?academicDescription ?academicAltLabel ?scholia ?lccnurl ?viafurl ?orcidurl  ?dob ?dod ?genderLabel ?ethnicLabel ?tribeLabel WHERE {
   #  wd:Q1150437  == Victoria University of Wellington
   #  wd:Q42417045 == Wellington College of Education
   #  wd:Q17067645 == THW Press

   ## section where we express who we are interested in
   ?academic wdt:P31 wd:Q5 . # academic is a person
   {
      ?academic wdt:P69 ?inst # employed
      VALUES ?inst { wd:Q1150437  wd:Q42417045 } .
   } UNION {
      ?academic wdt:P108 ?inst # educated 
      VALUES ?inst { wd:Q1150437  wd:Q42417045 } .
   } UNION {
      ?thesis wdt:P4101 wd:Q1150437 . # thesis submitted to Victoria University of Wellington
      ?thesis wdt:P50 ?academic .  # author of
   } UNION {
      ?book wdt:P123 wd:Q17067645 . # book published by THW Press
      ?book wdt:P50 ?academic . 
   }

   ## section where we express what we want to know about them

   OPTIONAL { ?academic wdt:P21 ?gender . } .   
   OPTIONAL { ?academic wdt:P172 ?ethnic . } .  
   OPTIONAL { ?academic wdt:P12011 ?tribe . } .   

   OPTIONAL { ?academic wdt:P569 ?dob . } .   
   OPTIONAL { ?academic wdt:P570 ?dod . } .   

   BIND( URI(CONCAT('https://scholia.toolforge.org/author/', STRAFTER(STR(?academic), "/entity/")))  AS ?scholia ) .
   OPTIONAL { ?academic wdt:P244 ?lccn .  BIND( IRI(CONCAT('https://lccn.loc.gov/', STR(?lccn)))  AS ?lccnurl ) .   } . 
   OPTIONAL { ?academic wdt:P214 ?viaf .  BIND( IRI(CONCAT('https://viaf.org/viaf/', STR(?viaf)))  AS ?viafurl ) . } . 
   OPTIONAL { ?academic wdt:P496 ?orcid .  BIND( IRI(CONCAT('https://orcid.org/', STR(?orcid)))  AS ?orcidurl ) . } . 

   SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?academic"):::projected v4("?book") v8("?dob"):::projected v9("?dod"):::projected v6("?ethnic") v5("?gender") v3("?inst") v11("?lccn") v12("?lccnurl"):::projected v15("?orcid") v16("?orcidurl"):::projected v10("?scholia"):::projected v3("?thesis") v7("?tribe") v13("?viaf") v14("?viafurl"):::projected c19(["bd:serviceParam"]):::iri c6(["wd:Q1150437"]):::iri c2(["wd:Q5"]):::iri c21(["#91;AUTO_LANGUAGE#93;,en"]):::literal c9(["wd:Q17067645"]):::iri v1 --"wdt:P31"--> c2 subgraph union0[" Union "] subgraph union0l[" "] style union0l fill:#abf,stroke-dasharray: 3 3; subgraph union1[" Union "] subgraph union1l[" "] style union1l fill:#abf,stroke-dasharray: 3 3; subgraph union2[" Union "] subgraph union2l[" "] style union2l fill:#abf,stroke-dasharray: 3 3; v4 --"wdt:P123"--> c9 v4 --"wdt:P50"--> v1 end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v3 --"wdt:P4101"--> c6 v3 --"wdt:P50"--> v1 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P108"--> v3 bind0[/VALUES ?inst/] bind0-->v3 bind00(["wd:Q1150437"]) bind00 --> bind0 bind01(["wd:Q42417045"]) bind01 --> bind0 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v1 --"wdt:P69"--> v3 bind1[/VALUES ?inst/] bind1-->v3 bind10(["wd:Q1150437"]) bind10 --> bind1 bind11(["wd:Q42417045"]) bind11 --> bind1 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P21".-> v5 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P172".-> v6 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P12011".-> v7 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P569".-> v8 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P570".-> v9 end bind2[/"concat('https://scholia.toolforge.org/author/',substring-after(str(?academic),'/entity/'))"/] v1 --o bind2 bind2 --as--o v10 subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P244".-> v11 bind3[/"concat('https://lccn.loc.gov/',str(?lccn))"/] v11 --o bind3 bind3 --as--o v12 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P214".-> v13 bind4[/"concat('https://viaf.org/viaf/',str(?viaf))"/] v13 --o bind4 bind4 --as--o v14 end subgraph optional7["(optional)"] style optional7 fill:#bbf,stroke-dasharray: 5 5; v1 -."wdt:P496".-> v15 bind5[/"concat('https://orcid.org/',str(?orcid))"/] v15 --o bind5 bind5 --as--o v16 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c19 --"wikibase:language"--> c21 end