Wikidata:WikiProject Retractions/SPARQL

From Wikidata
Jump to navigation Jump to search

This page lists SPARQL queries to use the data in Wikidata.

Retractions

[edit]

Highly cited retracted papers

[edit]
#title: highly cited retracted papers
SELECT ?work ?workLabel ?publisherLabel ?count WITH {
  SELECT ?work (SAMPLE(?publisher_) AS ?publisher) (COUNT(DISTINCT ?citation) AS ?count) WHERE {
    { ?work wdt:P31 wd:Q45182324 . } UNION
    { ?work wdt:P793 wd:Q7316896 . } UNION
    { ?work wdt:P5824 [] . }
    ?work wdt:P1433 / wdt:P123 ?publisher_ .
    ?citation wdt:P2860 ?work .
} GROUP BY ?work ?workLabel
  ORDER BY DESC(?count)
  LIMIT 100
} AS %WORKS WHERE {
  INCLUDE %WORKS
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY DESC(?count)
highly cited retracted papers

Authors with many retracted papers

[edit]
#title: authors with many retractions
SELECT ?author ?authorLabel ?count WITH {
  SELECT ?author (COUNT(DISTINCT ?work) AS ?count) WHERE {
    { ?work wdt:P31 wd:Q45182324 . } UNION
    { ?work wdt:P793 wd:Q7316896 . } UNION
    { ?work wdt:P5824 [] . }
    ?work wdt:P50 ?author .
    ?citation wdt:P2860 ?work .
  } GROUP BY ?author
    ORDER BY DESC(?count)
    LIMIT 100
} AS %AUTHORS WHERE {
  INCLUDE %AUTHORS
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY DESC(?count)
authors with many retractions

Publishers with many retracted papers

[edit]
#title: publishers and their retracted paper count
SELECT ?publisher ?publisherLabel ?count WITH {
  SELECT ?publisher (COUNT(DISTINCT ?work) AS ?count) WHERE {
    { ?work wdt:P31 wd:Q45182324 . } UNION
    { ?work wdt:P793 wd:Q7316896 . } UNION
    { ?work wdt:P5824 [] . }
    ?work wdt:P1433 / wdt:P123 ?publisher .
} GROUP BY ?publisher
  ORDER BY DESC(?count)
  LIMIT 100
} AS %WORKS WHERE {
  INCLUDE %WORKS
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY DESC(?count)
publishers and their retracted paper count

Citations to retractions

[edit]

Journals with how often they cite a retracted article

[edit]
#title: journals with how often they cite a retracted article
SELECT ?journal ?journalLabel ?count WITH {
  SELECT ?journal (COUNT(DISTINCT ?citesRetracted) AS ?count) WHERE {
    ?citesRetracted wdt:P2860 / wdt:P31 wd:Q45182324 ;
                    wdt:P1433 ?journal .
  } GROUP BY ?journal
} AS %JOURNALS {
  INCLUDE %JOURNALS
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY DESC(?count)
journals with how often they cite a retracted article

Articles by an author citing a retracted article (ORCID)

[edit]

The author is identified by their ORCID.

#title: articles by an author citing a retracted article
SELECT ?date ?article ?articleLabel ?retractionDate ?retractedArticle ?retractedArticleLabel
WHERE {
  VALUES ?orcid { "0000-0001-7542-0286" } # change the ORCID for other authors
  ?researcher wdt:P496 ?orcid .
  ?article wdt:P50 ?researcher; wdt:P2860 ?retractedArticle ; wdt:P577 ?date .
  ?retractedArticle wdt:P31 wd:Q45182324 .
  OPTIONAL {
    ?retractedArticle wdt:P5824 ?retraction .
    OPTIONAL { ?retraction wdt:P577 ?retractionDate }
  }
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
articles by an author citing a retracted article

Articles citing retracted articles by a research organization (ROR)

[edit]

This query takes longer, depending on the size of the organization. For "02jz4aj89" it takes 15-20 seconds for me.

#title: Researchers at a particular research organization citing retracted articles (ROR)
SELECT ?researcher ?researcherLabel ?orcid ?count WITH {
  SELECT ?researcher ?orcid
       (COUNT(DISTINCT ?article) AS ?count)
  WHERE {
    VALUES ?ror { "02jz4aj89" } # 02jz4aj89 is Maastricht University
    ?researcher ( wdt:P108| wdt:P463 | wdt:P1416 ) / wdt:P361* ?organization .
    OPTIONAL { ?researcher wdt:P496 ?orcid }
    ?organization wdt:P6782 ?ror .
    ?article wdt:P50 ?researcher; wdt:P2860 ?retractedArticle .
    ?retractedArticle wdt:P31 wd:Q45182324 .
  } GROUP BY ?researcher ?orcid
    ORDER BY DESC(?count)
} AS %RESEARCHERS WHERE {
  INCLUDE %RESEARCHERS
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
} ORDER BY DESC(?count)
Researchers at a particular research organization citing retracted articles (ROR)

Wikidata statements with a retracted paper as reference

[edit]
#title: Wikidata statements with a retracted paper as reference
SELECT DISTINCT ?entity ?entityLabel ?propertyLabel ?valueLabel ?retracted ?retractedLabel WITH {
  SELECT DISTINCT ?entity ?p ?statement ?retracted WHERE {
    ?retracted wdt:P31 wd:Q45182324 .
    ?entity ?p ?statement .
    ?statement prov:wasDerivedFrom / pr:P248 ?retracted .
  }
} AS %STATEMENTS WHERE {
  INCLUDE %STATEMENTS
  ?p ^wikibase:claim ?property .
  ?statement ?ps ?value .
  ?ps ^wikibase:statementProperty ?property .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Wikidata statements with a retracted paper as reference