Property talk:P2370
Documentation
conversion of the unit into a coherent SI unit
List of violations of this constraint: Database reports/Constraint violations/P2370#Units
List of violations of this constraint: Database reports/Constraint violations/P2370#Type Q47574, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P2370#Single value, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P2370#Item P111, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P2370#allowed qualifiers, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P2370#Conflicts with P2043, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P2370#Conflicts with P2067, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P2370#Scope, SPARQL
List of violations of this constraint: Database reports/Constraint violations/P2370#Entity types
TODO: if applicable, add conversion to standard unit (P2442) or instance of (P31)=unit without standard conversion to SI (Q21684377) or define exceptions (Help)
Violations query:
SELECT ?item ?itemLabel ?count WITH { SELECT ?item (COUNT(DISTINCT ?st) as ?count) { ?st wikibase:quantityUnit ?item . FILTER(?item != wd:Q199) MINUS { ?item wdt:P31 wd:Q8142 } MINUS { ?item wdt:P2370 [] } MINUS { ?item wdt:P31 wd:Q21684377 } } GROUP BY ?item HAVING(?count > 24) } as %inc1 WHERE { INCLUDE %inc1 FILTER ( ?item != wd:Q550207 ) FILTER ( ?item not in ( wd:Q5 , wd:Q319604 , wd:Q11229 , wd:Q181011 ) ) SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } } ORDER BY DESC(?count) LIMIT 150
List of this constraint violations: Database reports/Complex constraint violations/P2370#Property missing?
⚠️ Mandatory, no exception. Please use conversion to standard unit (P2442) for other conversion. (Help)
Violations query:
SELECT ?item ?unit WHERE { ?item p:P2370/psv:P2370/wikibase:quantityUnit ?unit. MINUS { VALUES ?unitsSI { wd:Q223662 wd:Q208469 }. ?unit wdt:P31 ?unitsSI. }. MINUS { ?unit wdt:P2370 []. } }
List of this constraint violations: Database reports/Complex constraint violations/P2370#⚠️ Mandatory: Check units
This property is being used by: Please notify projects that use this property before big changes (renaming, deletion, merge with another property, etc.) |
Sample conversion query
[edit]- Items used: nautical mile (Q93318)
- Properties used: lighthouse range (P2929) , conversion to SI unit (P2370)
SELECT
?item ?itemLabel
?inputvalue ?inputunit ?inputunitLabel ?convinput
?outputvalue ?outputunit ?outputunitLabel ?convoutput
{
BIND( wd:Q93318 as ?outputunit )
?item p:P2929 /psv:P2929 [ wikibase:quantityAmount ?inputvalue ; wikibase:quantityUnit ?inputunit ] .
?inputunit p:P2370/psv:P2370 [ wikibase:quantityAmount ?convinput ; wikibase:quantityUnit ?siunit ] .
?outputunit p:P2370/psv:P2370 [ wikibase:quantityAmount ?convoutput ; wikibase:quantityUnit ?siunit ] .
BIND( ROUND( ?inputvalue * ?convinput / ?convoutput * 1000 )/1000 as ?outputvalue ) .
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
ORDER BY DESC(?outputvalue)
LIMIT 50
Discussion
[edit]higher powers, composition of base units
[edit]Can this property be used for units where a base unit is raised to a certain power (for example, using square metre (Q25343) and cubic metre (Q25517) on area and volume units)? Can it be used for derived units when a similar unit containing only base units is given (for example, some unit which ultimately is expressible in cubic metre per second (Q794261))? Mahir256 (talk) 22:40, 4 December 2015 (UTC)
- It would make sense. Let's do that. --- Jura 23:39, 4 December 2015 (UTC)
Graphics from former unique value constraint
[edit]- +0.000000000000000000000001: yoctometre (Q3221356), zeptogram (Q6171168)
- +0.000000000000000001: femtogram (Q1913097), attosecond (Q2483628), attometre (Q6003257)
- +0.000000000000001: femtometre (Q208788), picogram (Q3239557)
- +0.000000000001: picometre (Q192274), nanogram (Q2282906)
- +0.000000001: nanometre (Q178674), nanosecond (Q838801), microgram (Q1645498), microlitre (Q2282891)
- +0.000001: micrometre (Q175821), microsecond (Q842015), cubic centimetre (Q1022113), millilitre (Q2332346), milligram (Q3241121), milligram per cubic metre (Q21077820)
- +0.00001: dyne (Q201933), centilitre (Q1815100)
- +0.001: litre (Q11582), gram (Q41803), millimetre (Q174789), millisecond (Q723733), gram per cubic metre (Q21604951)
- +0.01: centimetre (Q174728), decagram (Q6517513)
- +0.1: decimetre (Q200323), hectogram (Q1057069), hectolitre (Q2029519)
- +1: kilogram (Q11570), metre (Q11573), second (Q11574), kelvin (Q11579), newton (Q12438), watt (Q25236), degree Celsius (Q25267), joule (Q25269), ampere (Q25272), square metre (Q25343), cubic metre (Q25517), hertz (Q39369), mole (Q41509), pascal (Q44395), candela (Q83216), metre per second (Q182429), newton metre (Q215571), cubic metre per second (Q794261), gram per litre (Q834105), kilogram per cubic metre (Q844211), joule per mole (Q13035094)
- +10: decametre (Q848856), deciare (Q22350885)
- +100: are (Q185078), hectometre (Q844338)
- +1000: tonne (Q191118), kilometre (Q828224), sthène (Q1793863), kilohertz (Q2143992), kilowatt (Q3320608), kilometre per second (Q4220561), kilojoule (Q4989854), megagram (Q11776930), gram per cubic centimetre (Q15639371), kilopascal (Q21064807), decare (Q22350887)
- +10000: hectare (Q35852), myriametre (Q1970718)
- +1000000: square kilometre (Q712226), megahertz (Q732707), megametre (Q1054140), gigagram (Q2799294), megawatt (Q6982035), megajoule (Q14786969), megapascal (Q21062777)
- +1000000000: gigametre (Q854546), teragram (Q1770733), gigahertz (Q3276763), cubic kilometre (Q4243638)
- +1000000000000: petagram (Q2612219), terametre (Q3267417)
- +1000000000000000: exagram (Q2655272), petametre (Q3277919)
- +1000000000000000000: exametre (Q3277907), zettagram (Q14754979)
- +1000000000000000000000: yottagram (Q613726), zettametre (Q3277915)
- +3600: hour (Q25235), watt hour (Q12874593)
Confusion
[edit]I think this property is quite confusing Normally SI base units are:
This property works fine, for all units that can be multiplied by a number to derive at a standard SI unit, but is not useful for others.
- It works fine for almost all units used at Wikidata so nothing really confusing about it. You may want to edit the German label to match the current English one rather than to change that to something different.
--- Jura 05:27, 4 May 2016 (UTC)
Is this property appropriate when the conversion is not known exactly?
[edit]For example, Year is described as the orbital period. But there are several different kinds of orbital periods that fit the description, and each of these is slowly changing over time. --Jc3s5h (talk) 18:25, 19 September 2017 (UTC)
In some cases, such as year, semester, quarter..., we cannot give exactly conversion but I think that we can give some approximate conversion instead of giving non-exactly conversion. So do we have any appropriate conversion property which is represented for such cases? Phucnt.nii (talk) 06:42, 20 September 2017 (UTC)
- Please use conversion to standard unit (P2442) if no exact conversion is known. If an item also covers variants of units that have an exact conversion, please make a new item for the unit that can be converted.
--- Jura 08:39, 1 October 2017 (UTC)
- Thanks, I've followed your advice for tropical year (Q189607), sidereal year (Q2281928), anomalistic year (Q2735933), and year (Q577) (all of which already existed). Jc3s5h (talk) 15:40, 1 October 2017 (UTC)
units missing from allowed units constraint
[edit]The ampere per meter and the ampere per square meter are missing from the allowed units constraint. —Eli355 (talk) 16:03, 29 August 2018 (UTC)
Additions to normalizations (notably on Wikidata Query Service)
[edit]See Wikidata:Contact_the_development_team#«_annum_»_conversion_?. --- Jura 18:02, 6 March 2020 (UTC)
Coherent SI units
[edit]I tried to make the label and description of this property more precise: What we really want to convert to are the coherent SI units.
- Why not just base units? Because we also want to convert km/h to m/s, which is not a base unit.
- Why coherent? Because this set of units is well defined withing the SI. For instance, m is, while cm, km, mm, µm are not. kg is, while g, mg and µm and not. m^3/kg is, while l/kg is not. Pa is, because it is just a different name for N/m^2, which is an alias for kg/(m s^2).
Most conversions stored in this property already target coherent SI units. There are a few outliers that we should fix. Outliers are for instance conversion to micrometer or liter, which should be stated as conversion to meter or cubic metre, respectively. (The original values can be preserved by moving them to conversion to standard unit (P2442).)
For the record, the proposed new label is "conversion to coherent SI unit" and the description is "equivalent quantity whose unit is a product of powers of SI base units". Let's discuss if they should be further improved. Toni 001 (talk) 18:34, 19 April 2020 (UTC)
- Let's take some time to think this over. This property shouldn't be changed around lightly. It's primary function is to define unit conversion on query server. --- Jura 18:51, 19 April 2020 (UTC)
- Hello @Jura1: One more point I could mention:
- * Why not derived SI unit? Because all of kg, mg, µg, ng, ... are derived units, but only kg (the kilogram) is the coherent SI unit.
- What I'm trying to achieve with this proposal is to state precisely and using technically correct terminology what the (presumably) intended use for this property is. With regard to conversion on the query server, this is exactly what triggered my investigation into this issue: When trying to rank values independent of the units in which they are entered, one tries to convert them to a common unit and then compares the numerical values. However, what is this common units? For units translatable to the SI, it is precisely the coherent units which have a unique conversion factor (in the sense that there is no coherent SI unit with a different conversion factor). If we did not make this restriction, then one length unit could, say, be converted to millimeters, and another one to kilometers. But then quantities given in those different length units would not be ordered by their actual length. By requiring coherent SI units we ensure that each is converted to meters before comparison. Toni 001 (talk) 21:04, 19 April 2020 (UTC)
- Hello Notified participants of WikiProject Physics. I propose refine the scope of "conversion to SI unit" to "conversion to coherent SI unit". Please see explanation above. Thanks. Toni 001 (talk) 09:44, 20 April 2020 (UTC)
- I like the general idea, but maybe there are some edge cases I haven't thought of that would be a problem. Jc3s5h (talk) 12:13, 20 April 2020 (UTC)
- This seems reasonable to me, but I agree it should not be done hastily to give time to think of any problems that might occur. ArthurPSmith (talk) 14:50, 20 April 2020 (UTC)
- Hello @Jc3s5h, ArthurPSmith: Sure, no need to hurry. I've been thinking about and preparing this for a year, so now I can take some time to explain the idea. For instance, one of my "maintenance" queries is this one: https://w.wiki/Nbk. It currently lists ~150 coherent SI units (together with links to other unit ontologies - WL and QUDT). Note that all the units listed under allowed units constraint are indeed coherent, as can be verified with the following query: https://w.wiki/Nbo. So, my proposal is already implemented because people were intuitively doing the right thing. Toni 001 (talk) 08:23, 21 April 2020 (UTC)
- I don't understand the change: what is the definition of SI unit, coherent SI unit (I never heard about that term) and standard unit ? We can't change anything if we don't have the correct definition of the terms. regards Snipre (talk) 15:32, 20 April 2020 (UTC)
- Hello @Snipre: Here is a quick summary (do let me know if you - or anybody - like more detail):
- SI base unit (Q223662): One of kg, m, s, A, K, mol, cd. 7 in total.
- coherent SI unit (Q69197847): Combine the base units using (positive or negative) powers, for instance, m^2, m^3, 1/m, ..., and products, for instance A s, m/s, kg/m^3, .... Some of those combinations have special names, like Pa (pascal). (They are instances of this class: SI unit with special name (Q68618328).) The base units are a special case of the coherent units.
- SI derived unit (Q208469): In addition to all the coherent units, now also allow adding an SI prefix (Q131299) to any unit in the expression. Examples: µm, km/s, ....
- SI unit (Q61610698): Any unit that is defined by the SI, that means, all the units described above.
- Toni 001 (talk) 08:40, 21 April 2020 (UTC)
- Hello @Snipre: Here is a quick summary (do let me know if you - or anybody - like more detail):
- About standard unit: Some units are not (yet) part of the SI. For instance, information units like MB (megabyte). But we still want to store somewhere the statement that this is equivalent to 1000000 B (byte). That's what we use conversion to standard unit (P2442) for. Toni 001 (talk) 08:46, 21 April 2020 (UTC)
- Hello. It's been a while now. I now think that it's fine to keep the current label (as labels can be under-specified), but that it would be good to improve the description. Given that the current description has already caused confusion (topic "Confusion" above) and that there's been no objection for a few month I'll go ahead and update just the description. Toni 001 (talk) 08:47, 19 July 2020 (UTC)
- All Properties
- Properties with quantity-datatype
- Properties used on 1000+ items
- Properties with units constraints
- Properties with constraints on type
- Properties with conflicts with constraints
- Properties with single value constraints
- Properties with constraints on items using them
- Properties with qualifiers constraints
- Properties with scope constraints
- Properties with entity type constraints
- Properties with complex constraints