Open SiBell opened 4 years ago
In terms of the properties we should be providing for each unit, I'd suggest we want an @id
, a symbol
and a description
, and perhaps a sameAs
, e.g:
{
"@context": {
"qudt": " http://qudt.org/vocab/",
"schema": "https://schema.org/",
"owl": "http://www.w3.org/2002/07/owl#",
"symbol": "qudt:symbol",
"description": "schema:description",
"sameAs": "owl:sameAs"
},
"@id": "DegreeCelsius",
"@type": "uo:Unit",
"symbol": "°C",
"description": "Celsius, also known as centigrade, is a scale and unit of measurement for temperature. It can refer to a specific temperature on the Celsius scale as well as a unit to indicate a temperature interval, a difference between two temperatures or an uncertainty. This definition fixes the magnitude of both the degree Celsius and the kelvin as precisely 1 part in 273.16 (approximately 0.00366) of the difference between absolute zero and the triple point of water. Thus, it sets the magnitude of one degree Celsius and that of one kelvin as exactly the same. Additionally, it establishes the difference between the two scales' null points as being precisely 273.15∘C.",
"sameAs": "qudt:unit:DEG_C"
}
When I paste this into the JSON-LD Playground, it doesn't like it. So I could use a hand working out what I've done wrong.
We may also want to add a name
property, in this example the value would be Degree Celsius
. Not sure if it's worth it or not?
We may also want sameAs
to be array? If we think more than one existing vocabulary will list units we use.
Here's my initial attempt. There's plenty more that need adding.
id | symbol | sameAs | description |
---|---|---|---|
DegreeCelsius | °C | unit:DEG_C | Celsius , also known as centigrade, is a scale and unit of measurement for temperature. It can refer to a specific temperature on the Celsius scale as well as a unit to indicate a temperature interval, a difference between two temperatures or an uncertainty. This definition fixes the magnitude of both the degree Celsius and the kelvin as precisely 1 part in 273.16 (approximately 0.00366) of the difference between absolute zero and the triple point of water. Thus, it sets the magnitude of one degree Celsius and that of one kelvin as exactly the same. Additionally, it establishes the difference between the two scales' null points as being precisely 273.15∘C . |
Percent | % | unit:PERCENT | "Percent" is a unit for 'Dimensionless Ratio' expressed as %. |
Hectopascal | hPa | unit:HectoPA | Hectopascal is a unit of pressure. 1 Pa is approximately the pressure exerted by a 10-g mass resting on a 1-cm2 area. 1013 hPa = 1 atm. There are 100 pascals in 1 hectopascal. |
MetrePerSecond | ms⁻¹ | unit:M-PER-SEC | Metre per second is an SI derived unit of both speed (scalar) and velocity (vector quantity which specifies both magnitude and a specific direction), defined by distance in metres divided by time in seconds. The official SI symbolic abbreviation is mu00b7s-1, or equivalently either m/s. |
Degree | ° | unit:DEG | A degree (in full, a degree of arc, arc degree, or arcdegree), usually denoted by ∘ (the degree symbol), is a measurement of plane angle, representing 1/360 of a full rotation; one degree is equivalent to 2π/360rad, 0.017453rad. It is not an SI unit, as the SI unit for angles is radian, but is an accepted SI unit. |
Millimetre | mm | unit:MilliM | Unit of distance. Equal to one thousandth of a metre, which is the SI base unit of length. |
Couple of things
descriptions
. Not sure if this is bad practise?ms¯¹
having managed to find a HTML entity for the ¯
and ¹
. (EDIT: I've now replaced the macron ¯
with the more appropriate superscript minus ⁻
in the table). It's possible there will be occasions when we can't find the entity we need. QUDT's approach would be m s^{-1}
. Having said that QUDT also uses a forward slash sometimes, e.g. rev/h
for unit:REV-PER-HR.I think that sameAs
should be an array because there are several unit vocabularies available, there's isn't a single equivalent for most units. Generally, it should be as simple as possible to map from one vocabulary to another. (Do ways exist to map between common vocabularies?) We can't predict which vocabulary a user/system might be using. (If it turns out that the vast majority of units don't map to multiple vocabularies then it may be pointless to make this an array.)
In QUDT they use the label property to give a human-readable name to each unit, e.g. rdfs:label "Degree Celsius" ;
for DEG_C. I suppose this is only really required if this vocabulary will be used to build human-usable apps---these might be implemented using metadata systems at each local Observatory, rather than being a requirement for communication between them.
In terms of marking up the units, at first glance the mathemetical notation (e.g. m s^{-1}
) seems like overkill, but may become necessary if the Observatories have to regularly deal with more complex units e.g. rad m^2 kg^{-1}
or sec rad^{-1} m^3
.
I'd agree that having sameAs
as an array is probably a good idea.
I was close to adding a label property, and probably didn't simply because I was being lazy. However it could well be worth adding it, because there's a good chance that human-readable front-end applications will make use of this list rather than maintaining their own. The JSON-LD observations will probably only include the unit's @id
, so most front-end applications will need to get the corresponding symbol if they want to show the units on a line graph, or in a table, etc. If they're getting the symbol then they might as well get a human readable label too.
I don't mind the more complex notation, e.g. m s^{-1}
just so long as it's easy for a front-end application to parse the correct bits to superscript. Which it looks like it might be. Just superscript anything in curly brackets that follows a ^
.
Regarding the unit notation, it would probably be a good idea to adopt an existing notation e.g. LaTeX/Mathematics.
I can certainly see how LaTeX would cover all bases, but I wonder if it's overkill.
I've just had a nosey at the Unicode characters. I reckon we've got enough to work with. For example, the list of superscript characters looks to be more than we need. We'll make heavy use of the superscript minus and numbers, e.g. ms⁻¹
. The middle dot character ·
might come in handy too.
It's worth bearing in mind common use cases for these symbols, e.g. on the axis of a line graph, or in the pop-up info window when a user hovers over a map marker, or a dot on a line. These might be third party UI components which can only accept strings rather than HTML, therefore if we want to show superscript and subscript, we'll need to use unicode characters.
Some more from me:
id | symbol | sameAs | description |
---|---|---|---|
MillimetrePerHour | mm/h | A measure of speed, but also commonly used for the observable property PrecipitationRate. | |
KilometrePerHour | km/h | unit:KiloM-PER-HR | Kilometer per Hour is a C.G.S System unit for 'Linear Velocity'. |
WattPerSquareMetre | W/m² | unit:W-PER-M2 | A unit of irradiance defined as the power received per area. This is a unit in the category of Energy flux. It is also known as watts per square meter, watt per square metre, watts per square metre, watt/square meter, watt/square metre. This unit is commonly used in the SI unit system. This unit is the standard SI unit in this category. |
PartsPerMillion | ppm | unit:PPM | Dimensionless unit for concentration. |
PartsPerBillion | ppb | unit:PPB | Dimensionless unit for concentration. |
MicrogramPerCubicMetre | µg/m³ | Unit of density, defined by mass in micrograms divided by volume in cubic metres. Commonly used for National Air Quality Objectives. | |
Decibel | dB | unit:DeciB | A customary logarithmic measure most commonly used (in various ways) for measuring sound.The beginning of the scale, 0 decibels, can be set in different ways, depending on exactly the aspect of sound being measured. For sound intensity (the power of the sound waves per unit of area) 0 decibel is equal to 1 picowatts per metre squared. This corresponds approximately to the faintest sound that can be detected by a person who has good hearing. For sound pressure (the pressure exerted by the sound waves) 0 decibels equals 20 micropascals RMS, and for sound power 0 decibels sometimes equals 1 picowatt. In all cases, one decibel equals ≈ 0.115129 neper. |
Volt | V | unit:V | Volt is the SI unit of electric potential. Electric potential is defined as the amount of potential energy present per unit of charge. Electric potential is measured in volts, with one volt representing a potential of one joule per coulomb of charge. The volt also may be expressed with a variety of other units. For example, a volt is also equal to one watt per ampere (W/A) and one joule per ampere per second (J/A/s). |
We've decided to maintain a list of units (e.g. Degree Celsius, Parts Per Million, Metres per second, etc, etc) to ensure units are comparable across Urban Observatories. This list of units will be incorporated into the Urban Observatory Vocabulary.
Existing vocabularies do exist, e.g. QUDT, and wherever possible we will try to reference them. However, we have decided we should still maintain our own list. This is partly so we can easily add any obscure units not already covered by existing vocabularies, and also so we can have a common naming convention, e.g. using PascalCase.
Aim