Write your own quantitative measure schema
Quantitative measure schemas are for data that have units of measurement. Our schema library shows all the schemas that have already been defined. If you don’t find what you need there, this quantitative schema template will get you started on writing your own. Here are the basic steps, but you may want to review an annotated example of a quantitative schema first.
- Check out the relevant literature and/or consult with a subject matter expert to make sure that you’re modeling the quantitative measure the way real users will want to use it.
- The core elements of the schema will be the numeric value of the measure and its unit(s) of measure, defined using the unit-value schema.
- If you don’t see what you need in the pre-defined value and unit pairs, you can reference the unit-value schema and then constrain the unit property to a permissible value set for your measure (see the blood glucose schema for an example of this case.)
- If the measure does not have a standard unit(s) of measure (for example, the measure is a count, like step count), then do not use the the unit-value schema but define the property as being of type number: “type”: “number” (see Step count schema as an example).
- All measure schemas should include properties for describing its relationship to time, defined using the time-frame schema. For more on how we represent time, see the Section Modeling of Time in Schema design principles.
- You can also define your schema to include the result of summarizing a set of measurements using one of the descriptive statistics like average or maximum. To do this, include a reference to the descriptive-statistic schema.