query-7f1ac0caa748b0a5dd25a568e3dec1a5
Propertiesmaintained by WikiProject (P6104)DOI (P356)author name string (P2093)cites work (P2860)
Use at
- https://query.wikidata.org/sparql
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/Q56241615>
SELECT
# Number of works with the author
?count
# Author score - 3 points for authoring a work, 1 for being cited
?score
# Author as a string
?author
# Build URL to the Author disambiguator tool
(URI(CONCAT(
'https://author-disambiguator.toolforge.org/names_oauth.php?doit=Look+for+author&name=',
ENCODE_FOR_URI(?author))) AS ?resolver_url)
# Generate a score for each author
WHERE {
{
SELECT
(COUNT(?work) AS ?count)
?author
WHERE {
{
SELECT DISTINCT ?work WHERE {
?work wdt:P6104 target: ;
wdt:P356 ?doi .
}
LIMIT 1000
} ?work wdt:P2093 ?author .
}
GROUP BY ?author
} {
SELECT (SUM(?score_) AS ?score) ?author
WHERE {
{
# Assign them 3 points if they are an author of a work on the subject
SELECT (3 AS ?score_) ?author ?work WHERE {
?work wdt:P2093 ?author .
?work wdt:P6104 target: .
}
}
UNION
{
# Assign them 1 point if they are the author of a work that is cited by a work on the subject
SELECT (1 AS ?score_) ?author ?work WHERE {
?work wdt:P2093 ?author .
?citing_work wdt:P2860 ?work .
?citing_work wdt:P6104 target: .
}
}
}
GROUP BY ?author
}
# Label the result
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" . }
}
ORDER BY DESC(?count) DESC(?score)
LIMIT 200
Query found at
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v5("?author"):::projected
v7("?citing_work")
v6("?count"):::projected
v4("?doi")
v8("?resolver_url")
v8("?score"):::projected
v8("?score_")
v3("?work")
c7(["bd:serviceParam"]):::iri
c2([http://www.wikidata.org/entity/Q56241615]):::iri
c9(["#91;AUTO_LANGUAGE#93;,en"]):::literal
v3 --"wdt:P6104"--> c2
v3 --"wdt:P356"--> v4
v3 --"wdt:P2093"--> v5
bind1[/"count(?work)"/]
v3 --o bind1
bind1 --as--o v6
subgraph union0[" Union "]
subgraph union0l[" "]
style union0l fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P2093"--> v5
v7 --"wdt:P2860"--> v3
v7 --"wdt:P6104"--> c2
bind2[/"'1^^xsd:integer'"/]
bind2 --as--o v8
end
subgraph union0r[" "]
style union0r fill:#abf,stroke-dasharray: 3 3;
v3 --"wdt:P2093"--> v5
v3 --"wdt:P6104"--> c2
bind3[/"'3^^xsd:integer'"/]
bind3 --as--o v8
end
union0r <== or ==> union0l
end
bind5[/"sum(?score_)"/]
v8 --o bind5
bind5 --as--o v8
subgraph s1["http://wikiba.se/ontology#label"]
style s1 stroke-width:4px;
c7 --"wikibase:language"--> c9
end
bind6[/"concat('https://author-disambiguator.toolforge.org/names_oauth.php?doit=Look+for+author&name=',encode-for-uri(?author))"/]
v5 --o bind6
bind6 --as--o v8