Phil Blackwood
Every Enterprise can benefit from having a simple, standard way to represent quantitative data. In this blog post, we will provide examples of how to use the new gist model of quantitative data released in gist version 13. After illustrating key concepts, we will look at how all the pieces fit together and provide one concrete end-to-end example.
Let’s examine the following:
- How is a measurement represented?
- Which units can be used to measure a given characteristic?
- How do I convert a value from one unit to another?
- How are units defined in terms of the International System of Units?
First, we want to be able to represent a fact like:
“The patio has an area of 144 square feet.”
The area of the patio is represented using this pattern:
… where:
A magnitude is an amount of some measurable characteristic.
An aspect is a measurable characteristic like cost, area, or mass.
A unit of measure is a standard amount used to measure or specify things, like US dollar, meter, or kilogram.
Second, we need to be able to identify which units are applicable for measuring a given aspect. Consider a few simple examples, the aspects distance, energy, and cost:
For every aspect there is a group of applicable units. For example, there is a group of units that measure energy density:
… where:
A unit group is a collection of units that can be used to measure the same aspect.
A common scenario is that we want to validate the combination of aspect and unit of measure. All we need to do is check to see if the unit of measure is a member of the unit group for the aspect:
Next, we want to be able to convert measurements from one unit to another. A conversion like this makes sense only when the two units measure the same aspect. For example, we can convert pounds to kilograms because they both measure mass, but we can’t convert pounds to seconds. When a conversion is possible, the rule is simple:
There is an exception to the rule above for units of measure that do not have a common zero value. For example, 0 degrees Fahrenheit is not the same temperature as 0 degrees Kelvin.
To convert from Kelvin to Fahrenheit, reverse the steps: first divide by the conversion factor and then subtract the offset.
To convert a value from Fahrenheit to Celsius, first use the conversion above to convert to Kelvin, and then convert from Kelvin to Celsius.
Next, we will look at how units of measure are related to the International System of Units, which defines a small set of base units (kilogram, meter, second, Kelvin, etc.) and states:
Notice that every expression on the right side is a multiple of kilogram meter2 per second3. We can avoid redundancy by “attaching” the exponents of base units to the unit group. That way, when adding a new unit of measure to the unit group for power there is no need to re-enter the data for the exponents.
The example also illustrates the conversion factors; each conversion factor appears as the initial number on the right hand side. In other words:
The conversion factors and exponents allow units of measure to be expressed in terms of the International System of Units, which acts as something of a Rosetta Stone for understanding units of measure.
One additional bit of modeling allows calculations of the form:
(45 miles per hour) x 3 hours = 135 miles
To enable this type of math, we represent miles per hour directly in terms of miles and hours:
Putting the pieces together:
Here is the standard representation of a magnitude:
Every aspect has a group of units that can be used to measure it:
Every member of a unit group can be represented as a multiple of the same product of powers of base units of the International System of Units:
where X can be:
- Ampere
- Bit
- Candela
- Kelvin
- Kilogram
- Meter
- Mole
- Number
- Other
- Radian
- Second
- Steradian
- USDollar
Every unit of measure belongs to one or more unit groups, and if can be defined in terms of other units acting as multipliers and divisors:
We’ll end with a concrete example, diastolic blood pressure.
The unit group for blood pressure is a collection of units that measure blood pressure. The unit group is related to the exponents of base units of the International System of Units:
Finally, one member of the unit group for blood pressure is millimeter of mercury. The scope note gives an equation relating the unit of measure to the base units (in this case, kilogram, meter, and second).
The diagrams above were generated using a visualization tool. The text version of the diagrams is:
For more examples and some basic queries, visit the gitHub site gistReferenceData.
In closing, we would like to acknowledge the re-use of concepts from QUDT, namely:
- every magnitude has an aspect, via the new gist property hasAspect
- aspects are individuals instead of categories or subclasses of Magnitude as in gist 12
- exponents are represented explicitly, enabling calculations