Wikidata:Property proposal/Wolfram Language unit code
Jump to navigation
Jump to search
Try it!
Wolfram Language unit code
[edit]Originally proposed at Wikidata:Property proposal/Authority control
Description | input form for a unit of measurement in the Wolfram Language |
---|---|
Represents | unit of measurement (Q47574) |
Data type | String |
Domain | item, unit of measurement (Q47574) |
Allowed values | string, product, division, power, HoldForm[...] |
Example 1 | metre (Q11573) → "Meters" |
Example 2 | metre per second (Q182429) → "Meters" / "Seconds" |
Example 3 | joule per cubic metre kelvin (Q3186734) → "Joules" / ("Meters"^3 * "KelvinsDifference") |
Planned use | Build Wolfram Language (Q15241057) applications that represent values of type "quantity" as Quantity[magnitude, unit] . For instance, the mass (P2067) of Earth (Q2) is Quantity[5972.37, "Yottagrams"] . Without a mapping from Wikidata IDs to Wolfram Language units one could alternatively use the English label and rely on the Quantity parser, as in Quantity[1, "yottagram"] -> Quantity[1, "Yottagrams"] , but this is fragile (especially for uncommon units) and potentially slow. |
See also | Wolfram Language entity code (P4839) |
Motivation
[edit]This property will allow representing a value of type "quantity" as a Wolfram Language (Q15241057) native Quantity[magnitude, unit]
object. It will facilitate the creation of WL applications because developers won't have to maintain their own mapping of Wikidata IDs to WL units.
There are currently over 5000 unit of measurement (Q47574) in Wikidata:
SELECT ?unit ?unitLabel WHERE {
?unit wdt:P31/wdt:P279* wd:Q47574.
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
Some or all of them can potentially appear as the unit of a value and are therefore relevant for this property.
Toni 001 (talk) 10:59, 26 June 2019 (UTC)
Discussion
[edit]- Support I guess this is distinct enough from the entity code, so sure. ArthurPSmith (talk) 17:31, 27 June 2019 (UTC)
- Support Wolfram Language is trustworthy and important, this could be useful and won't go stale. --Ysangkok (talk) 22:27, 8 July 2019 (UTC)
- Support --DannyS712 (talk) 11:06, 15 July 2019 (UTC)
- Done @Toni 001, ArthurPSmith, Ysangkok, DannyS712: created as Wolfram Language unit code (P7007). Enjoy! --99of9 (talk) 11:54, 18 July 2019 (UTC)