A set of SPARQL examples that are used in different TGX resources
License: https://www.gnu.org/licenses/gpl-3.0
Uses method in: https://github.com/WDscholia/scholia/tree/master/scholia/app/templates/topic_author-scores-graph.sparql
Topic aspect: author scores graph
PREFIX bd: <http://www.bigdata.com/rdf#>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wikibase: <http://wikiba.se/ontology#>
#defaultView:BubbleChart
PREFIX target: <http://www.wikidata.org/entity/Q45340488>
SELECT ?score ?author ?authorLabel
WITH {
SELECT
?author
(SUM(?score_) AS ?score)
WHERE {
{
?author wdt:P101/wdt:P279* target: .
BIND(20 AS ?score_)
}
UNION
{
SELECT (3 AS ?score_) ?author WHERE {
?work wdt:P50 ?author ;
wdt:P921/wdt:P279* target: .
}
}
UNION
{
SELECT (1 AS ?score_) ?author WHERE {
?cited_work wdt:P50 ?author .
?citing_work wdt:P2860 ?cited_work .
?citing_work wdt:P921/wdt:P279* target: .
}
}
}
GROUP BY ?author
ORDER BY DESC(?score)
LIMIT 200
} AS %results
WHERE {
INCLUDE %results
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en,da,de,es,jp,no,ru,sv,zh". }
}
ORDER BY DESC(?score)
LIMIT 200
graph TD