WikidataFacts created this task.
WikidataFacts added a project: Wikidata.
Restricted Application added a subscriber: Aklapper.

TASK DESCRIPTION
  I tried to find the shortest rivers on Wikidata with this query 
<https://query.wikidata.org/#SELECT%20%3Friver%20%3FriverLabel%20%3Flength%20WITH%20%7B%0A%20%20SELECT%20%3Friver%20%3Flength%20WHERE%20%7B%0A%20%20%20%20%3Friver%20wdt%3AP31%2Fwdt%3AP279%2a%20wd%3AQ4022%3B%0A%20%20%20%20%20%20%20%20%20%20%20p%3AP2043%2Fpsn%3AP2043%2Fwikibase%3AquantityAmount%20%3Flength.%20hint%3APrior%20hint%3ArangeSafe%20true.%0A%20%20%20%20FILTER%28%3Flength%20%3C%20100%29%0A%20%20%7D%0A%20%20ORDER%20BY%20ASC%28%3Flength%29%0A%20%20LIMIT%20100%0A%7D%20AS%20%25results%20WHERE%20%7B%0A%20%20INCLUDE%20%25results.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%7D%0AORDER%20BY%20ASC%28%3Flength%29>
 (because of this video <https://www.youtube.com/watch?v=WEGzvZ85dgs>) and 
noticed something strange: this item 
<http://www.wikidata.org/entity/Q20983749>, with a length of 0.6±1 km.
  
  The non-normalized quantity looks fine:
  
    v:d0fe3cbb763bf8122165d4518e81a3b9 a wikibase:QuantityValue ;
            wikibase:quantityAmount "+0.600"^^xsd:decimal ;
            wikibase:quantityUpperBound "+1.600"^^xsd:decimal ;
            wikibase:quantityLowerBound "-0.400"^^xsd:decimal ;
            wikibase:quantityUnit <http://www.wikidata.org/entity/Q828224> .
  
  The lower bound doesn’t make much sense – the river can’t very well have a 
negative length – but that’s not the RDF output’s fault: 0.6±1 km is just not 
an especially sensible length. Something strange happens in the normalized 
quantity, though:
  
    v:2faaf9c571f69e68f960c7fe0861a7cd a wikibase:QuantityValue ;
            wikibase:quantityAmount "+0"^^xsd:decimal ;
            wikibase:quantityUpperBound "+2000"^^xsd:decimal ;
            wikibase:quantityLowerBound "+0"^^xsd:decimal ;
            wikibase:quantityUnit <http://www.wikidata.org/entity/Q11573> .
  
  For some reason, 0.6±1 km has been normalized into 0 m, with 0 m as the lower 
bound and 2000 m as the upper bound. The amount is no longer in the middle 
between the lower and upper bound, and all three have somehow become rounded, 
but not very reasonably (in my opinion).
  
  Some more experiments on the sandbox item (in each snippet, the first value 
is the non-normalized one:
  
    v:5ce3d09e8e7eba9deafb3011aebe3ef7 a wikibase:QuantityValue ;
            wikibase:quantityAmount "+0.1"^^xsd:decimal ;
            wikibase:quantityUpperBound "+1.1"^^xsd:decimal ;
            wikibase:quantityLowerBound "-0.9"^^xsd:decimal ;
            wikibase:quantityUnit <http://www.wikidata.org/entity/Q828224> .
    
    v:ce5e974a091c1129b4963329f10f3506 a wikibase:QuantityValue ;
            wikibase:quantityAmount "+0"^^xsd:decimal ;
            wikibase:quantityUpperBound "+1000"^^xsd:decimal ;
            wikibase:quantityLowerBound "+0"^^xsd:decimal ;
            wikibase:quantityUnit <http://www.wikidata.org/entity/Q11573> .
  
  
  
    v:916f03bc72105a5a33b9bbb7c0b5c33b a wikibase:QuantityValue ;
            wikibase:quantityAmount "+0.9"^^xsd:decimal ;
            wikibase:quantityUpperBound "+1.9"^^xsd:decimal ;
            wikibase:quantityLowerBound "-0.1"^^xsd:decimal ;
            wikibase:quantityUnit <http://www.wikidata.org/entity/Q828224> .
    
    v:2faaf9c571f69e68f960c7fe0861a7cd a wikibase:QuantityValue ;
            wikibase:quantityAmount "+0"^^xsd:decimal ;
            wikibase:quantityUpperBound "+2000"^^xsd:decimal ;
            wikibase:quantityLowerBound "+0"^^xsd:decimal ;
            wikibase:quantityUnit <http://www.wikidata.org/entity/Q11573> .
  
  
  
    v:e7ab9a2622b2cf048baa32406d548189 a wikibase:QuantityValue ;
            wikibase:quantityAmount "+1.9"^^xsd:decimal ;
            wikibase:quantityUpperBound "+2.9"^^xsd:decimal ;
            wikibase:quantityLowerBound "+0.9"^^xsd:decimal ;
            wikibase:quantityUnit <http://www.wikidata.org/entity/Q828224> .
    
    v:0c87644a59a22600b6af4b823c4c9306 a wikibase:QuantityValue ;
            wikibase:quantityAmount "+2000"^^xsd:decimal ;
            wikibase:quantityUpperBound "+3000"^^xsd:decimal ;
            wikibase:quantityLowerBound "+0"^^xsd:decimal ;
            wikibase:quantityUnit <http://www.wikidata.org/entity/Q11573> .
  
  See also T68580#1258899 <https://phabricator.wikimedia.org/T68580#1258899> 
for some remarks by @daniel on how precision should affect unit conversion; 
it’s not clear to me if what he describes there was already implemented at the 
time, but I don’t think the behavior found here matches that description 
anyways.

TASK DETAIL
  https://phabricator.wikimedia.org/T233647

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: WikidataFacts
Cc: Aklapper, WikidataFacts, daniel, darthmon_wmde, DannyS712, Nandana, Lahi, 
Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, 
Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to