|
|
(54 intermediate revisions by 7 users not shown) |
Line 1: |
Line 1: |
| = Measure microformat =
| | {{DISPLAYTITLE:Measure microformat research}} |
|
| |
|
| Currently this microformat is in exploratory stage. Contributions should focus on real examples from the Web, existing formats/encoding of measures.
| | <div style="float:right;margin-left:1em">__TOC__</div> |
| | |
| | This page is for researching and developing a [[measure]] microformat. Per the [[process]]: |
| | * [[measure-examples]] |
| | * [[measure-formats]] |
| | * [[measure-brainstorming]] |
|
| |
|
| == The problem == | | == The problem == |
Line 11: |
Line 16: |
| The Measurement microformat will enable unambiguous description of physical quantities and thus provide a solid ground for data sharing and automation in many areas. | | The Measurement microformat will enable unambiguous description of physical quantities and thus provide a solid ground for data sharing and automation in many areas. |
|
| |
|
| == Draft Schema== | | == Next Steps == |
| | | * clean-up [[measure-examples]] to refer to <em>current</em> real world examples |
| Rationale: The names "value" and "type" are taken from [[hCard]]; "item" is used from hReview. Should we include "tolerance" as well?
| | * update [[measure-formats]] with formats from other recent efforts such as schema.org |
| | | * massive clean-up of [[measure-brainstorming]] |
| === Standard Measure Schema ===
| |
| | |
| * '''<code>hmeasure</code>''' | |
| ** '''<code>value</code>''' {1} (numeric)
| |
| ** '''<code>unit</code>''' {1} (unit)
| |
| ** <code>item</code>? (text | [[hcard|hCard]] | [[hcalendar|hCalendar]])
| |
| ** <code>type</code> ? (text, e.g. "height", "width", "weight")
| |
| | |
| === Angular Measure Schema ===
| |
| | |
| * '''<code>hmeasure</code>'''
| |
| ** '''<code>value</code>''' {1} (degree)
| |
| ** <code>item</code>? (text | [[hcard|hCard]] | [[hcalendar|hCalendar]]) | |
| ** <code>type</code> ? (text, e.g. "angle of elevation")
| |
| | |
| == Value ==
| |
| | |
| Arbitrary white space {{may}} be included in the value to improve readability. Parsers {{must}} strip out all white space before further processing.
| |
| | |
| In the standard schema, the value {{must}} be a number, formatted according to the following EBNF pattern:
| |
| | |
| <pre>non-zero-digit = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ;
| |
| digit = "0" | non-zero-digit ;
| |
| natural = non-zero-digit , {digit} ;
| |
| integer = "0" | [ "-" ] , natural ;
| |
| dot-decimal = integer , "." , {digit} ;
| |
| comma-decimal = integer , "," , {digit} ;
| |
| e-sign = "e" | "E" ;
| |
| mantissa = dot-decimal | comma-decimal | integer ;
| |
| sci-number = mantissa , e-sign , integer ;
| |
| number = dot-decimal | comma-decimal | integer | sci-number ;</pre>
| |
| | |
| This roughly corresponds to a subset of [http://en.wikipedia.org/wiki/C_syntax#Floating_point_types C syntax] for floating points and integers, excluding octal and hexadecimal representations. However, note that both commas and stops may be used as decimal points.
| |
| | |
| The Unicode minus sign (U+2212) and ASCII-compatible hyphen-minus (U+002D) {{must}} both be treated as acceptable indicators of a negative number. In addition, the symbols ¼ (U+00BC), ½ (U+00BD) and ¾ (U+00BE) {{should}} be supported as aliases for 0.25, 0.5 and 0.75 respectively.
| |
| | |
| In the angular measure schema, a measure is expressed as a combination of up to three numeric components: called degrees, minutes and seconds. Any combination of these components may be used, except when degrees and seconds are given minutes {{must}} be present. The components {{must}} appear in the correct order (degrees, minutes, seconds). Each component must match the production rule for "mantissa" above, with the following additional constraints:
| |
| | |
| * Only the first component can bear a minus sign. Subsequent components "inherit" the negativity (or lack thereof) from their predecessors.
| |
| * All components except the last must match the production rule for "integer".
| |
| | |
| The numeric components {{must}} be indicated by appending a suffix to each component. Valid suffixes are:
| |
| | |
| * degree: "deg", U+00B0 degree symbol (°)
| |
| * minute: "min", straight single quote ('), U+2032 prime (′)
| |
| * second: "sec", straight double quote ("), U+2033 double prime (″)
| |
| | |
| === Examples ===
| |
| | |
| * 1729 (the smallest number that can be expressed as the sum of two cubes in two different ways)
| |
| * 1.61803399 (the golden ratio)
| |
| * 2,99792458e8 (the speed of light in a vacuum, measured in metres per second)
| |
| * -40 (value at which Celcius and Farenheit scales are equal) | |
| * 1,000,000,000 (''Invalid:'' commas may be used as decimal points, but not for grouping thousands.)
| |
| * 57.2958 deg (1 radian, in degrees)
| |
| * -57° 17′ 45.1″ (-1 radian, in degrees, minutes and seconds)
| |
| * 4° 30″ (''Invalid'': no minutes)
| |
| * 4° -30′ (''Invalid'': only first component may be negative)
| |
| | |
| == Unit ==
| |
| | |
| The "unit" class is defined as an arbitrary string. Any unit may be used, but authors {{should}} attempt to use official SI units of measurement where appropriate. Parsers {{must}} recognise the following case-sensitive list of units, derived from the SI list of base units and official recognised derived units, with the addition of bits and bytes, which are commonly used on web pages, and litres and radians. (Note that gram appears in this table instead of kilogram. This is deliberate.)
| |
| | |
| {| border="1"
| |
| |-
| |
| ! Unit
| |
| ! Aliases
| |
| |-
| |
| | metre
| |
| | meter, m
| |
| |-
| |
| | gram
| |
| | gramme, g
| |
| |-
| |
| | second
| |
| | sec, s
| |
| |-
| |
| | ampere
| |
| | amp, A
| |
| |-
| |
| | candela
| |
| | cd
| |
| |-
| |
| | mole
| |
| | mol
| |
| |-
| |
| | kelvin
| |
| | K
| |
| |-
| |
| | newton
| |
| | N
| |
| |-
| |
| | pascal
| |
| | Pa
| |
| |-
| |
| | joule
| |
| | J
| |
| |-
| |
| | watt
| |
| | W
| |
| |-
| |
| | coulomb
| |
| | C
| |
| |-
| |
| | volt
| |
| | V
| |
| |-
| |
| | ohm
| |
| | Ω
| |
| |-
| |
| | siemens
| |
| | S
| |
| |-
| |
| | farad
| |
| | F
| |
| |-
| |
| | weber
| |
| | Wb
| |
| |-
| |
| | henry
| |
| | H
| |
| |-
| |
| | tesler
| |
| | T
| |
| |-
| |
| | hertz
| |
| | Hz
| |
| |-
| |
| | byte
| |
| | B
| |
| |-
| |
| | bit
| |
| | b
| |
| |-
| |
| | litre
| |
| | liter, L
| |
| |-
| |
| | radian
| |
| | rad
| |
| |}
| |
| | |
| The following SI prefixes {{must}} be supported (table taken from Wikipedia - it needs rewriting to remove irrelelevent columns). "u" {{must}} be treated as an alias for μ.
| |
| | |
| {| border="1"
| |
| |+ style="font-size:larger;font-weight:bold;"|[[SI prefix]]es
| |
| ! 1000<sup>n</sup>
| |
| ! 10<sup>n</sup>
| |
| ! Prefix
| |
| ! Symbol
| |
| ! Since<sup>[1]</sup>
| |
| ! [[Long and short scales|Short scale]]
| |
| ! [[Long and short scales|Long scale]]
| |
| ! [[Decimal]] equivalent in [[SI#SI writing style|SI writing style]]
| |
| |-
| |
| | 1000<sup>8</sup>
| |
| | 10<sup>24</sup>
| |
| | [[yotta-]]
| |
| | Y
| |
| | 1991
| |
| | [[Septillion]]
| |
| | [[Orders_of_magnitude_(numbers)#1024|Quadrillion]]
| |
| | 1 000 000 000 000 000 000 000 000
| |
| |-
| |
| | 1000<sup>7</sup>
| |
| | 10<sup>21</sup>
| |
| | [[zetta-]]
| |
| | Z
| |
| | 1991
| |
| | [[Sextillion]]
| |
| | [[Trilliard]]<br><small>(thousand trillion)</small>
| |
| | 1 000 000 000 000 000 000 000
| |
| |-
| |
| | 1000<sup>6</sup>
| |
| | 10<sup>18</sup>
| |
| | [[exa-]]
| |
| | E
| |
| | 1975
| |
| | [[Quintillion]]
| |
| | [[Trillion (disambiguation)|Trillion]]
| |
| | 1 000 000 000 000 000 000
| |
| |-
| |
| | 1000<sup>5</sup>
| |
| | 10<sup>15</sup>
| |
| | [[peta-]]
| |
| | P
| |
| | 1975
| |
| | [[Orders_of_magnitude_(numbers)#1015|Quadrillion]]
| |
| | [[Billiard (number)|Billiard]]<br><small>(thousand billion)</small>
| |
| | 1 000 000 000 000 000
| |
| |-
| |
| | 1000<sup>4</sup>
| |
| | 10<sup>12</sup>
| |
| | [[tera-]]
| |
| | T
| |
| | 1960
| |
| | [[Trillion (disambiguation)|Trillion]]
| |
| | [[Billion (disambiguation)|Billion]]
| |
| | 1 000 000 000 000
| |
| |-
| |
| | 1000<sup>3</sup>
| |
| | 10<sup>9</sup>
| |
| | [[giga-]]
| |
| | G
| |
| | 1960
| |
| | [[Billion (disambiguation)|Billion]]
| |
| | [[Milliard]]<br><small>(thousand million)</small>
| |
| | 1 000 000 000
| |
| |-
| |
| | 1000<sup>2</sup>
| |
| | 10<sup>6</sup>
| |
| | [[mega-]]
| |
| | M
| |
| | 1960
| |
| |colspan="2" align="center"| [[1000000 (number)|Million]]
| |
| | 1 000 000
| |
| |-
| |
| | 1000<sup>1</sup>
| |
| | 10<sup>3</sup>
| |
| | [[kilo-]]
| |
| | k<!-- (K)-->
| |
| | 1795
| |
| |colspan="2" align="center"| [[1000 (number)|Thousand]]
| |
| | 1 000
| |
| |-
| |
| | 1000<sup>2/3</sup>
| |
| | 10<sup>2</sup>
| |
| | [[hecto-]]
| |
| | h<!-- (H)-->
| |
| | 1795
| |
| |colspan="2" align="center"| [[100 (number)|Hundred]]
| |
| | 100
| |
| |-
| |
| | 1000<sup>1/3</sup>
| |
| | 10<sup>1</sup>
| |
| | [[deca-]]
| |
| | da<!-- (D)-->
| |
| | 1795
| |
| |colspan="2" align="center"| [[10 (number)|Ten]]
| |
| | 10
| |
| |-
| |
| ! 1000<sup>0</sup>
| |
| ! 10<sup>0</sup>
| |
| ! ''<font color="gray">(none)</font>''
| |
| ! ''<font color="gray">(none)</font>''
| |
| ! NA
| |
| !colspan="2" align="center"| [[1 (number)|One]]
| |
| ! 1
| |
| |-
| |
| | 1000<sup>−1/3</sup>
| |
| | 10<sup>−1</sup>
| |
| | [[deci-]]
| |
| | d
| |
| | 1795
| |
| |colspan="2" align="center"| Tenth
| |
| | 0.1
| |
| |-
| |
| | 1000<sup>−2/3</sup>
| |
| | 10<sup>−2</sup>
| |
| | [[centi-]]
| |
| | c
| |
| | 1795
| |
| |colspan="2" align="center"| Hundredth
| |
| | 0.01
| |
| |-
| |
| | 1000<sup>−1</sup>
| |
| | 10<sup>−3</sup>
| |
| | [[milli-]]
| |
| | m
| |
| | 1795
| |
| |colspan="2" align="center"| Thousandth
| |
| | 0.001
| |
| |-
| |
| | 1000<sup>−2</sup>
| |
| | 10<sup>−6</sup>
| |
| | [[micro-]]
| |
| | µ
| |
| | 1960<sup>[2]</sup>
| |
| |colspan="2" align="center"| Millionth
| |
| | 0.000 001
| |
| |-
| |
| | 1000<sup>−3</sup>
| |
| | 10<sup>−9</sup>
| |
| | [[nano-]]
| |
| | n
| |
| | 1960
| |
| | Billionth
| |
| | Milliardth
| |
| | 0.000 000 001
| |
| |-
| |
| | 1000<sup>−4</sup>
| |
| | 10<sup>−12</sup>
| |
| | [[pico-]]
| |
| | p
| |
| | 1960
| |
| | Trillionth
| |
| | Billionth
| |
| | 0.000 000 000 001
| |
| |-
| |
| | 1000<sup>−5</sup>
| |
| | 10<sup>−15</sup>
| |
| | [[femto-]]
| |
| | f
| |
| | 1964
| |
| | Quadrillionth
| |
| | Billiardth
| |
| | 0.000 000 000 000 001
| |
| |-
| |
| | 1000<sup>−6</sup>
| |
| | 10<sup>−18</sup>
| |
| | [[atto-]]
| |
| | a
| |
| | 1964
| |
| | Quintillionth
| |
| | Trillionth
| |
| | 0.000 000 000 000 000 001
| |
| |-
| |
| | 1000<sup>−7</sup>
| |
| | 10<sup>−21</sup>
| |
| | [[zepto-]]
| |
| | z
| |
| | 1991
| |
| | Sextillionth
| |
| | Trilliardth
| |
| | 0.000 000 000 000 000 000 001
| |
| |-
| |
| | 1000<sup>−8</sup>
| |
| | 10<sup>−24</sup>
| |
| | [[yocto-]]
| |
| | y
| |
| | 1991
| |
| | Septillionth
| |
| | Quadrillionth
| |
| | 0.000 000 000 000 000 000 000 001
| |
| |-
| |
| |colspan="8" | Notes:<br> 1. The 1795 dates identify prefixes in use since the metric system was introduced. The other dates are not necessarily dates of first use, but rather the date of recognition by a resolution of the [[CGPM]], which first met in 1889.<br> 2. The [[micrometre|micron]] was earlier recognized by the CGPM in 1948; that decision was abrogated in 1967-68.
| |
| |}
| |
| | |
| === Combining units ===
| |
| | |
| Units may be multiplied by separating with whitespace, or divided using a slash (/) or U+2215 division slash (∕). Units may be raised to an integer power using a caret character. The unicode superscript numerals 2 to 9 (U+00B2, U+00B3, U+2074-79) {{must}} be supported as aliases for raising to the appropriate integer powers. Multiplication is more associative than division.
| |
| | |
| Examples:
| |
| | |
| * <span class="unit">kg m / s</span>
| |
| * <span class="unit">m/s^2</span>
| |
| * <span class="unit">meter³</span>
| |
| * <abbr class="unit" title="μm">micron</abbr>
| |
| | |
| === Angular units ===
| |
| | |
| Units {{must not}} be given for measurements expressed in the degree schema: the degree itself is the unit.
| |
| | |
| If the standard schema is used, units may be given in radians (rad).
| |
| | |
| == Non-SI Units ==
| |
| | |
| Authors {{may}} specify units other than those defined above, but {{should not}} assume that parsers will be able to interpret them. Authors using other units {{should}} provide a [[existing-rel-values|rel=glossary]] link to a page that defines the units.
| |
| | |
| == Item ==
| |
| | |
| An hCard, hCalendar event or textual description of the item being measured may be supplied.
| |
| | |
| <pre><p class="hmeasure">
| |
| <span class="item vcard">The <span class="fn">Great Wall</span>of
| |
| <span class="adr"><span class="country-name">China</span></span></span>
| |
| is about <span class="value">6 700</span> <abbr title="metre">metres</abbr>
| |
| <abbr title="length" class="type">long</abbr>.
| |
| </p></pre>
| |
| | |
| The item is optional.
| |
| | |
| == Type ==
| |
| | |
| The type specifies the dimension being measured. A measurement in, say, metres may be ambiguous because it could refer to a depth, a height, a length or a width. The optional type parameter allows you to specify a human-readable dimension.
| |
|
| |
|
| == Related microformats == | | == Related microformats == |
| * [[hcalendar]] can provide a complete quantitative description of a natural event (for example an earthquake) occurring at a specified time (dtstart/dtend) and location (embedded [[geo]]), by just embedding measured physical quantities in the 'descrition' span. | | * [[hcalendar]] can provide a complete quantitative description of a natural event (for example an earthquake) occurring at a specified time (dtstart/dtend) and location (embedded [[geo]]), by just embedding measured physical quantities in the 'descrition' span. |
| * [[job-listing]] can use time measure for specify per what period of time the salary is for. | | * [[job-listing]] can use time measure for specify per what period of time the salary is for. |
| * [[hlisting]] product dimensions; weight/mass; time period (as above). | | * [[hlisting]] product dimensions; weight/mass; time period (as above); price. |
| * [[directions-examples]] can use length measure for mileage and time to go from one point to the next. | | * [[directions-examples]] can use length measure for mileage and time to go from one point to the next. |
| * [[recipe-examples]] can use weight, volume and time measure for ingredients and preparation time. | | * [[recipe-examples]] can use weight, volume and time measure for ingredients and preparation time. |
| * [[currency]] can be viewed as a measurement unit, or as a component of a measurement unit, as in $ per hour. | | * [[currency]] can be viewed as a measurement unit, or as a component of a measurement unit, as in $ per hour. |
|
| |
| == Contributors ==
| |
| * Guillaume Lebleu
| |
| * [[User:AndyMabbett|Andy Mabbett]]
| |
| * Luca Postpischl
| |
| * [[User:ManuSporny|Manu Sporny]]
| |
|
| |
|
| ==References== | | ==References== |
Line 413: |
Line 38: |
| *[http://www.slideshare.net/dder/the-new-science-bangalore-edition the New e-Science] (SlideShare, David De Roure) | | *[http://www.slideshare.net/dder/the-new-science-bangalore-edition the New e-Science] (SlideShare, David De Roure) |
| *[http://en.wikipedia.org/wiki/Template:Convert Wikipedia's "convert" template] | | *[http://en.wikipedia.org/wiki/Template:Convert Wikipedia's "convert" template] |
| | *[http://www.cs.tut.fi/~jkorpela/chars/si.html Jukka Korpela - Characters in SI notations] |
|
| |
|
| ==See also== | | ==See also== |
| {{measure-related-pages}} | | {{measure-related-pages}} |