UNPKG

@hestia-earth/schema

Version:
146 lines (145 loc) 6.58 kB
import { JSON, SchemaType } from './types'; import { Term } from './Term'; import { Property } from './Property'; import { Source } from './Source'; import { TermTermType } from './Term'; export declare enum ProductStatsDefinition { cycles = "cycles", modelled = "modelled", otherObservations = "otherObservations", regions = "regions", replications = "replications", simulated = "simulated", sites = "sites", spatial = "spatial" } /** * Contains all the TermTermType with override on the Product. * Note: it does not contain the default TermTermType on related Blank Nodes. */ export declare const productTermTermType: { term: TermTermType[]; methodModel: TermTermType[]; all: TermTermType[]; }; /** * A Product created during the [Cycle]. */ export declare class Product extends JSON<SchemaType.Product> { /** * A reference to the [Term] describing the Product. */ term?: Term; /** * A short description of the Product. */ description?: string; /** * The variety (cultivar) of a crop or breed of animal. 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; /** * The quantity of the Product. 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 [dates](#dates) (e.g. for multiple harvests in one [Cycle]). The units are always specified in the [Term]. For crops, value should always be per harvest or per year, following [FAOSTAT conventions](http://www.fao.org/economic/the-statistics-division-ess/methodology/methodology-systems/crops-statistics-concepts-definitions-and-classifications/en/). */ value?: (number | null)[]; /** * The standard deviation of value. */ sd?: (number | null)[]; /** * The minimum of value. */ min?: (number | null)[]; /** * The maximum of value. */ max?: (number | null)[]; /** * What the descriptive statistics (sd, min, max, and value) are calculated across, or whether they are simulated or the output of a model. Spatial is descriptive statistics calculated across spatial units (e.g., pixels) within a region or country. */ statsDefinition?: ProductStatsDefinition; /** * The number of observations the descriptive statistics are calculated over, if different from the [numberOfCycles](./Cycle#numberOfCycles) specified in [Cycle]. */ observations?: (number | null)[]; /** * A corresponding array to [value](#value), representing the dates of the Products in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD, YYYY-MM, YYYY, --MM-DD, or --MM). */ dates?: (string)[]; /** * For Products created over periods, the start date of the Product (if different from the start date of the [Cycle]) in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD, YYYY-MM, or YYYY). */ startDate?: string; /** * For Products created over periods, the end date of the Product (if different from the start date of the [Cycle]) in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD, YYYY-MM, or YYYY). */ endDate?: string; /** * The sale price of this Product. The price should be expressed per the units defined in the [term](#term), for example per "kg liveweight". The [currency](#currency) must be specified. */ price?: number; /** * The total revenue ([price](#price) x [quantity](#value)) of this Product. The [currency](#currency) must be specified. */ revenue?: number; /** * The three letter currency code in [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) format. */ currency?: string; /** * The economic value (typically revenue) of this Product, divided by the total economic value of all Products, expressed as a percentage. */ economicValueShare?: number; /** * Where the are multiple products, whether this product is the primary product. Defaults to true if there is only one product or if [economicValueShare](#economicValueShare) > 50. */ primary?: boolean; /** * A list of [Properties](./Property) of the Product, which would override any default properties specified in [term](#term). For crops, dry matter is a default property of the Term and can be changed by adding [dry matter](/term/dryMatter) here. */ properties?: Property[]; /** * An assessment of the reliability of these data following the pedigree matrix approach detailed by [Edelen & Ingwersen (2019)](https://cfpub.epa.gov/si/si_public_file_download.cfm?p_download_id=528687). (1) Verified (e.g. by on site checks, recalculation, or mass balance estimation) data based on measurements; (2) Verified data based on a calculation or non-verified data based on measurements; (3) Non-verified data based on a calculation; (4) Documented estimate; (5) Undocumented estimate. In different language, (1-2) can be considered primary data and (3-5) secondary. */ reliability?: number; /** * A reference to the [Term] describing the method or model for acquiring or estimating these data. */ methodModel?: Term; /** * A free text field, describing the method or model used for acquiring or estimating these data. */ methodModelDescription?: string; /** * A reference to the [Source] of these data, if different from the [defaultSource](Cycle#defaultSource) of the [Cycle]. */ source?: Source; /** * 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](./Cycle). */ aggregated?: (string)[]; /** * A list of versions of the aggregation engine corresponding to each aggregated field. */ aggregatedVersion?: (string)[]; }