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/author_most-citing-authors.sparql
Author aspect: most citing authors
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:Table
PREFIX target: <http://www.wikidata.org/entity/Q97270>
SELECT
?count
?citing_author ?citing_authorLabel
# Either show the ORCID iD or construct part of a URL to search on the ORCID homepage
(COALESCE(?orcid_, CONCAT("orcid-search/search/?searchQuery=", ENCODE_FOR_URI(?citing_authorLabel))) AS ?orcid)
WITH {
SELECT (COUNT(?citing_work) AS ?count) ?citing_author WHERE {
?work wdt:P50 target: .
?citing_work wdt:P2860 ?work .
MINUS { ?citing_work wdt:P50 target: }
?citing_work wdt:P50 ?citing_author .
}
GROUP BY ?citing_author
ORDER BY DESC(?count)
LIMIT 500
} AS %counts
WITH {
# An author might have multiple ORCID iDs
SELECT
?count
?citing_author
(SAMPLE(?orcids) AS ?orcid_)
WHERE {
INCLUDE %counts
OPTIONAL { ?citing_author wdt:P496 ?orcids }
}
GROUP BY ?count ?citing_author
} AS %result
WHERE {
INCLUDE %result
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en" . }
}
ORDER BY DESC(?count)
graph TD