query-380ecb179c1ccfa3a49cb7571eec1a59

rq turtle/ttl

Query for isotope consistency checkI recently found a number of mistake / vandalism where the number of neutrons for isotopes had been modified without anybody noticing, it seems. I found more problems using this query :

Use at

PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX ps: <http://www.wikidata.org/prop/statement/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX p: <http://www.wikidata.org/prop/>
select ?isotope ?rank ?neutron_number ?at_number {
  ?isotopeclass wdt:P279* wd:Q25276 .
  ?isotope p:P31 [ ps:P31 ?isotopeclass ;
                          pq:P1545 ?rank ] .
  ?isotope wdt:P1148 ?neutron_number ;
           wdt:P1086 ?at_number .

   filter (?at_number + ?neutron_number != xsd:integer(?rank)  ) # check that the ranking number is the sum of the atomic number and the neutron number

}

Query found at

graph TD classDef projected fill:lightgreen; classDef literal fill:orange; classDef iri fill:yellow; v1("?at_number"):::projected v5("?isotope"):::projected v4("?isotopeclass") v2("?neutron_number"):::projected v3("?rank"):::projected a1((" ")) c2(["wd:Q25276"]):::iri f0[["?at_number + ?neutron_number != http://www.w3.org/2001/XMLSchema#integer(?rank)"]] f0 --> v1 f0 --> v2 f0 --> v3 v4 --"p:direct/P279"--> c2 a1 --"p:statement/P31"--> v4 a1 --"p:qualifier/P1545"--> v3 v5 --"p:P31"--> a1 v5 --"p:direct/P1148"--> v2 v5 --"p:direct/P1086"--> v1