-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
53 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#defaultView:LineChart | ||
SELECT ?year ?number_of_citations ?work | ||
WITH { | ||
SELECT ?year (COUNT(DISTINCT ?citing_work) AS ?number_of_citations) ?work1 WHERE { | ||
VALUES ?work1 { {% for q in qs %} wd:{{ q }} {% endfor %} } | ||
?citing_work wdt:P2860 ?work1 . | ||
|
||
# Year of citation | ||
?citing_work wdt:P577 ?date . | ||
BIND(STR(YEAR(?date)) AS ?year) | ||
} | ||
GROUP BY ?year ?work1 | ||
} AS %counts | ||
WITH { | ||
SELECT ?year ?number_of_citations ?work1 (SAMPLE(?work1Labels) AS ?work1Label) WHERE { | ||
INCLUDE %counts | ||
?work1 rdfs:label ?work1Labels . | ||
} | ||
GROUP BY ?year ?number_of_citations ?work1 | ||
} AS %results | ||
WHERE { | ||
INCLUDE %results | ||
BIND(CONCAT(?work1Label, " (", SUBSTR(STR(?work1), 32), ")") AS ?work) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#defaultView:BubbleChart | ||
SELECT | ||
?count | ||
?topic ?topicLabel | ||
WITH { | ||
SELECT | ||
(COUNT(?work) AS ?count) | ||
?topic | ||
WHERE { | ||
VALUES ?work { {% for q in qs %} wd:{{ q }} {% endfor %} } | ||
?work wdt:P921 ?topic . | ||
} | ||
GROUP BY ?topic | ||
ORDER BY ?count | ||
LIMIT 200 | ||
} AS %results | ||
WHERE { | ||
INCLUDE %results | ||
SERVICE wikibase:label { | ||
bd:serviceParam wikibase:language "en,da,de,es,fr,nl,no,ru,sv,zh". } | ||
} | ||
ORDER BY DESC(?count) |