Page MenuHomePhabricator

Light-year and gigaparsec do not show up in the query for the longest things on Wikidata.
Closed, InvalidPublic

Description

When asking WDQS to list the longest things, Gigaparsec (Q14916719), Astronomical unit (Q1811), or light-year (Q531) would expected to be included near the top of the least, before light-second (Q909315), which currently leads the list as the longest thing.

Query: https://query.wikidata.org/#PREFIX%20psn%3A%20%3Chttp%3A%2F%2Fwww.wikidata.org%2Fprop%2Fstatement%2Fvalue-normalized%2F%3E%0A%0ASELECT%20%3Fitem%20%3FitemLabel%20%3Flength%20WHERE%20%7B%0A%20%20%3Fitem%20p%3AP2043%2Fpsn%3AP2043%2Fwikibase%3AquantityAmount%20%3Flength%20.%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%0A%20bd%3AserviceParam%20wikibase%3Alanguage%20%22en%22%20.%0A%7D%0A%7D%20ORDER%20BY%20DESC%28%3Flength%29%20LIMIT%2010

It's unclear why this is not the case. We might be hitting an overflow issue somewhere, or it has to do with the fact that the relevant items are not only long things, they are themselves units. But then, so is light-second, and it is listed.

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

daniel created this task.Nov 14 2016, 2:02 PM
Restricted Application added a project: Discovery. · View Herald TranscriptNov 14 2016, 2:02 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Nikki added a subscriber: Nikki.Nov 14 2016, 2:11 PM

You have ps:2386 instead of ps:P2386 in the second query.

Similar to wikibase:statements, don't we have to wait a year till every item was edited?

Nikki added a comment.Nov 14 2016, 8:31 PM

That doesn't seem to be the problem here, I edited light year earlier after seeing this ticket, but the query in the description still doesn't include it.

Smalyshev added a comment.EditedNov 16 2016, 5:34 AM

Q14916719 length is expresses in parsec, and parsec is not part of the configured units in unitConversionConfig.json. I guess it was either rare or failed some other criteria when we created the initial config. I think that's the reason. We can add it anytime certainly and add the new statements for it, we have the code now.

Note that for efficiency, only units directly in unitConversionConfig.json are considered for conversion, we don't try to build a chain when creating RDF (creating the config itself does chains, so maybe we should just rerun the config generating script).

Q1 should be on top of that list!

I don't see "diameter" property on Q1.

daniel closed this task as Invalid.Nov 16 2016, 5:10 PM

@Smalyshev Oh, I guess you are right that Parsec was omitted from the conversion table because it's rarely used! I guess we would never have noticed if it wasn't for your example of the "longest things" :)

I'm closing this as invalid for now. If there is reason to believe that there is a bug afterall, please re-open.

If someone wants to suggest that even rarely used length units should be supported for conversion, that should be a separate ticket.

Just noting that I think rare(r) units eventually should be supported. Just maybe not right now. We need to decide how we want to proceed with this - incorporating both more units (such as mass, etc.) and rarer units. Eventually I'd like every unit that is used to be there, but it's OK if it takes time.

I just did a bit of research with Daniel on the next steps. This seems best to me:

  • Add support for main units for:
    • mass/weight
    • area
    • speed
    • volume
    • duration
  • let the community test and try
  • ask for which dimensions they need most in addition to what is available then
  • ask for which units for the supported dimensions they need most in addition to what is available then

Sounds great, let's make the tasks :)

Nikki added a comment.Nov 16 2016, 7:10 PM

What about light year? It has a length statement with the unit in metres, so shouldn't it appear in the query in the description?

Is the list of supported conversions visible somewhere? https://www.mediawiki.org/wiki/Wikibase/Indexing/RDF_Dump_Format#Normalized_values is rather vague about what is/isn't included.

@Nikki The list of supported units is here:

https://phabricator.wikimedia.org/diffusion/OMWC/browse/master/wmf-config/unitConversionConfig.json

The RDF format docs do not mention it because it's a config, so it can change any time. We plan to update it to include more units.