Skip to content

Instantly share code, notes, and snippets.

@egonw
Last active February 18, 2023 10:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save egonw/b66ffaec246895879aa4d16df83db6ed to your computer and use it in GitHub Desktop.
Save egonw/b66ffaec246895879aa4d16df83db6ed to your computer and use it in GitHub Desktop.
Citation history of the 20 most cited articles for the target author
#defaultView:BarChart
SELECT ?year (count(distinct ?citing_work) as ?count) ?workLabel WITH {
SELECT (count(distinct ?citing_work) as ?totalCount) ?work WHERE {
?work wdt:P50 / wdt:P496 "0000-0001-7542-0286" .
?citing_work wdt:P2860 ?work .
} group by ?work
order by DESC(?totalCount)
limit 10
} AS %PAPERS WHERE {
INCLUDE %PAPERS
?citing_work wdt:P2860 ?work .
?citing_work wdt:P577 ?date .
BIND(str(YEAR(?date)) AS ?year)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} group by ?year ?workLabel
having (?year < "2021")
order by desc(?year)
#defaultView:BarChart
PREFIX target: <http://www.wikidata.org/entity/Q20895241>
SELECT ?year (count(distinct ?citing_work) as ?count) ?workLabel WITH {
SELECT (count(distinct ?citing_work) as ?totalCount) ?work WHERE {
?work wdt:P50 target: .
?citing_work wdt:P2860 ?work .
} group by ?work
order by DESC(?totalCount)
limit 20
} AS %PAPERS WHERE {
INCLUDE %PAPERS
?citing_work wdt:P2860 ?work .
?citing_work wdt:P577 ?date .
BIND(str(YEAR(?date)) AS ?year)
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} group by ?year ?workLabel
order by desc(?year)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment