Skip to content

Commit ec25441

Browse files
committed
Adds a panel to show CiTO annotations of citations to this retracted article, if and only if there is such annotation, otherwise no panel is shown
1 parent 2caca1d commit ec25441

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ASK {
2+
[] pq:P3712 / wdt:P31 wd:Q96471816 ; ps:P2860 wd:{{q}} . BIND("work-cito" AS ?aspectsubpage)
3+
}

scholia/app/templates/retraction.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
{{ sparql_to_iframe('citations-per-year') }}
1212
{{ sparql_to_table('statements-with-retracted-references') }}
1313

14+
{% call ask_query_callback('cito') %}
15+
16+
{{ sparql_to_iframe('cito-incoming-chart') }}
17+
18+
{% endcall %}
19+
1420
{% endblock %}
1521

1622

@@ -35,6 +41,14 @@ <h2 id="citations-per-year">Citations per year</h2>
3541
<iframe class="embed-responsive-item" id="citations-per-year-iframe"></iframe>
3642
</div>
3743

44+
<div id="cito" class="d-none">
45+
<h2 id="cito-incoming">Reasons why this retracted article is cited</h2>
46+
47+
<div class="embed-responsive embed-responsive-16by9">
48+
<iframe class="embed-responsive-item" id="cito-incoming-chart-iframe"></iframe>
49+
</div>
50+
</div>
51+
3852
<h2 id="statements-with-retracted-references">Wikidata statements citing retracted references</h2>
3953

4054
<table class="table table-hover" id="statements-with-retracted-references-table"></table>
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#sparql_endpoint= https://query-scholarly.wikidata.org/sparql
2+
#sparql_endpoint_name= WDQS&nbsp;scholarly
3+
#sparql_editurl= https://query-scholarly.wikidata.org/#
4+
#sparql_embedurl= https://query-scholarly.wikidata.org/embed.html#
5+
#defaultView:BarChart
6+
PREFIX target: <http://www.wikidata.org/entity/{{ q }}>
7+
8+
SELECT
9+
(STR(?year_) AS ?year)
10+
(SUM(?count_) AS ?count)
11+
?intentionLabel
12+
WHERE {
13+
{
14+
SELECT
15+
?year_
16+
?intention ?intentionLabel
17+
(COUNT(DISTINCT ?citing_work) AS ?count_)
18+
WHERE {
19+
?citing_work p:P2860 ?citationStatement .
20+
?citationStatement pq:P3712 ?intention ;
21+
ps:P2860 target: .
22+
SERVICE wdsubgraph:wikidata_main {
23+
?intention wdt:P31 wd:Q96471816 ;
24+
rdfs:label ?intentionLabel .
25+
FILTER (lang(?intentionLabel) = "en")
26+
}
27+
28+
# Year of citation
29+
?citing_work wdt:P577 ?date .
30+
BIND(YEAR(?date) AS ?year_)
31+
BIND(xsd:date(?date) AS ?pubDate_)
32+
}
33+
GROUP BY ?year_ ?intention ?intentionLabel
34+
}
35+
}
36+
GROUP BY ?year_ ?intention ?intentionLabel
37+
ORDER BY DESC(?year_)

0 commit comments

Comments
 (0)