Value

DatatypeDraftv1.0.0-rc.2

An amount with its unit and uncertainty. A list amount can lie along axes (a spectrum, a time series, a profile, a grid), and a large amount can sit in a File. Measured, calculated and set values all use it.

https://opendevelopmentstandards.org/schema/1.0.0-rc.2/core/Value.json

Fields

  • amount
    numberortextortrue or falseorList ofElement

    The amount: a number, text, true or false, or a list. With axes, the list nests one level per axis, outermost axis first; null marks an element with no data.

  • file

    The file that holds the amount, when it is too large to write here.

  • encoding
  • unit

    The unit, as a code from a units vocabulary (for example dB, m, Hz). Leave it out when the amount has no unit.

  • axes
    List ofDatatypeAxis1 or more items

    The axes the amount lies along, outermost first. Leave them out for one amount or a plain list.

  • statistic

    How the amount sums up the data it comes from.

  • averaging
    duration (ISO 8601)

    The time each element covers, as an ISO 8601 duration, such as PT1H for 1-hour means.

  • period

    The window that repeats which the amount covers, such as night-time.

  • crs

    The coordinate reference system of spatial axes. Required when an axis is easting, northing, longitude or latitude.

  • uncertainty
  • Exactly one of amount or file.
  • encoding needs file.

Element

One element of a list amount: a number, text, true or false, null for no data, or a nested list for the next axis.

numberortextortrue or falseornullorList ofElement

UncertaintyElement

One element of a list uncertainty: a number, null, or a nested list for the next axis.

numberornullorList ofUncertaintyElement

Encoding

How the file stores the amount. The file's media type says how to read it.

  • dataTypeRequired
    One ofthe codes below

    How each element is stored.

    int8
    A signed 8-bit integer.
    int16
    A signed 16-bit integer.
    int32
    A signed 32-bit integer.
    float32
    An IEEE 754 single-precision number.
    float64
    An IEEE 754 double-precision number.
    complex64
    A complex number of two 32-bit floats, real part first. Inline, a complex amount uses a `complex_part` axis instead.
    complex128
    A complex number of two 64-bit floats, real part first.
  • scale
    number

    The stored number times scale, plus offset, gives the amount. As scale_factor in the CF conventions.

  • offset
    number

    Added after scale. As add_offset in the CF conventions.

  • missing
    numberorAlways"NaN"

    The stored number that marks an element with no data, or NaN for a float type that marks it with not-a-number. As _FillValue in the CF conventions.

  • array
    text

    The array's name inside the file, when the file holds several arrays.

Uncertainty

How far the true amount may be from the stated amount.

  • amountRequired
    numberorList ofUncertaintyElement

    The size of the uncertainty, plus or minus: one number for every element, or a list with the amount's shape.

  • unit

    Its unit, when it differs from the value's.

  • typeRequired
    One ofthe codes below

    Where the uncertainty comes from.

    method
    The spread the method itself allows, such as an engine's stated accuracy.
    numerical
    The spread from the numerical solution, such as grid or sampling error.
    measurement
    The spread of a measurement, such as an instrument's class tolerance.
  • confidence
    numbermore than 0at most 1

    The confidence level the amount covers, for example 0.95. Leave it out when not stated.

  • coverageFactor
    numbermore than 0

    The coverage factor k the amount was multiplied by, as the GUM (JCGM 100:2008): 1 for a standard uncertainty, 2 for about 95 % coverage.

Links

Held by Records that embed this one, with their field that holds it.

Examples

An id that another example defines opens that record.

Example 5

{
  "file": "file-noise-map",
  "encoding": {
    "dataType": "int16",
    "scale": 0.01,
    "missing": -32768,
    "array": "lp"
  },
  "unit": "dB",
  "crs": {
    "epsgCode": 3402
  },
  "axes": [
    {
      "quantity": "northing",
      "unit": "m",
      "start": 5791005,
      "step": 10,
      "count": 200,
      "bins": {
        "width": 10
      }
    },
    {
      "quantity": "easting",
      "unit": "m",
      "start": 512005,
      "step": 10,
      "count": 200,
      "bins": {
        "width": 10
      }
    }
  ]
}
Show 4 more examples

Example 1

{
  "amount": 38.2,
  "unit": "dB",
  "statistic": {
    "type": "energy_mean"
  },
  "period": "period-night",
  "uncertainty": {
    "amount": 2,
    "type": "method",
    "confidence": 0.95
  }
}

Example 2

{
  "amount": 450,
  "unit": "m"
}

Example 3

{
  "amount": "gravel"
}

Example 4

{
  "amount": [
    88.1,
    92.4,
    95,
    96.2,
    94.8,
    91.3,
    86,
    79.5
  ],
  "unit": "dB",
  "axes": [
    {
      "quantity": "frequency",
      "unit": "Hz",
      "values": [
        63,
        125,
        250,
        500,
        1000,
        2000,
        4000,
        8000
      ],
      "bins": {
        "set": "octave"
      }
    }
  ]
}

Changes and file

Changes

  1. 0.1.0 First version.

Schema file

Show the JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://opendevelopmentstandards.org/schema/1.0.0-rc.2/core/Value.json",
  "title": "Value",
  "description": "An amount with its unit and uncertainty. A list amount can lie along axes (a spectrum, a time series, a profile, a grid), and a large amount can sit in a File. Measured, calculated and set values all use it.",
  "type": "object",
  "properties": {
    "amount": {
      "description": "The amount: a number, text, true or false, or a list. With axes, the list nests one level per axis, outermost axis first; null marks an element with no data.",
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "string"
        },
        {
          "type": "boolean"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Element"
          }
        }
      ]
    },
    "file": {
      "type": "string",
      "minLength": 1,
      "x-ods-ref": "File",
      "description": "The file that holds the amount, when it is too large to write here."
    },
    "encoding": {
      "$ref": "#/$defs/Encoding"
    },
    "unit": {
      "type": "string",
      "x-ods-vocabulary": "*/units",
      "description": "The unit, as a code from a units vocabulary (for example dB, m, Hz). Leave it out when the amount has no unit."
    },
    "axes": {
      "type": "array",
      "items": {
        "$ref": "Axis.json"
      },
      "description": "The axes the amount lies along, outermost first. Leave them out for one amount or a plain list.",
      "minItems": 1
    },
    "statistic": {
      "$ref": "Statistic.json",
      "description": "How the amount sums up the data it comes from."
    },
    "averaging": {
      "type": "string",
      "pattern": "^-?P(?!$)(\\d+(\\.\\d+)?Y)?(\\d+(\\.\\d+)?M)?(\\d+(\\.\\d+)?W)?(\\d+(\\.\\d+)?D)?(T(?=\\d)(\\d+(\\.\\d+)?H)?(\\d+(\\.\\d+)?M)?(\\d+(\\.\\d+)?S)?)?$",
      "description": "The time each element covers, as an ISO 8601 duration, such as PT1H for 1-hour means."
    },
    "period": {
      "type": "string",
      "minLength": 1,
      "x-ods-ref": "Period",
      "description": "The window that repeats which the amount covers, such as night-time."
    },
    "crs": {
      "$ref": "Crs.json",
      "description": "The coordinate reference system of spatial axes. Required when an axis is `easting`, `northing`, `longitude` or `latitude`."
    },
    "uncertainty": {
      "$ref": "#/$defs/Uncertainty"
    }
  },
  "oneOf": [
    {
      "properties": {
        "amount": true
      },
      "required": [
        "amount"
      ]
    },
    {
      "properties": {
        "file": true
      },
      "required": [
        "file"
      ]
    }
  ],
  "dependentRequired": {
    "encoding": [
      "file"
    ]
  },
  "patternProperties": {
    "^x-": {}
  },
  "unevaluatedProperties": false,
  "$defs": {
    "Element": {
      "description": "One element of a list amount: a number, text, true or false, null for no data, or a nested list for the next axis.",
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "string"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Element"
          }
        }
      ]
    },
    "UncertaintyElement": {
      "description": "One element of a list uncertainty: a number, null, or a nested list for the next axis.",
      "anyOf": [
        {
          "type": "number",
          "minimum": 0
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/UncertaintyElement"
          }
        }
      ]
    },
    "Encoding": {
      "type": "object",
      "properties": {
        "dataType": {
          "type": "string",
          "enum": [
            "int8",
            "int16",
            "int32",
            "float32",
            "float64",
            "complex64",
            "complex128"
          ],
          "description": "How each element is stored.",
          "x-ods-options": [
            {
              "value": "int8",
              "title": "8-bit integer",
              "description": "A signed 8-bit integer."
            },
            {
              "value": "int16",
              "title": "16-bit integer",
              "description": "A signed 16-bit integer."
            },
            {
              "value": "int32",
              "title": "32-bit integer",
              "description": "A signed 32-bit integer."
            },
            {
              "value": "float32",
              "title": "32-bit float",
              "description": "An IEEE 754 single-precision number."
            },
            {
              "value": "float64",
              "title": "64-bit float",
              "description": "An IEEE 754 double-precision number."
            },
            {
              "value": "complex64",
              "title": "64-bit complex",
              "description": "A complex number of two 32-bit floats, real part first. Inline, a complex amount uses a `complex_part` axis instead."
            },
            {
              "value": "complex128",
              "title": "128-bit complex",
              "description": "A complex number of two 64-bit floats, real part first."
            }
          ]
        },
        "scale": {
          "type": "number",
          "description": "The stored number times `scale`, plus `offset`, gives the amount. As `scale_factor` in the CF conventions."
        },
        "offset": {
          "type": "number",
          "description": "Added after `scale`. As `add_offset` in the CF conventions."
        },
        "missing": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "const": "NaN"
            }
          ],
          "description": "The stored number that marks an element with no data, or `NaN` for a float type that marks it with not-a-number. As `_FillValue` in the CF conventions."
        },
        "array": {
          "type": "string",
          "description": "The array's name inside the file, when the file holds several arrays."
        }
      },
      "required": [
        "dataType"
      ],
      "description": "How the file stores the amount. The file's media type says how to read it.",
      "patternProperties": {
        "^x-": {}
      },
      "unevaluatedProperties": false
    },
    "Uncertainty": {
      "type": "object",
      "properties": {
        "amount": {
          "description": "The size of the uncertainty, plus or minus: one number for every element, or a list with the amount's shape.",
          "anyOf": [
            {
              "type": "number",
              "minimum": 0
            },
            {
              "type": "array",
              "items": {
                "$ref": "#/$defs/UncertaintyElement"
              }
            }
          ]
        },
        "unit": {
          "type": "string",
          "x-ods-vocabulary": "*/units",
          "description": "Its unit, when it differs from the value's."
        },
        "type": {
          "type": "string",
          "enum": [
            "method",
            "numerical",
            "measurement"
          ],
          "description": "Where the uncertainty comes from.",
          "x-ods-options": [
            {
              "value": "method",
              "title": "Method",
              "description": "The spread the method itself allows, such as an engine's stated accuracy."
            },
            {
              "value": "numerical",
              "title": "Numerical",
              "description": "The spread from the numerical solution, such as grid or sampling error."
            },
            {
              "value": "measurement",
              "title": "Measurement",
              "description": "The spread of a measurement, such as an instrument's class tolerance."
            }
          ]
        },
        "confidence": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 1,
          "description": "The confidence level the amount covers, for example 0.95. Leave it out when not stated."
        },
        "coverageFactor": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "The coverage factor k the amount was multiplied by, as the GUM (JCGM 100:2008): 1 for a standard uncertainty, 2 for about 95 % coverage."
        }
      },
      "required": [
        "amount",
        "type"
      ],
      "description": "How far the true amount may be from the stated amount.",
      "patternProperties": {
        "^x-": {}
      },
      "unevaluatedProperties": false
    }
  },
  "examples": [
    {
      "amount": 38.2,
      "unit": "dB",
      "statistic": {
        "type": "energy_mean"
      },
      "period": "period-night",
      "uncertainty": {
        "amount": 2,
        "type": "method",
        "confidence": 0.95
      }
    },
    {
      "amount": 450,
      "unit": "m"
    },
    {
      "amount": "gravel"
    },
    {
      "amount": [
        88.1,
        92.4,
        95,
        96.2,
        94.8,
        91.3,
        86,
        79.5
      ],
      "unit": "dB",
      "axes": [
        {
          "quantity": "frequency",
          "unit": "Hz",
          "values": [
            63,
            125,
            250,
            500,
            1000,
            2000,
            4000,
            8000
          ],
          "bins": {
            "set": "octave"
          }
        }
      ]
    },
    {
      "file": "file-noise-map",
      "encoding": {
        "dataType": "int16",
        "scale": 0.01,
        "missing": -32768,
        "array": "lp"
      },
      "unit": "dB",
      "crs": {
        "epsgCode": 3402
      },
      "axes": [
        {
          "quantity": "northing",
          "unit": "m",
          "start": 5791005,
          "step": 10,
          "count": 200,
          "bins": {
            "width": 10
          }
        },
        {
          "quantity": "easting",
          "unit": "m",
          "start": 512005,
          "step": 10,
          "count": 200,
          "bins": {
            "width": 10
          }
        }
      ]
    }
  ],
  "x-ods-status": "draft",
  "x-ods-kind": "datatype",
  "x-ods-module": "core",
  "x-ods-changes": {
    "0.1.0": "First version."
  }
}