@hestia-earth/schema
Version:
HESTIA Schema
347 lines (346 loc) • 16.1 kB
TypeScript
import { JSON, SchemaType } from './types';
import { Term } from './Term';
import { ImpactAssessment } from './ImpactAssessment';
import { Site } from './Site';
import { Source } from './Source';
import { Property } from './Property';
import { Transport } from './Transport';
import { TermTermType } from './Term';
export declare enum InputStatsDefinition {
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 InputMethodClassification {
'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 InputPriceStatsDefinition {
cycles = "cycles",
'cycles and time' = "cycles and time",
time = "time"
}
export declare enum InputCostStatsDefinition {
cycles = "cycles",
'cycles and time' = "cycles and time",
time = "time"
}
/**
* Contains all the TermTermType with override on the Input.
* Note: it does not contain the default TermTermType on related Blank Nodes.
*/
export declare const inputTermTermType: {
term: TermTermType[];
model: TermTermType[];
operation: TermTermType[];
country: TermTermType[];
region: TermTermType[];
all: TermTermType[];
};
/**
* Contains all the fields that make the blank nodes unique.
*/
export declare const inputUniquenessFields: {
properties: string[];
transport: string[];
};
/**
* An Input used during the [Cycle](/schema/Cycle) or [Transformation](/schema/Transformation). Each Input must be unique, and the fields which determine uniqueness are defined in the <code>[inputs](/schema/Cycle#inputs)</code> field of the Cycle or [Transformation](/schema/Transformation#inputs).
*/
export declare class Input extends JSON<SchemaType.Input> {
/**
* A reference to the [Term](/schema/Term) describing the Input.
*/
term?: Term;
/**
* A description of the Input.
*/
description?: string;
/**
* The quantity of the Input. If an average, it should always be the mean. Can be a single number (array of length one) or an array of numbers with associated <code>[dates](/schema/Input#dates)</code> (e.g., representing an application schedule).
*/
value?: (number | 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/Input#dates)</code> field.
*/
distribution?: (number)[] | number[][];
/**
* The standard deviation of <code>[value](/schema/Input#value)</code>.
*/
sd?: (number | null)[];
/**
* The minimum of <code>[value](/schema/Input#value)</code>.
*/
min?: (number | null)[];
/**
* The maximum of <code>[value](/schema/Input#value)</code>.
*/
max?: (number | null)[];
/**
* What the descriptive statistics (<code>[sd](/schema/Input#sd)</code>, <code>[min](/schema/Input#min)</code>, <code>[max](/schema/Input#max)</code>, and <code>[value](/schema/Input#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?: InputStatsDefinition;
/**
* The number of observations the descriptive statistics are calculated over.
*/
observations?: (number | null)[];
/**
* A corresponding array to <code>[value](/schema/Input#value)</code>, representing the dates of the Inputs 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 Inputs over periods different to [Cycle](/schema/Cycle), the start date of the Input (if different from the start date of the [Cycle]) in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD).
*/
startDate?: string;
/**
* For Inputs over periods different to [Cycle](/schema/Cycle), the end date of the Input (if different from the end date of the [Cycle]) in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD).
*/
endDate?: string;
/**
* The duration of the Input in days.
*/
inputDuration?: number;
/**
* A classification of the method used to acquire or estimate the <code>[term](/schema/Input#term)</code> and <code>[value](/schema/Input#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/Input#properties)</code> (see <code>[Property](/schema/Property#methodClassification)</code>) and <code>[transport](/schema/Input#transport)</code> (see <code>[Transport](/schema/Transport#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?: InputMethodClassification;
/**
* A justification of the <code>[methodClassification](/schema/Input#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/Input#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;
/**
* <code>true</code> if this Input is fed to animals. A required field for Inputs which could potentially be animal feed (defined as Inputs of <code>[termType](/schema/Term#termType)</code> <code>=</code> <code>[crop](/glossary?termType=crop)</code>, <code>[forage](/glossary?termType=forage)</code>, <code>[liveAnimal](/glossary?termType=liveAnimal)</code>, <code>[animalProduct](/glossary?termType=animalProduct)</code>, <code>[liveAquaticSpecies](/glossary?termType=liveAquaticSpecies)</code>, <code>[feedFoodAdditive](/glossary?termType=feedFoodAdditive)</code>, <code>[processedFood](/glossary?termType=processedFood)</code>, or <code>[waste](/glossary?termType=waste)</code> in animal production Cycles).
*/
isAnimalFeed?: boolean;
/**
* A required field for [Inputs](/schema/Transformation#inputs) into [Transformations](/schema/Transformation) only. <code>true</code> if this Input is a [Product](/schema/Product) from the [Cycle](/schema/Cycle). <code>false</code> if this Input was added at the Transformation stage only (e.g., diesel used to power a grain dryer) or <code>false</code> if this Input is a Product from a previous Transformation.
*/
fromCycle?: boolean;
/**
* Whether an input is produced and used during the Cycle, e.g., <code>true</code> if the forage is grown on the pasture where animals are grazing, <code>false</code> if it is grown elsewhere.
*/
producedInCycle?: boolean;
/**
* The price paid for this Input. The [currency](/schema/Input#currency) must be specified. The price should be expressed per the units defined in the [term](/schema/Input#term), for example per "kg active ingredient". In situations where a term describes one physical item (e.g., "NP Blend" fertiliser) but the glossary uses terms with unit that split the item (e.g., "NP Blend (kg N)" and "NP Blend (kg P2O5)") the price must be divided by the relative mass of each term.
*/
price?: number;
/**
* The standard deviation of <code>[price](/schema/Input#price)</code>.
*/
priceSd?: number;
/**
* The minimum of <code>[price](/schema/Input#price)</code>.
*/
priceMin?: number;
/**
* The maximum of <code>[price](/schema/Input#price)</code>.
*/
priceMax?: number;
/**
* What the descriptive statistics for <code>[price](/schema/Input#price)</code> are calculated across.
*/
priceStatsDefinition?: InputPriceStatsDefinition;
/**
* The total cost of this Input ([price](/schema/Input#price) <code>x</code> [quantity](/schema/Input#value)), expressed as a positive value. The [currency](/schema/Input#currency) must be specified.
*/
cost?: number;
/**
* The standard deviation of <code>[cost](/schema/Input#cost)</code>.
*/
costSd?: number;
/**
* The minimum of <code>[cost](/schema/Input#cost)</code>.
*/
costMin?: number;
/**
* The maximum of <code>[cost](/schema/Input#cost)</code>.
*/
costMax?: number;
/**
* What the descriptive statistics for <code>[cost](/schema/Input#cost)</code> are calculated across.
*/
costStatsDefinition?: InputCostStatsDefinition;
/**
* The three letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format.
*/
currency?: string;
/**
* For Inputs used to create [Infrastructure](/schema/Infrastructure), the lifespan of this Input expressed in decimal years.
*/
lifespan?: number;
/**
* A reference to the [Term](/schema/Term) describing the operation associated with this Input (e.g., for the Input [diesel](/term/diesel) the operation could be [Soil decompaction, machine unspecified](/term/soilDecompactionMachineUnspecified)).
*/
operation?: Term;
/**
* The [country](/glossary?termType=region) where this Input came from.
*/
country?: Term;
/**
* The [region](/glossary?termType=region) where this Input came from.
*/
region?: Term;
/**
* A reference to the node containing environmental impact data related to producing this product and transporting it to the [Site](/schema/Site).
*/
impactAssessment?: ImpactAssessment;
/**
* <table class="sub-table"> <tbody>
<tr>
<td class="w-100">The <code>[impactAssessment](/schema/Input#impactAssessment)</code>
referred to represents data from the actual supply chain (e.g., data from
the actual supplying farm or the supplying feed mill).
</td>
<td class="sub-table-value">Set to <code>false</code></td>
</tr>
<tr>
<td class="w-100">The <code>[impactAssessment](/schema/Input#impactAssessment)</code>
referred to is a proxy for the actual supply chain (e.g., global or
regional average data).
</td>
<td class="sub-table-value">Set to <code>true</code></td>
</tr>
</tbody>
</table> <p>Required if <code>[impactAssessment](/schema/Input#impactAssessment)</code> is specified.</p>
*/
impactAssessmentIsProxy?: boolean;
/**
* If the Cycle occurred on multiple [Sites](/schema/Site), the Site where this Input was used.
*/
site?: Site;
/**
* A reference to the [Source](/schema/Source) of these data, if different from the [defaultSource](/schema/Cycle#defaultSource) of the [Cycle](/schema/Cycle).
*/
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 Input, which would override any default properties specified in the [term](/schema/Input#term).
*/
properties?: Property[];
/**
* A list of [Transport](/schema/Transport) stages to bring this Input to the [Cycle](/schema/Cycle).
*/
transport?: Transport[];
/**
* 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)[];
}