The info on this page is for OED version 1.0.0. See "Help versions" menu at top of page for other versions.

Conversions and Units (Help)

Introduction

A unit is a measure of a resource in OED. It corresponds to a unit as in common usage. There are three common types of units that OED uses:

A conversion is the link between two units. It creates a linear transformation between two units. For example, to go from kilograms to grams, one must multiply by 1000 (and technically add 0). To go from Celsius to Fahrenheit, one must multiply by 9 / 5 and then add 32. OED cannot deal with nonlinear conversions/transformations.

OED uses all the units and conversions in a site to create a complete picture of what units are compatible with what other units. This allows OED to show the allowed/compatible and disallowed/incompatible units when one is graphing in OED.

Unit details

OED classifies units in three ways:

A unit also has an associated seconds in rate that defines the denominator for a rate unit. If it is not a rate unit then it has no meaning. The seconds in rate can be any positive number but common values are: per second or 1, per minute or 60, per hour or 3600 and per day or 86,400. This is used to define the rate denominator for a meter unit or when defining a normal unit. Note one can graph in a different rate per seconds and that is a choice the user can make.

OED allows a site to define any unit it wishes as long as it falls into one of these categories.

Conversion details

A conversion in OED has a number of attributes:

OED allows a site to define conversions between any pair of unis within its site. However, it is important that the site follow these rules which OED should enforce:

Chained conversions

To make units easier to work with, OED allows for chained conversions. What this means is that OED will look at all conversions and determine if there is a chain of allowed conversions between two units. If this is the case it will determine the overall conversion needed and allow a user to use that conversion when graphing. As an example, suppose a site has the following conversions between units that are already defined:

The order that the conversions are entered does not matter and that is why they are in a somewhat random order above. OED can analyze these conversions to create an overall conversion chain of g ⟷ kg ⟷ metric ton ⟷ lb ⟷ short ton that relates all of these mass units so any one can be converted to any other one. This is done automatically when conversions are added to OED. In this example it means any of these mass units could be used to graph any meter that collected in a mass unit for the ones in the example.

In the case of conversions that only go in one direction, OED will only use that direction for determining chains. In the standard conversions provided by OED there is a one directional conversion of a meter to a graphic unit of Electric_Utility → kWh. There are also conversions that are bidirectional for units of kWh ⟷ BTU and BTU ⟷ m³ gas. Given these, OED will allow for the following conversions: Electric_Utility → kWh, Electric_Utility → BTU, Electric_Utility → m³ gas, kWh ⟷ BTU, kWh ⟷ m³ gas and BTU ⟷ m³ gas. This means that the electric utility meter can be converted to any of the energy units but it cannot go the other way. There is a conversion between all the energy units in both directions as desired. From a practical standpoint this means one can graph the meter in any energy unit.

Compatibility

Two items are compatible if there exists a conversion between them. This includes any derived chained conversions that OED determines. Here is the meaning for different items within OED:

See the example section for concrete examples.

Suffix unit

As was briefly discussed above, a suffix unit is a special unit in OED that allows for the creation of a unit that is also associated with another unit. Let's expand by trying to use a suffix unit to display CO2 as a graphing unit. Suppose you create the unit kg CO2 with the suffix of CO2. You then create a one way conversion to kg as kg CO2 → kg were there slope 1 since each is a kg. The conversion is one directional because if you went the other way you could automatically take kg as a mass and convert it to CO2 and this mixes two types of resources. A separate conversion from a meter reading in kg to CO2 would cover this case as shown in the example below. Now create a one directional conversion from the Electric_Utility meter to kg CO2 as Electric_Utility → kg CO2 where the slope would be the kg of CO2 produced for each kWh of electricity used. A simple value for a standard electric provider in the U.S. might be 1.9. Since the unit kg CO2 has a suffix, OED will handle it specially when analyzing the conversions. In this case, it will create the one directional conversion of Electric_Utility → kg of CO2. Note that OED gives the destination unit a new name based on the unit that suffix is linked to (kg) and the suffix (CO2) with the word "of" between them. It is the logical name that people would say of kg of CO2. While OED internally stores the original suffix unit of kg CO2, it will not be seen on the site and users are unaware it exists.

To show the real power of a suffix unit, suppose the site also had the units and conversions listed in the previous section for mass (lb, short ton, g, kg, metric ton). In this case, OED would create a new unit and conversion for each of these mass units to yield: Electric_Utility → lb of CO2, Electric_Utility → short ton of CO2, Electric_Utility → g of CO2, Electric_Utility → kg of CO2 and Electric_Utility → metric ton of CO2. For the user they can now graph the electric usage from this meter in any of the five mass units even though the admin only linked to one of the units. This is an extended example of doing chained conversions that are special within OED. Note OED will add more suffix units if an additional mass unit and conversion is added after the suffix unit was added. Basically, OED will keep the site up to date for all the information it has. If a site does not want all the OED created suffix units to be seen by users then the admin can edit the created units to change the displayable setting appropriately.

Example

Please see the example description as it will extended as the current example of how OED works with units and conversions. An updated graphic from that page is:

Unit and conversion graphic

where the suffix units are more accurately shown. The light green suffix unit of kg CO2 is linked to the OED created ones that are in darker green. Note that as part of this process OED does not use chained conversions but a series of direct conversions to the units created. This is unusual but OED will properly maintain these individual conversions if changes are made in units and conversions. The conversion from the suffix unit to the unit given by the site is one directional and shown by the dashed black arrow (kg CO2 → kg). Each rectangle or oval represents an actual unit on the OED site but the light green one is not visible to the user. Each arrow represents an actual conversion on the OED site but all are not visible to the user. These are the dotted black line and the pink lines from meters to kg of CO2 are replaced by links to the ones created by OED for a suffix unit. Thus, each of these pink lines is replaced by 4 lines going to each of the created suffix units in dark green.

Here are a few things that are consistent with the discussion previously on this page:

Here are a few examples of what a figure means.

Note that this site could have many meters using the Electric_Utility meter unit. This makes the site easier to maintain and more efficient. This is true for any meter unit defined.

Using the groups from the example, the following compatibilities are derived: