@hestia-earth/schema
Version:
HESTIA Schema
315 lines (314 loc) • 14.9 kB
TypeScript
import { JSON, SchemaType } from './types';
import { Term } from './Term';
import { Site } from './Site';
import { Source } from './Source';
import { Property } from './Property';
import { TermTermType } from './Term';
export declare enum PracticeStatsDefinition {
animals = "animals",
cycles = "cycles",
modelled = "modelled",
'other observations' = "other observations",
regions = "regions",
replications = "replications",
simulated = "simulated",
sites = "sites",
spatial = "spatial",
time = "time"
}
export declare enum PracticeMethodClassification {
'consistent external sources' = "consistent external sources",
'estimated with assumptions' = "estimated with assumptions",
'expert opinion' = "expert opinion",
'inconsistent external sources' = "inconsistent external sources",
modelled = "modelled",
'non-verified survey data' = "non-verified survey data",
'physical measurement' = "physical measurement",
'unsourced assumption' = "unsourced assumption",
'verified survey data' = "verified survey data"
}
export declare enum PracticePriceStatsDefinition {
cycles = "cycles",
'cycles and time' = "cycles and time",
time = "time"
}
export declare enum PracticeCostStatsDefinition {
cycles = "cycles",
'cycles and time' = "cycles and time",
time = "time"
}
export declare enum PracticeOwnershipStatus {
borrowed = "borrowed",
owned = "owned",
rented = "rented"
}
/**
* Contains all the TermTermType with override on the Practice.
* Note: it does not contain the default TermTermType on related Blank Nodes.
*/
export declare const practiceTermTermType: {
term: TermTermType[];
key: TermTermType[];
model: TermTermType[];
all: TermTermType[];
};
/**
* Contains all the fields that make the blank nodes unique.
*/
export declare const practiceUniquenessFields: {
properties: string[];
};
/**
* A Practice used during a [Cycle](/schema/Cycle) or [Transformation](/schema/Transformation). Each Practice must be unique, and the fields which determine uniqueness are defined in the <code>[practices](/schema/Cycle#practices)</code> field of the Cycle or [Transformation](/schema/Transformation#inputs).
*/
export declare class Practice extends JSON<SchemaType.Practice> {
/**
* A reference to the [Term](/schema/Term) describing the Practice. This can be replaced by a description instead if the Term isn't available in the [Glossary](/Glossary).
*/
term?: Term;
/**
* A description of the Practice. This is a required field if [term](/schema/Practice#term) is not provided.
*/
description?: string;
/**
* For [Land cover](/glossary?termType=landCover) terms only, the variety (cultivar) of a crop. Standardised variety names are defined in external glossaries, such as the [OECD](https://www.niab.com/oecdv2/variety), [GEVES](https://www.geves.fr/catalogue-france/), [PLUTO](https://www.upov.int/pluto/en/), or [CPVO](https://online.plantvarieties.eu/) glossaries.
*/
variety?: string;
/**
* If the data associated with the Practice are in key:value form, the key.
*/
key?: Term;
/**
* The value associated with the Practice. If an average, it should always be the mean.
*/
value?: (number | string | boolean | null)[];
/**
* 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/Practice#dates)</code> field.
*/
distribution?: (number)[] | number[][];
/**
* The standard deviation of <code>[value](/schema/Practice#value)</code>.
*/
sd?: (number | null)[];
/**
* The minimum of <code>[value](/schema/Practice#value)</code>.
*/
min?: (number | null)[];
/**
* The maximum of <code>[value](/schema/Practice#value)</code>.
*/
max?: (number | null)[];
/**
* The 10th percentile of <code>[value](/schema/Practice#value)</code>.
*/
percentile10th?: number;
/**
* The 90th percentile of <code>[value](/schema/Practice#value)</code>.
*/
percentile90th?: number;
/**
* What the descriptive statistics (<code>[sd](/schema/Practice#sd)</code>, <code>[min](/schema/Practice#min)</code>, <code>[max](/schema/Practice#max)</code>, and <code>[value](/schema/Practice#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?: PracticeStatsDefinition;
/**
* The number of observations the descriptive statistics are calculated over.
*/
observations?: (number | null)[];
/**
* A corresponding array to [value](/schema/Practice#value), representing the dates of the Practice 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)[];
/**
* The start date of the Practice if different from the start date of the [Cycle](/schema/Cycle) in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD, YYYY-MM, or YYYY). The start date is the first date the practice is carried out. The practice will continue without stopping until the end date is reached. Alternatively, use the `dates` term to specify practices which occur on a number of different dates.
*/
startDate?: string;
/**
* The end date of the Practice if different from the end date of the [Cycle](/schema/Cycle) in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD, YYYY-MM, or YYYY). The end date is the last date the practice is carried out. The practice will continue without stopping until the end date is reached. Alternatively, use the `dates` term to specify practices which occur on a number of different dates.
*/
endDate?: string;
/**
* A classification of the method used to acquire or estimate the <code>[term](/schema/Practice#term)</code> and <code>[value](/schema/Practice#value)</code>. Overrides the <code>[defaultMethodClassification](/schema/Cycle#defaultMethodClassification)</code> specified in the [Cycle](/schema/Cycle). <code>methodClassification</code> should be specified separately for <code>[properties](/schema/Practice#properties)</code> (see <code>[Property](/schema/Property#methodClassification)</code>). <ul class="is-pl-3 is-list-style-disc"> <li>
<code>physical measurement</code> means the amount is quantified using weighing,
volume measurement, metering, chemical methods, or other physical approaches.
</li>
<li>
<code>verified survey data</code> means the data are initially collected through
surveys; all or a subset of the data are verified using physical methods; and
erroneous survey data are discarded or corrected.
</li>
<li>
<code>non-verified survey data</code> means the data are collected through
surveys that have not been subjected to verification.
</li>
<li>
<code>modelled</code> means a previously calibrated model is used to estimate
this data point from other data points describing this Cycle.
</li>
<li>
<code>estimated with assumptions</code> means a documented assumption is used
to estimate this data point from other data points describing this Cycle.
</li>
<li>
<code>consistent external sources</code> means the data are taken from external
datasets referring to different producers/enterprises:
<ul class="is-pl-4 is-list-style-disc">
<li>
Using the same technology (defined as the same
[System](/glossary?termType=system) or the same key [Practices](/schema/Practice)
as those specified in the Cycle);
</li>
<li>
At the same date (defined as occurring within the
[startDate](/schema/Cycle#startDate) and [endDate](/schema/Cycle#endDate) of the Cycle);
and
</li>
<li>
In the same [region](/schema/Site#region) or [country](/schema/Site#country).
</li>
</ul>
Modelling or assumptions may have also been used to transform these data.
</li>
<li>
<code>inconsistent external sources</code> means the data are taken from external
datasets referring to different producers/enterprises:
<ul class="is-pl-4 is-list-style-disc">
<li>
Using a different technology (defined as a different
[System](/glossary?termType=system) or using different key
[Practices](/schema/Practice) to those specified in the Cycle);
</li>
<li>
At a different date (defined as occurring within the
[startDate](/schema/Cycle#startDate) and [endDate](/schema/Cycle#endDate) of the Cycle);
or
</li>
<li>
In a different [region](/schema/Site#region) or [country](/schema/Site#country).
</li>
</ul>
Modelling or assumptions may have also been used to transform these data.
</li>
<li>
<code>expert opinion</code> means the data have been estimated by experts in
the field.
</li>
<li>
<code>unsourced assumption</code> means the data do not have a clear source
and/or are based on assumptions only.
</li>
</ul>
*/
methodClassification?: PracticeMethodClassification;
/**
* A justification of the <code>[methodClassification](/schema/Practice#methodClassification)</code> used. If the data were <code>estimated with assumptions</code> this field should also describe the assumptions. This is a required field if <code>[methodClassification](/schema/Practice#methodClassification)</code> is specified.
*/
methodClassificationDescription?: string;
/**
* A reference to the [Term](/schema/Term) describing the [model](/glossary?termType=model) used to estimate these data.
*/
model?: Term;
/**
* A free text field, describing the model used to estimate these data.
*/
modelDescription?: string;
/**
* The area of the [Site](/schema/Site) that Practice occurred on, specified as a percentage of Site [area](/schema/Site#area). If the units of the [term](/schema/Practice#term) are already in <code>% area</code>, do not use this field and use [value](/schema/Practice#value) instead to record these data.
*/
areaPercent?: number;
/**
* The price paid for this Practice. The price should be expressed per the units defined in the [term](/schema/Practice#term). The [currency](/schema/Practice#currency) must be specified. The price of the [inputs](/schema/Cycle#inputs) associated with this practice should be included in the [inputs](/schema/Cycle#inputs) rather than here.
*/
price?: number;
/**
* The standard deviation of <code>[price](/schema/Practice#price)</code>.
*/
priceSd?: number;
/**
* The minimum of <code>[price](/schema/Practice#price)</code>.
*/
priceMin?: number;
/**
* The maximum of <code>[price](/schema/Practice#price)</code>.
*/
priceMax?: number;
/**
* What the descriptive statistics for <code>[price](/schema/Practice#price)</code> are calculated across.
*/
priceStatsDefinition?: PracticePriceStatsDefinition;
/**
* The total cost of this Practice ([price](/schema/Practice#price) <code>x</code> [quantity](/schema/Practice#value)), expressed as a positive value. The [currency](/schema/Practice#currency) must be specified. The cost of the [inputs](/schema/Cycle#inputs) associated with this practice should be included in the [inputs](/schema/Cycle#inputs) rather than here.
*/
cost?: number;
/**
* The standard deviation of <code>[cost](/schema/Practice#cost)</code>.
*/
costSd?: number;
/**
* The minimum of <code>[cost](/schema/Practice#cost)</code>.
*/
costMin?: number;
/**
* The maximum of <code>[cost](/schema/Practice#cost)</code>.
*/
costMax?: number;
/**
* What the descriptive statistics for <code>[cost](/schema/Practice#cost)</code> are calculated across.
*/
costStatsDefinition?: PracticeCostStatsDefinition;
/**
* The three letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.
*/
currency?: string;
/**
* For operations, the ownership status of the equipment used to perform the operation.
*/
ownershipStatus?: PracticeOwnershipStatus;
/**
* For primary processing [operations](/glossary?termType=operation) in food processing [Cycles](/schema/Cycle), the percent of primary Product produced with the [operation](/glossary?termType=operation). For example, if the [Cycle](/schema/Cycle) represents [Oil palm, oil (crude)](/term/oilPalmOilCrude) produced only with the operation [Pressing, with screw press](/term/pressingWithScrewPress), the [primaryPercent](/schema/primaryPercent) would be <code>100</code>.
*/
primaryPercent?: number;
/**
* If the Cycle occurred on multiple [Sites](/schema/Site), the Site where this Practice was used.
*/
site?: Site;
/**
* A reference to the [Source](/schema/Source) of these data, if different from the defaultSource of the [Cycle](/schema/Cycle) or [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 Practice, which would override any default properties specified in the <code>[term](/schema/Practice#term)</code>.
*/
properties?: Property[];
/**
* The version of the schema when these data were 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 [Cycles](/schema/Cycle).
*/
aggregated?: (string)[];
/**
* A list of versions of the aggregation engine corresponding to each aggregated field.
*/
aggregatedVersion?: (string)[];
}