Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scholia/app/templates/ask_retraction_cito.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ASK {
[] pq:P3712 / wdt:P31 wd:Q96471816 ; ps:P2860 wd:{{q}} . BIND("work-cito" AS ?aspectsubpage)
}
14 changes: 14 additions & 0 deletions scholia/app/templates/retraction.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
{{ sparql_to_iframe('citations-per-year') }}
{{ sparql_to_table('statements-with-retracted-references') }}

{% call ask_query_callback('cito') %}

{{ sparql_to_iframe('cito-incoming-chart') }}

{% endcall %}

{% endblock %}


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

<div id="cito" class="d-none">
<h2 id="cito-incoming">Reasons why this retracted article is cited</h2>

<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" id="cito-incoming-chart-iframe"></iframe>
</div>
</div>

<h2 id="statements-with-retracted-references">Wikidata statements citing retracted references</h2>

<table class="table table-hover" id="statements-with-retracted-references-table"></table>
Expand Down
37 changes: 37 additions & 0 deletions scholia/app/templates/retraction_cito-incoming-chart.sparql
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#sparql_endpoint= https://query-scholarly.wikidata.org/sparql
#sparql_endpoint_name= WDQS&nbsp;scholarly
#sparql_editurl= https://query-scholarly.wikidata.org/#
#sparql_embedurl= https://query-scholarly.wikidata.org/embed.html#
#defaultView:BarChart
PREFIX target: <http://www.wikidata.org/entity/{{ q }}>

SELECT
(STR(?year_) AS ?year)
(SUM(?count_) AS ?count)
?intentionLabel
WHERE {
{
SELECT
?year_
?intention ?intentionLabel
(COUNT(DISTINCT ?citing_work) AS ?count_)
WHERE {
?citing_work p:P2860 ?citationStatement .
?citationStatement pq:P3712 ?intention ;
ps:P2860 target: .
SERVICE wdsubgraph:wikidata_main {
?intention wdt:P31 wd:Q96471816 ;
rdfs:label ?intentionLabel .
FILTER (lang(?intentionLabel) = "en")
}

# Year of citation
?citing_work wdt:P577 ?date .
BIND(YEAR(?date) AS ?year_)
BIND(xsd:date(?date) AS ?pubDate_)
}
GROUP BY ?year_ ?intention ?intentionLabel
}
}
GROUP BY ?year_ ?intention ?intentionLabel
ORDER BY DESC(?year_)