query-f0fc2cce645357589aa83208a807c202

rq turtle/ttl

title: New Zealand research people

SELECT DISTINCT ?academic ?academicLabel ?academicDescription ?academicAltLabel (GROUP_CONCAT(DISTINCT ?scholia; SEPARATOR = ";") AS ?Scholia_urls) (GROUP_CONCAT(DISTINCT ?lccnurl; SEPARATOR = ";") AS ?LCCN_urls) (GROUP_CONCAT(DISTINCT ?viafurl; SEPARATOR = ";") AS ?VIAF_urls) (GROUP_CONCAT(DISTINCT ?orcidurl; SEPARATOR = ";") AS ?ORCID_urls) (GROUP_CONCAT(DISTINCT ?dob; SEPARATOR = ";") AS ?DOBs) (GROUP_CONCAT(DISTINCT ?dod; SEPARATOR = ";") AS ?DODs) (GROUP_CONCAT(DISTINCT ?genderLabel; SEPARATOR = ";") AS ?Genders) (GROUP_CONCAT(DISTINCT ?ethnicLabel; SEPARATOR = ";") AS ?Ethnicities) (GROUP_CONCAT(DISTINCT ?tribeLabel; SEPARATOR = ";") AS ?Tribes) (GROUP_CONCAT(DISTINCT ?orientLabel; SEPARATOR = ";") AS ?Orientations) (GROUP_CONCAT(DISTINCT ?web; SEPARATOR = ";") AS ?Website_URLS) (GROUP_CONCAT(DISTINCT ?turnurl; SEPARATOR = ";") AS ?ATL_ID_urls) (GROUP_CONCAT(DISTINCT ?papaurl; SEPARATOR = ";") AS ?Te_Papa_ID_urls) (GROUP_CONCAT(DISTINCT ?areurl; SEPARATOR = ";") AS ?Te_Ara_ID_urls) (GROUP_CONCAT(DISTINCT ?komurl; SEPARATOR = ";") AS ?Kōmako_ID_urls)

WHERE {

# define a set of institutions we're interested in (need to broaden this: more polytechics, museums, etc)

VALUES ?inst { # wgtn.ac.nz
wd:Q1150437 wd:Q42417045 wd:Q17067645 wd:Q864860 # canterbury
wd:Q432475 wd:Q98762296 wd:Q106879289 # massey
wd:Q1134606 wd:Q111584166 # otago
wd:Q1201513 wd:Q43062411 wd:Q7896034 wd:Q45135879 # auckland
wd:Q492467 wd:Q4819572 wd:Q104203517 wd:Q122973190 # lincoln
wd:Q1048626 # waikato wd:Q606140 # AUT wd:Q758659 wd:Q99287521 wd:Q123875358 wd:Q99285561 wd:Q73784427
# DSIR and successors
wd:Q17513775 wd:Q6484356 wd:Q389704 wd:Q5906602 wd:Q7554874 wd:Q116039094 wd:Q935203 wd:Q104097072 wd:Q7015441 wd:Q1503201 wd:Q1665158 wd:Q1983244 wd:Q1466498 wd:Q1661937 wd:Q16256127 # polytechics
wd:Q86902171 wd:Q7893913 wd:Q2495129 # research-conducting ministries
wd:Q100254215
# museums wd:Q915603 wd:Q1033769 wd:Q7424149
# wānanga wd:Q60775079 wd:Q18167396 wd:Q7691039 } .

## section where we express who we are interested in by their relationships to the insittutions

?academic wdt:P31 wd:Q5 . # academic is a person { #has a direct relationship ?academic ?wildcard ?inst } UNION { #has a direct relationship ?inst ?wildcard ?academic } UNION { # has a thesis submitted to ?thesis wdt:P4101 ?inst . ?thesis wdt:P50 ?academic . } UNION { # has a book published by ?book wdt:P123 ?inst . ?book wdt:P50 ?academic . } UNION { ?academic wdt:P12702 ?komid . } UNION { ?academic p:P166 ?award . ?award ps:P166 wd:Q30456287 . # Fellow of the Royal Society Te Apārangi }

## 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:P91 ?orient . } .
OPTIONAL { ?academic wdt:P856 ?web. } .

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 ) . } . OPTIONAL { ?academic wdt:P6683 ?turnid . BIND( IRI(CONCAT('https://tiaki.natlib.govt.nz/#details=ethesaurus.', STR(?turnid))) AS ?turnurl ) . } . OPTIONAL { ?academic wdt:P4544 ?papaid . BIND( IRI(CONCAT('https://collections.tepapa.govt.nz/agent/', STR(?papaid))) AS ?papaurl ) . } . OPTIONAL { ?academic wdt:P2745 ?areid . BIND( IRI(CONCAT('https://teara.govt.nz/en/biographies/', STR(?areid))) AS ?areurl ) . } . OPTIONAL { ?academic wdt:P12702 ?komid . BIND( IRI(CONCAT('https://www.komako.org.nz/person/', STR(?komid))) AS ?komurl ) . } .

SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }

} GROUP BY ?academic ?academicLabel ?academicDescription ?academicAltLabel

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 p: <http://www.wikidata.org/prop/>
PREFIX bd: <http://www.bigdata.com/rdf#>
#title: New Zealand research people
#
SELECT DISTINCT ?academic 
   ?academicLabel 
   ?academicDescription 
   ?academicAltLabel 
   (GROUP_CONCAT(DISTINCT ?scholia; SEPARATOR = ";") AS ?Scholia_urls)
   (GROUP_CONCAT(DISTINCT ?lccnurl; SEPARATOR = ";") AS ?LCCN_urls)
   (GROUP_CONCAT(DISTINCT ?viafurl; SEPARATOR = ";") AS ?VIAF_urls)
   (GROUP_CONCAT(DISTINCT ?orcidurl; SEPARATOR = ";") AS ?ORCID_urls)
   (GROUP_CONCAT(DISTINCT ?dob; SEPARATOR = ";") AS ?DOBs)
   (GROUP_CONCAT(DISTINCT ?dod; SEPARATOR = ";") AS ?DODs)
   (GROUP_CONCAT(DISTINCT ?genderLabel; SEPARATOR = ";") AS ?Genders)
   (GROUP_CONCAT(DISTINCT ?ethnicLabel; SEPARATOR = ";") AS ?Ethnicities)
   (GROUP_CONCAT(DISTINCT ?tribeLabel; SEPARATOR = ";") AS ?Tribes)
   (GROUP_CONCAT(DISTINCT ?orientLabel; SEPARATOR = ";") AS ?Orientations)
   (GROUP_CONCAT(DISTINCT ?web; SEPARATOR = ";") AS ?Website_URLS)
   (GROUP_CONCAT(DISTINCT ?turnurl; SEPARATOR = ";") AS ?ATL_ID_urls)
   (GROUP_CONCAT(DISTINCT ?papaurl; SEPARATOR = ";") AS ?Te_Papa_ID_urls)
   (GROUP_CONCAT(DISTINCT ?areurl; SEPARATOR = ";") AS ?Te_Ara_ID_urls)
   (GROUP_CONCAT(DISTINCT ?komurl; SEPARATOR = ";") AS ?Kōmako_ID_urls)

   WHERE {

   # define a set of institutions we're interested in (need to broaden this: more polytechics, museums, etc)  

   VALUES ?inst { 
   # wgtn.ac.nz      
   wd:Q1150437 wd:Q42417045 wd:Q17067645  wd:Q864860
   # canterbury      
   wd:Q432475 wd:Q98762296 wd:Q106879289
   # massey          
   wd:Q1134606 wd:Q111584166
   # otago           
   wd:Q1201513 wd:Q43062411 wd:Q7896034 wd:Q45135879
   # auckland        
   wd:Q492467 wd:Q4819572 wd:Q104203517 wd:Q122973190
   # lincoln         
   wd:Q1048626
   # waikato
   wd:Q606140 
   # AUT
   wd:Q758659 wd:Q99287521 wd:Q123875358 wd:Q99285561 wd:Q73784427         
   # DSIR and successors           
   wd:Q17513775 wd:Q6484356 wd:Q389704 wd:Q5906602 wd:Q7554874 wd:Q116039094 wd:Q935203 wd:Q104097072 wd:Q7015441 wd:Q1503201 wd:Q1665158 wd:Q1983244 wd:Q1466498 wd:Q1661937 wd:Q16256127
   # polytechics     
   wd:Q86902171  wd:Q7893913 wd:Q2495129
   # research-conducting ministries      
   wd:Q100254215  
   # museums
   wd:Q915603 wd:Q1033769 wd:Q7424149   
   # wānanga 
   wd:Q60775079 wd:Q18167396 wd:Q7691039
   } .

   ## section where we express who we are interested in by their relationships to the insittutions

   ?academic wdt:P31 wd:Q5 . # academic is a person
   {
      #has a direct relationship
      ?academic ?wildcard ?inst 
   } UNION    {
      #has a direct relationship
      ?inst ?wildcard ?academic
   } UNION {
      # has a thesis submitted to
      ?thesis wdt:P4101  ?inst . 
      ?thesis wdt:P50 ?academic . 
   } UNION {
      # has a book published by
      ?book wdt:P123  ?inst  . 
      ?book wdt:P50 ?academic . 
   } UNION {
      ?academic wdt:P12702 ?komid .
   } UNION {
      ?academic p:P166 ?award .
      ?award ps:P166 wd:Q30456287 . #  Fellow of the Royal Society Te Apārangi 
   }


   ## 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:P91 ?orient . } .   
   OPTIONAL { ?academic wdt:P856 ?web. } .   

   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 ) . } . 
   OPTIONAL { ?academic wdt:P6683 ?turnid .  BIND( IRI(CONCAT('https://tiaki.natlib.govt.nz/#details=ethesaurus.', STR(?turnid)))  AS ?turnurl ) . } . 
   OPTIONAL { ?academic wdt:P4544 ?papaid .  BIND( IRI(CONCAT('https://collections.tepapa.govt.nz/agent/', STR(?papaid)))  AS ?papaurl ) . } . 
   OPTIONAL { ?academic wdt:P2745 ?areid .  BIND( IRI(CONCAT('https://teara.govt.nz/en/biographies/', STR(?areid)))  AS ?areurl ) . } . 
   OPTIONAL { ?academic wdt:P12702 ?komid .  BIND( IRI(CONCAT('https://www.komako.org.nz/person/', STR(?komid)))  AS ?komurl ) . } . 

   SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }

}
GROUP BY ?academic ?academicLabel ?academicDescription ?academicAltLabel

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v44("?ATL_ID_urls") v37("?DOBs") v38("?DODs") v40("?Ethnicities") v39("?Genders") v47("?Kōmako_ID_urls") v34("?LCCN_urls") v36("?ORCID_urls") v42("?Orientations") v33("?Scholia_urls") v46("?Te_Ara_ID_urls") v45("?Te_Papa_ID_urls") v41("?Tribes") v35("?VIAF_urls") v43("?Website_URLS") v2("?academic"):::projected v26("?areid") v27("?areurl"):::projected v7("?award") v5("?book") v13("?dob"):::projected v14("?dod"):::projected v9("?ethnic") v30("?ethnicLabel"):::projected v8("?gender") v29("?genderLabel"):::projected v1("?inst") v6("?komid") v28("?komurl"):::projected v16("?lccn") v17("?lccnurl"):::projected v20("?orcid") v21("?orcidurl"):::projected v11("?orient") v32("?orientLabel"):::projected v24("?papaid") v25("?papaurl"):::projected v15("?scholia"):::projected v4("?thesis") v10("?tribe") v31("?tribeLabel"):::projected v22("?turnid") v23("?turnurl"):::projected v18("?viaf") v19("?viafurl"):::projected v12("?web"):::projected v3("?wildcard") c24(["bd:serviceParam"]):::iri c2(["wd:Q5"]):::iri c9(["wd:Q30456287"]):::iri c26(["en"]):::literal bind0[/VALUES ?inst/] bind0-->v1 bind00(["wd:Q1150437"]) bind00 --> bind0 bind01(["wd:Q42417045"]) bind01 --> bind0 bind02(["wd:Q17067645"]) bind02 --> bind0 bind03(["wd:Q864860"]) bind03 --> bind0 bind04(["wd:Q432475"]) bind04 --> bind0 bind05(["wd:Q98762296"]) bind05 --> bind0 bind06(["wd:Q106879289"]) bind06 --> bind0 bind07(["wd:Q1134606"]) bind07 --> bind0 bind08(["wd:Q111584166"]) bind08 --> bind0 bind09(["wd:Q1201513"]) bind09 --> bind0 bind010(["wd:Q43062411"]) bind010 --> bind0 bind011(["wd:Q7896034"]) bind011 --> bind0 bind012(["wd:Q45135879"]) bind012 --> bind0 bind013(["wd:Q492467"]) bind013 --> bind0 bind014(["wd:Q4819572"]) bind014 --> bind0 bind015(["wd:Q104203517"]) bind015 --> bind0 bind016(["wd:Q122973190"]) bind016 --> bind0 bind017(["wd:Q1048626"]) bind017 --> bind0 bind018(["wd:Q606140"]) bind018 --> bind0 bind019(["wd:Q758659"]) bind019 --> bind0 bind020(["wd:Q99287521"]) bind020 --> bind0 bind021(["wd:Q123875358"]) bind021 --> bind0 bind022(["wd:Q99285561"]) bind022 --> bind0 bind023(["wd:Q73784427"]) bind023 --> bind0 bind024(["wd:Q17513775"]) bind024 --> bind0 bind025(["wd:Q6484356"]) bind025 --> bind0 bind026(["wd:Q389704"]) bind026 --> bind0 bind027(["wd:Q5906602"]) bind027 --> bind0 bind028(["wd:Q7554874"]) bind028 --> bind0 bind029(["wd:Q116039094"]) bind029 --> bind0 bind030(["wd:Q935203"]) bind030 --> bind0 bind031(["wd:Q104097072"]) bind031 --> bind0 bind032(["wd:Q7015441"]) bind032 --> bind0 bind033(["wd:Q1503201"]) bind033 --> bind0 bind034(["wd:Q1665158"]) bind034 --> bind0 bind035(["wd:Q1983244"]) bind035 --> bind0 bind036(["wd:Q1466498"]) bind036 --> bind0 bind037(["wd:Q1661937"]) bind037 --> bind0 bind038(["wd:Q16256127"]) bind038 --> bind0 bind039(["wd:Q86902171"]) bind039 --> bind0 bind040(["wd:Q7893913"]) bind040 --> bind0 bind041(["wd:Q2495129"]) bind041 --> bind0 bind042(["wd:Q100254215"]) bind042 --> bind0 bind043(["wd:Q915603"]) bind043 --> bind0 bind044(["wd:Q1033769"]) bind044 --> bind0 bind045(["wd:Q7424149"]) bind045 --> bind0 bind046(["wd:Q60775079"]) bind046 --> bind0 bind047(["wd:Q18167396"]) bind047 --> bind0 bind048(["wd:Q7691039"]) bind048 --> bind0 v2 --"p:direct/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; subgraph union3[" Union "] subgraph union3l[" "] style union3l fill:#abf,stroke-dasharray: 3 3; subgraph union4[" Union "] subgraph union4l[" "] style union4l fill:#abf,stroke-dasharray: 3 3; v2 --"p:P166"--> v7 v7 --"p:statement/P166"--> c9 end subgraph union4r[" "] style union4r fill:#abf,stroke-dasharray: 3 3; v2 --"p:direct/P12702"--> v6 end union4r <== or ==> union4l end end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; v5 --"p:direct/P123"--> v1 v5 --"p:direct/P50"--> v2 end union3r <== or ==> union3l end end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; v4 --"p:direct/P4101"--> v1 v4 --"p:direct/P50"--> v2 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; v1 -->v3--> v2 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; v2 -->v3--> v1 end union0r <== or ==> union0l end subgraph optional0["(optional)"] style optional0 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P21".-> v8 end subgraph optional1["(optional)"] style optional1 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P172".-> v9 end subgraph optional2["(optional)"] style optional2 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P12011".-> v10 end subgraph optional3["(optional)"] style optional3 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P91".-> v11 end subgraph optional4["(optional)"] style optional4 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P856".-> v12 end subgraph optional5["(optional)"] style optional5 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P569".-> v13 end subgraph optional6["(optional)"] style optional6 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P570".-> v14 end bind1[/"concat('https://scholia.toolforge.org/author/',substring-after(str(?academic),'/entity/'))"/] v2 --o bind1 bind1 --as--o v15 subgraph optional7["(optional)"] style optional7 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P244".-> v16 bind2[/"concat('https://lccn.loc.gov/',str(?lccn))"/] v16 --o bind2 bind2 --as--o v17 end subgraph optional8["(optional)"] style optional8 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P214".-> v18 bind3[/"concat('https://viaf.org/viaf/',str(?viaf))"/] v18 --o bind3 bind3 --as--o v19 end subgraph optional9["(optional)"] style optional9 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P496".-> v20 bind4[/"concat('https://orcid.org/',str(?orcid))"/] v20 --o bind4 bind4 --as--o v21 end subgraph optional10["(optional)"] style optional10 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P6683".-> v22 bind5[/"concat('https://tiaki.natlib.govt.nz/#details=ethesaurus.',str(?turnid))"/] v22 --o bind5 bind5 --as--o v23 end subgraph optional11["(optional)"] style optional11 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P4544".-> v24 bind6[/"concat('https://collections.tepapa.govt.nz/agent/',str(?papaid))"/] v24 --o bind6 bind6 --as--o v25 end subgraph optional12["(optional)"] style optional12 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P2745".-> v26 bind7[/"concat('https://teara.govt.nz/en/biographies/',str(?areid))"/] v26 --o bind7 bind7 --as--o v27 end subgraph optional13["(optional)"] style optional13 fill:#bbf,stroke-dasharray: 5 5; v2 -."p:direct/P12702".-> v6 bind8[/"concat('https://www.komako.org.nz/person/',str(?komid))"/] v6 --o bind8 bind8 --as--o v28 end subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c24 --"wikibase:language"--> c26 end bind24[/"?scholia"/] v15 --o bind24 bind24 --as--o v33 bind25[/"?lccnurl"/] v17 --o bind25 bind25 --as--o v34 bind26[/"?viafurl"/] v19 --o bind26 bind26 --as--o v35 bind27[/"?orcidurl"/] v21 --o bind27 bind27 --as--o v36 bind28[/"?dob"/] v13 --o bind28 bind28 --as--o v37 bind29[/"?dod"/] v14 --o bind29 bind29 --as--o v38 bind30[/"?genderLabel"/] v29 --o bind30 bind30 --as--o v39 bind31[/"?ethnicLabel"/] v30 --o bind31 bind31 --as--o v40 bind32[/"?tribeLabel"/] v31 --o bind32 bind32 --as--o v41 bind33[/"?orientLabel"/] v32 --o bind33 bind33 --as--o v42 bind34[/"?web"/] v12 --o bind34 bind34 --as--o v43 bind35[/"?turnurl"/] v23 --o bind35 bind35 --as--o v44 bind36[/"?papaurl"/] v25 --o bind36 bind36 --as--o v45 bind37[/"?areurl"/] v27 --o bind37 bind37 --as--o v46 bind38[/"?komurl"/] v28 --o bind38 bind38 --as--o v47