getAllHistory: Get All Production History

View source: R/getAllHistory.R

getAllHistoryR Documentation

Get All Production History

Description

This function is used to pull the historical production values from the database. One main purpose of this data is to train machine learning algorithms on invalid observations, and use those models to attempt to detect invalid observations in the current data.

Usage

getAllHistory()

Value

A data.table object with the following columns:

  • geographicAreaM49: The code for the country of this observation.

  • measuredElement: The code for the element of this observation (these match with the "Element" dimension in the agriculture domain, for example 5312 is area harvested, 5510 is production, etc.).

  • measuredItemCPC: The CPC code for the commodity.

  • timePointYears: The year for this observation.

  • Version: ?

  • StartDate: The initial date this value was entered into the system.

  • EndDate: The date that this value was overwritten. If NA, this value is the current best estimate and is considered valid. If not NA, this value is considered invalid.

  • Metadata: ?

  • Metadata_Language: An abbreviation for the language of the metadata comments.

  • Metadata_Group: ?

  • Metadata_Element: ?

  • Metadata_Value: ?

  • Value: The value stored in the database for this observation.

  • flagObservationStatus: The flag corresponding to the observation status of the current observation. See the faoswsFlag package for more details.

  • flagMethod: The method flag for the current observation. Again, see the faoswsFlag package.

  • valid: A Y/N value indicating whether or not the current value is valid. This is determined solely on the basis of whether or not this value was overwritten.

  • productionValue: The value corresponding to production (element 5510) for this particular observation. This may be useful in training the classification ensemble.


SWS-Methodology/faoswsProduction documentation built on March 21, 2023, 8:27 p.m.