query-ae0b8986377d273a1e3cdd7a1c9cdfe0

rq turtle/ttl

Related researchers

Use at

PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX target: <http://www.wikidata.org/entity/Q18618629>

SELECT
  ?score
  ?roles

  ?researcher ?researcherLabel
  (CONCAT("#author/", SUBSTR(STR(?researcher), 32)) AS ?researcherUrl)
  ?researcherDescription
WHERE {
   {
  SELECT 
    (SUM(?score_) AS ?score)
    (GROUP_CONCAT(DISTINCT ?role; separator=", ") AS ?roles)
    ?researcher 
  WHERE {
    { 
      BIND("supervisor" AS ?role)
      BIND(15 AS ?score_)
      target: wdt:P184 ?researcher .
    }
    UNION
    { 
      BIND("student" AS ?role)
      BIND(10 AS ?score_)
      target: wdt:P185 ?researcher .
    }
    UNION
    { 
      BIND("co-author" AS ?role)
      BIND(5 AS ?score_)
      [] wdt:P50 target:, ?researcher
    }
    UNION
    {
      BIND("cited author" AS ?role)
      BIND(2 AS ?score_)
      [] wdt:P50 target: ;
         wdt:P2860 / wdt:P50 ?researcher .
    }
    UNION
    {
      BIND("citing author" AS ?role)
      BIND(1 AS ?score_)
      [] wdt:P50 target: ;
         ^wdt:P2860 / wdt:P50 ?researcher .
    }
    UNION
    {
      BIND("coeditor" AS ?role)
      BIND(5 AS ?score_)
      [] wdt:P98 target: , ?researcher .
    }
  }
  GROUP BY ?researcher 
  ORDER BY DESC(?score)
  LIMIT 200
}  FILTER (target: != ?researcher)
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?score)

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v2("?researcher"):::projected v6("?researcherUrl") v5("?role") v5("?roles"):::projected v5("?score"):::projected v5("?score_") a1((" ")) a2((" ")) a4((" ")) a6((" ")) a3((" ")) a5((" ")) c8(["bd:serviceParam"]):::iri c1([http://www.wikidata.org/entity/Q18618629]):::iri c10(["#91;AUTO_LANGUAGE#93;,en"]):::literal f0[["http://www.wikidata.org/entity/Q18618629 != ?researcher"]] f0 --> v2 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; bind1[/"'coeditor'"/] bind1 --as--o v5 bind2[/"'5^^xsd:integer'"/] bind2 --as--o v5 a6 --"wdt:P98"--> c1 a6 --"wdt:P98"--> v2 end subgraph union4r[" "] style union4r fill:#abf,stroke-dasharray: 3 3; bind3[/"'citing author'"/] bind3 --as--o v5 bind4[/"'1^^xsd:integer'"/] bind4 --as--o v5 a4 --"wdt:P50"--> c1 a5 --"wdt:P2860"--> a4 a5 --"wdt:P50"--> v2 end union4r <== or ==> union4l end end subgraph union3r[" "] style union3r fill:#abf,stroke-dasharray: 3 3; bind5[/"'cited author'"/] bind5 --as--o v5 bind6[/"'2^^xsd:integer'"/] bind6 --as--o v5 a2 --"wdt:P50"--> c1 a2 --"wdt:P2860"--> a3 a3 --"wdt:P50"--> v2 end union3r <== or ==> union3l end end subgraph union2r[" "] style union2r fill:#abf,stroke-dasharray: 3 3; bind7[/"'co-author'"/] bind7 --as--o v5 bind8[/"'5^^xsd:integer'"/] bind8 --as--o v5 a1 --"wdt:P50"--> c1 a1 --"wdt:P50"--> v2 end union2r <== or ==> union2l end end subgraph union1r[" "] style union1r fill:#abf,stroke-dasharray: 3 3; bind9[/"'student'"/] bind9 --as--o v5 bind10[/"'10^^xsd:integer'"/] bind10 --as--o v5 c1 --"wdt:P185"--> v2 end union1r <== or ==> union1l end end subgraph union0r[" "] style union0r fill:#abf,stroke-dasharray: 3 3; bind11[/"'supervisor'"/] bind11 --as--o v5 bind12[/"'15^^xsd:integer'"/] bind12 --as--o v5 c1 --"wdt:P184"--> v2 end union0r <== or ==> union0l end bind15[/"sum(?score_)"/] v5 --o bind15 bind15 --as--o v5 bind16[/"?role"/] v5 --o bind16 bind16 --as--o v5 subgraph s1["http://wikiba.se/ontology#label"] style s1 stroke-width:4px; c8 --"wikibase:language"--> c10 end bind17[/"concat('#author/',substring(str(?researcher),'32^^xsd:integer'))"/] v2 --o bind17 bind17 --as--o v6