Skip to content

Commit 0b050f2

Browse files
committed
Merge branch 'feature/retractionAspect'
2 parents 1d6cfc5 + 09f5c5e commit 0b050f2

13 files changed

+458
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{% extends "base.html" %}
2+
3+
{% set aspect = "retraction-index" %}
4+
{% block title %}Retractions - Scholia{% endblock %}
5+
6+
{% block in_ready %}
7+
8+
{{ sparql_to_iframe('retractions-per-year') }}
9+
{{ sparql_to_table('most-cited-retracted-works') }}
10+
{{ sparql_to_table('authors_with_many_retractions') }}
11+
{{ sparql_to_table('venues_with_many_retractions') }}
12+
{{ sparql_to_table('statements-with-retracted-references') }}
13+
14+
{% endblock %}
15+
16+
17+
18+
{% block page_content %}
19+
20+
<h1>Retractions</h1>
21+
22+
<h2 id="retractions-per-year">Retractions per year</h2>
23+
24+
<div class="embed-responsive embed-responsive-16by9">
25+
<iframe class="embed-responsive-item" id="retractions-per-year-iframe"></iframe>
26+
</div>
27+
28+
<h2 id="most-cited-retracted-works">Most cited retracted works</h2>
29+
30+
<table class="table table-hover" id="most-cited-retracted-works-table"></table>
31+
32+
<h2 id="authors_with_many_retractions">Authors with the most retractions</h2>
33+
34+
<table class="table table-hover" id="authors_with_many_retractions-table"></table>
35+
36+
<h2 id="venues_with_many_retractions">Venues with the most retractions</h2>
37+
38+
<table class="table table-hover" id="venues_with_many_retractions-table"></table>
39+
40+
<h2 id="statements-with-retracted-references">Wikidata statements citing retracted references</h2>
41+
42+
<table class="table table-hover" id="statements-with-retracted-references-table"></table>
43+
44+
{% endblock %}
45+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#sparql_endpoint = https://query.wikidata.org/sparql
2+
#sparql_endpoint_name= WDQS&nbsp;main
3+
#sparql_editurl = https://query.wikidata.org/#
4+
#sparql_embedurl = https://query.wikidata.org/embed.html#
5+
SELECT ?author ?authorLabel ?count WHERE {
6+
hint:Query hint:optimizer "None" .
7+
SERVICE wdsubgraph:scholarly_articles {
8+
SELECT ?author (COUNT(DISTINCT ?work) AS ?count) WHERE {
9+
{ ?work wdt:P31 wd:Q45182324 . } UNION
10+
{ ?work wdt:P793 wd:Q7316896 . } UNION
11+
{ ?work wdt:P5824 [] . }
12+
?work wdt:P50 ?author .
13+
} GROUP BY ?author ?authorLabel
14+
ORDER BY DESC(?count)
15+
LIMIT 100
16+
}
17+
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
18+
} ORDER BY DESC(?count)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
SELECT ?work ?workLabel (CONCAT("../retraction/", SUBSTR(STR(?work), 32)) AS ?workUrl)
6+
?count WITH {
7+
SELECT ?work (COUNT(DISTINCT ?citation) AS ?count) WHERE {
8+
hint:Query hint:optimizer "None" .
9+
{ ?work wdt:P31 wd:Q45182324 . } UNION
10+
{ ?work wdt:P793 wd:Q7316896 . } UNION
11+
{ ?work wdt:P5824 [] . }
12+
{ SERVICE wdsubgraph:wikidata_main { ?citation wdt:P2860 ?work . } } UNION
13+
{ ?citation wdt:P2860 ?work . }
14+
} GROUP BY ?work ORDER BY DESC(?count) LIMIT 100
15+
} AS %RETRACTIONS WHERE {
16+
INCLUDE %RETRACTIONS
17+
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
18+
} ORDER BY DESC(?count)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
SELECT
7+
(STR(?year_) AS ?year)
8+
(SUM(?count_) AS ?count)
9+
WHERE {
10+
{
11+
SELECT
12+
?year_
13+
(COUNT(DISTINCT ?retractedArticle) AS ?count_)
14+
WHERE {
15+
?retractedArticle p:P31 ?isRetractedPaperStatement .
16+
?isRetractedPaperStatement ps:P31 wd:Q45182324 .
17+
?isRetractedPaperStatement pq:P580 ?date .
18+
BIND(YEAR(?date) AS ?year_)
19+
}
20+
GROUP BY ?year_
21+
}
22+
}
23+
GROUP BY ?year_
24+
ORDER BY DESC(?year_)
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
SELECT DISTINCT ?entity ?entityLabel ?entityUrl
2+
?property ?propertyLabel ?value ?valueLabel
3+
?retracted ?retractedLabel
4+
(CONCAT("/retraction/", SUBSTR(STR(?retracted), 32)) AS ?retractedUrl)
5+
WITH {
6+
SELECT DISTINCT ?entity ?p ?statement ?retracted WHERE {
7+
?retracted wdt:P31 wd:Q45182324 .
8+
?entity ?p ?statement .
9+
?statement prov:wasDerivedFrom / pr:P248 ?retracted .
10+
}
11+
} AS %STATEMENTS WHERE {
12+
INCLUDE %STATEMENTS
13+
?p ^wikibase:claim ?property .
14+
?statement ?ps ?value .
15+
?ps ^wikibase:statementProperty ?property .
16+
BIND(?statement AS ?entityUrl)
17+
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
18+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#sparql_endpoint = https://query.wikidata.org/sparql
2+
#sparql_endpoint_name= WDQS&nbsp;main
3+
#sparql_editurl = https://query.wikidata.org/#
4+
#sparql_embedurl = https://query.wikidata.org/embed.html#
5+
SELECT
6+
?works
7+
?venue ?venueLabel
8+
(CONCAT("../venue/", SUBSTR(STR(?venue), 32)) AS ?venueUrl)
9+
?venueDescription
10+
WHERE {
11+
SERVICE wdsubgraph:scholarly_articles {
12+
{
13+
SELECT
14+
(COUNT(?work) AS ?works)
15+
?venue
16+
WHERE {
17+
?work wdt:P31 wd:Q45182324 ;
18+
wdt:P1433 ?venue .
19+
}
20+
GROUP BY ?venue
21+
ORDER BY DESC(?works)
22+
LIMIT 200
23+
}
24+
}
25+
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],mul,en". }
26+
}
27+
ORDER BY DESC(?works)
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{% extends "base.html" %}
2+
3+
{% set aspect = "retraction" %}
4+
{% block title %}Retractions - Scholia{% endblock %}
5+
6+
{% block in_ready %}
7+
8+
{{ sparql_to_table_post('data') }}
9+
10+
{{ sparql_to_table('list-of-authors') }}
11+
{{ sparql_to_iframe('citations-per-year') }}
12+
{{ sparql_to_table('statements-with-retracted-references') }}
13+
14+
{% endblock %}
15+
16+
17+
18+
{% block page_content %}
19+
20+
<h1 id="h1">Retraction</h1>
21+
22+
<table class="table table-hover" id="data-table"></table>
23+
24+
<h2 id="list-of-authors">List of authors</h2>
25+
26+
<table class="table table-hover" id="list-of-authors-table"></table>
27+
28+
<h2 id="citations-per-year">Citations per year</h2>
29+
30+
This plot shows the number of citations to the retracted article over time.
31+
If the date of retraction is known, it colors which citations have been made
32+
before and after the retraction.
33+
34+
<div class="embed-responsive embed-responsive-16by9">
35+
<iframe class="embed-responsive-item" id="citations-per-year-iframe"></iframe>
36+
</div>
37+
38+
<h2 id="statements-with-retracted-references">Wikidata statements citing retracted references</h2>
39+
40+
<table class="table table-hover" id="statements-with-retracted-references-table"></table>
41+
42+
{% endblock %}
43+
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#sparql_endpoint = https://query-scholarly.wikidata.org/sparql
2+
#sparql_endpoint_name= WDQS&nbsp;main
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+
?kind
12+
WHERE {
13+
{
14+
SELECT
15+
?year_
16+
(COUNT(DISTINCT ?citing_work) AS ?count_)
17+
?kind2
18+
WHERE {
19+
?citing_work wdt:P2860 target: .
20+
21+
# Year of citation
22+
?citing_work wdt:P577 ?date .
23+
BIND(YEAR(?date) AS ?year_)
24+
BIND(xsd:date(?date) AS ?pubDate_)
25+
26+
target: p:P31 ?isRetractedPaperStatement .
27+
?isRetractedPaperStatement ps:P31 wd:Q45182324 .
28+
?isRetractedPaperStatement pq:P580 ?retractionDate
29+
BIND(xsd:date(?retractionDate) AS ?retractionDate_)
30+
BIND (IF (?retractionDate_ > ?pubDate_,
31+
"before retraction", "after retraction") AS ?kind2)
32+
}
33+
GROUP BY ?year_ ?kind2
34+
}
35+
UNION
36+
{
37+
SELECT
38+
?year_
39+
(COUNT(DISTINCT ?citing_work) AS ?count_)
40+
?kind2
41+
WHERE {
42+
?citing_work wdt:P2860 target: .
43+
44+
# Year of citation
45+
?citing_work wdt:P577 ?date .
46+
BIND(YEAR(?date) AS ?year_)
47+
BIND(xsd:date(?date) AS ?pubDate_)
48+
MINUS { target: p:P31 / pq:P580 ?retractionDate }
49+
}
50+
GROUP BY ?year_ ?kind2
51+
}
52+
BIND(IF(BOUND(?kind2), ?kind2, "_") AS ?kind)
53+
}
54+
GROUP BY ?year_ ?kind
55+
ORDER BY DESC(?year_)
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
PREFIX target: <http://www.wikidata.org/entity/{{ q }}>
2+
3+
SELECT DISTINCT ?description ?value ?valueUrl
4+
WHERE {
5+
BIND(target: AS ?work)
6+
{
7+
BIND(1 AS ?order)
8+
BIND("Title" AS ?description)
9+
?work wdt:P1476 ?value .
10+
}
11+
UNION
12+
{
13+
SELECT
14+
(2 AS ?order)
15+
("Reviewers" AS ?description)
16+
(GROUP_CONCAT(?value_; separator=", ") AS ?value)
17+
(CONCAT("../authors/", GROUP_CONCAT(?q; separator=",")) AS ?valueUrl)
18+
{
19+
BIND(1 AS ?dummy)
20+
target: wdt:P4032 ?iri .
21+
BIND(SUBSTR(STR(?iri), 32) AS ?q)
22+
?iri rdfs:label ?value_string .
23+
FILTER (LANG(?value_string) = 'en')
24+
BIND(COALESCE(?value_string, ?q) AS ?value_)
25+
}
26+
GROUP BY ?dummy
27+
}
28+
UNION
29+
{
30+
BIND(3 AS ?order)
31+
BIND("Published in" AS ?description)
32+
?work wdt:P1433 ?iri .
33+
BIND(SUBSTR(STR(?iri), 32) AS ?q)
34+
?iri rdfs:label ?value_string .
35+
FILTER (LANG(?value_string) = 'en')
36+
BIND(COALESCE(?value_string, ?q) AS ?value)
37+
BIND(CONCAT("../venue/", ?q) AS ?valueUrl)
38+
}
39+
UNION
40+
{
41+
BIND(4 AS ?order)
42+
BIND("Publication date" AS ?description)
43+
?work p:P577 / psv:P577 ?publication_date_value .
44+
?publication_date_value wikibase:timePrecision ?time_precision ;
45+
wikibase:timeValue ?publication_date .
46+
BIND(IF(?time_precision = 9, YEAR(?publication_date), xsd:date(?publication_date)) AS ?value)
47+
}
48+
UNION
49+
{
50+
BIND(5 AS ?order)
51+
BIND("Retraction date" AS ?description)
52+
?work p:P31 ?isRetractedPaperStatement .
53+
?isRetractedPaperStatement ps:P31 wd:Q45182324 .
54+
?isRetractedPaperStatement pq:P580 ?retraction_date_value .
55+
BIND(xsd:date(?retraction_date_value) AS ?value)
56+
}
57+
UNION
58+
{
59+
BIND(6 AS ?order)
60+
BIND("Publisher" AS ?description)
61+
?work wdt:P123 ?iri .
62+
BIND(SUBSTR(STR(?iri), 32) AS ?q)
63+
?iri rdfs:label ?value_string .
64+
FILTER (LANG(?value_string) = 'en')
65+
BIND(COALESCE(?value_string, ?q) AS ?value)
66+
BIND(CONCAT("../publisher/", ?q) AS ?valueUrl)
67+
}
68+
UNION
69+
{
70+
BIND(7 AS ?order)
71+
BIND("DOI" AS ?description)
72+
?work wdt:P356 ?valueUrl_ .
73+
BIND(CONCAT("https://doi.org/", ENCODE_FOR_URI(?valueUrl_)) AS ?valueUrl)
74+
BIND(CONCAT(?valueUrl_, "") AS ?value)
75+
}
76+
UNION
77+
{
78+
BIND(8 AS ?order)
79+
BIND("🛑 Retracted by" AS ?description)
80+
?work wdt:P5824 ?iri .
81+
BIND(SUBSTR(STR(?iri), 32) AS ?q)
82+
?iri rdfs:label ?value_string .
83+
FILTER (LANG(?value_string) = 'en')
84+
BIND(COALESCE(?value_string, ?q) AS ?value)
85+
BIND(CONCAT("../work/", ?q) AS ?valueUrl)
86+
}
87+
UNION
88+
{
89+
BIND(9 AS ?order)
90+
BIND("⚠️ Cites retracted article" AS ?description)
91+
{ ?work wdt:P2860 ?retracted . ?retracted wdt:P31 wd:Q45182324 . }
92+
UNION
93+
{ ?work wdt:P2860 ?retracted . ?retracted wdt:P793 wd:Q7316896 . }
94+
UNION
95+
{ ?work wdt:P2860 ?retracted . ?retracted wdt:P5824 [] . }
96+
?retracted rdfs:label ?value_string .
97+
FILTER (LANG(?value_string) = 'en')
98+
BIND(SUBSTR(STR(?retracted), 32) AS ?q)
99+
BIND(COALESCE(?value_string, ?q) AS ?value)
100+
BIND(CONCAT("../work/", ?q) AS ?valueUrl)
101+
}
102+
}
103+
ORDER BY ?order

0 commit comments

Comments
 (0)