UNPKG

@hestia-earth/schema

Version:
224 lines (223 loc) 9.93 kB
import { JSON, SchemaType } from './types'; import { Term } from './Term'; import { Source } from './Source'; import { Property } from './Property'; import { TermTermType } from './Term'; export declare enum MeasurementStatsDefinition { modelled = "modelled", 'other observations' = "other observations", regions = "regions", replications = "replications", simulated = "simulated", sites = "sites", spatial = "spatial", time = "time" } export declare enum MeasurementMethodClassification { 'country-level statistical data' = "country-level statistical data", 'expert opinion' = "expert opinion", 'geospatial dataset' = "geospatial dataset", 'modelled using other measurements' = "modelled using other measurements", 'on-site physical measurement' = "on-site physical measurement", 'physical measurement on nearby site' = "physical measurement on nearby site", 'regional statistical data' = "regional statistical data", 'tier 1 model' = "tier 1 model", 'tier 2 model' = "tier 2 model", 'tier 3 model' = "tier 3 model", 'unsourced assumption' = "unsourced assumption" } /** * Contains all the TermTermType with override on the Measurement. * Note: it does not contain the default TermTermType on related Blank Nodes. */ export declare const measurementTermTermType: { term: TermTermType[]; method: TermTermType[]; all: TermTermType[]; }; /** * Contains all the fields that make the blank nodes unique. */ export declare const measurementUniquenessFields: { properties: string[]; }; /** * A soil or climate Measurement on a [Site](/schema/Site). For example, the soil pH on 3 January 2020. The [method](/schema/Measurement#method) used to take the Measurement often changes the results, and it should ideally be specified. Each Measurement must be unique, and the fields which determine uniqueness are defined in the <code>[measurements](/schema/Site#measurements)</code> field of the Site. */ export declare class Measurement extends JSON<SchemaType.Measurement> { /** * A reference to the [Term](/schema/Term) describing the Measurement. */ term?: Term; /** * A short description of the Measurement. */ description?: string; /** * The quantity of the Measurement. If an average, it should always be the mean. Can be a single number (array of length one), an array of numbers with associated [dates](/schema/Measurement#dates) (e.g., representing multiple Measurements over time) or a boolean (e.g., [Heavy winter precipitation](/term/heavyWinterPrecipitation) can be either `true` or `false`). */ value?: (number | boolean)[]; /** * An array of up to 1000 random samples from the posterior distribution of <code>[value](/schema/Emission#value)</code. This should describe the entire distribution of the dataset and not the distribution of the mean. Multiple arrays can be nested where each array corresponds to a date from the <code>[dates](/schema/Measurement#dates)</code> field. */ distribution?: (number)[] | number[][]; /** * The standard deviation of <code>[value](/schema/Measurement#value)</code>. */ sd?: (number | null)[]; /** * The minimum of <code>[value](/schema/Measurement#value)</code>. */ min?: (number | null)[]; /** * The maximum of <code>[value](/schema/Measurement#value)</code>. */ max?: (number | null)[]; /** * What the descriptive statistics (<code>[sd](/schema/Measurement#sd)</code>, <code>[min](/schema/Measurement#min)</code>, <code>[max](/schema/Measurement#max)</code>, and <code>[value](/schema/Measurement#value)</code>) are calculated across, or whether they are simulated or the output of a model. <code>spatial</code> refers to descriptive statistics calculated across spatial units (e.g., pixels) within a region or country. <code>time</code> refers to descriptive statistics calculated across units of time (e.g., hours). */ statsDefinition?: MeasurementStatsDefinition; /** * The number of observations the descriptive statistics are calculated over. */ observations?: (number | null)[]; /** * A corresponding array to [value](/schema/Measurement#value), representing the dates (and times) of the Measurements in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD, YYYY-MM, YYYY, --MM-DD, --MM, or YYYY-MM-DDTHH:mm:ssZ). */ dates?: (string)[]; /** * For period Measurements, the start date of the Measurement in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD, YYYY-MM, or YYYY). */ startDate?: string; /** * For period Measurements, the end date of the Measurement in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD, YYYY-MM, or YYYY). */ endDate?: string; /** * The duration of the Measurement in days. */ measurementDuration?: number; /** * For soil Measurements, the upper (shallower) depth of the Measurement interval in centimeters, using positive numbers. */ depthUpper?: number; /** * For soil Measurements, the lower (deeper) depth of the Measurement interval in centimeters. */ depthLower?: number; /** * The latitude of the Measurement if different from the centroid of the Site (-90 to 90, WGS84 datum). */ latitude?: number; /** * The longitude of the Measurement if different from the centroid of the Site (-90 to 90, WGS84 datum). */ longitude?: number; /** * <ul class="is-pl-3 is-list-style-disc"> <li> An <code>on-site physical measurement</code> is based on weather stations or indoor climate monitoring units on the [Site](/schema/Site) or on soil samples taken from the [Site](/schema/Site). </li> <li> A <code>physical measurement on nearby site</code> is based on data from nearby weather stations or indoor climate monitoring units or on soil samples from nearby [Sites](/schema/Site) which can be assumed to represent the current [Site](/schema/Site). </li> <li> <code>modelled using other measurements</code> means the data are estimated by applying a statistical or process based model, which is associated with some error, to other measurements. </li> <li> A <code>tier 1 model</code> quantifies the Measurement using activity data (i.e., data on [Inputs](/schema/Input), [Practices](/schema/Practice), etc.) using a simple equation with parameters which are not country or region specific. </li> <li> A <code>tier 2 model</code> quantifies the Measurement from activity data using a simple equation, often of the same form as the <code>tier 1 model</code>, but with geographically specific parameters (e.g., other Site Measurements). </li> <li> A <code>tier 3 model</code> quantifies the Measurement from activity data but uses equations or algorithms that differ from the <code>tier 1 model</code> and <code>tier 2 model</code> approaches. Tier 3 approaches include process based models and statistical models with various forms. </li> <li> A <code>geospatial dataset</code> is data in raster or vector format with sub-regional and sub-national spatial resolution. </li> <li> <code>regional statistical data</code> are soil or climate measurements representative of the [region](/schema/Site#region). </li> <li> <code>country-level statistical data</code> are soil or climate measurements representative of the [country](/schema/Site#country). </li> <li> <code>expert opinion</code> is a soil or climate measurement estimated by an individual or organisation with context-specific knowledge. </li> <li> An <code>unsourced assumption</code> is a soil or climate measurement estimated by pure assumption or provided without any information on its source. </li> </ul> */ methodClassification?: MeasurementMethodClassification; /** * Further description or justification of the [methodClassification](/schema/Measurement#methodClassification). */ methodClassificationDescription?: string; /** * For physical measurements, a reference to the [Term](/schema/Term) describing the method used to acquire the measurement. */ method?: Term; /** * A free text field describing the method used to acquire the Measurement. */ methodDescription?: string; /** * A reference to the [Source](/schema/Source) of these data, if different from the [defaultSource](/schema/Site#defaultSource) of the [Site](/schema/Site). */ source?: Source; /** * A list of references to any other [sources](/schema/Source) of these data. */ otherSources?: Source[]; /** * A list of [Properties](/schema/Property) of the Measurement, which would override any default properties specified in the [term](/schema/Measurement#term). */ properties?: Property[]; /** * Version of the schema when the data was created. */ schemaVersion?: string; /** * A list of fields that have been added to the original dataset. */ added?: (string)[]; /** * A list of versions of the model used to add these fields. */ addedVersion?: (string)[]; /** * A list of fields that have been updated on the original dataset. */ updated?: (string)[]; /** * A list of versions of the model used to update these fields. */ updatedVersion?: (string)[]; /** * A list of fields that have been 'aggregated' using data from multiple [Sites](/schema/Site). */ aggregated?: (string)[]; /** * A list of versions of the aggregation engine corresponding to each aggregated field. */ aggregatedVersion?: (string)[]; }