expandYear: This function expands the range of the year variable.

Description Usage Arguments Details Value

Description

This is required due the sparse representation of databases. When a new round of processing commencing in 2015, since there are no data input nor previous imputation, the record does not exist and thus imputation or any processing has no record to replace. We need to expand the year variable in order to perform imputation.

Usage

1
2
3
4
5
expandYear(data, areaVar = "geographicAreaM49",
  elementVar = "measuredElement", itemVar = "measuredItemCPC",
  yearVar = "timePointYears", valueVar = "Value",
  obsflagVar = "flagObservationStatus", methFlagVar = "flagMethod",
  newYears = NULL)

Arguments

data

The dataset

areaVar

The column name corresponding to the geographic area.

elementVar

The column name corresponds to the measured element.

itemVar

The column name corresponding to the commodity item.

yearVar

The column name corresponds to the time dimension.

valueVar

The regular expression to capture the value column.

Details

New records created are not filled with flags, both observation status and method flag remains NA. The reason behind this is so that after the processing, if the record can not be populated with imputation then it will be dropped and not saved back to the database.

Value

A new dataset with the year variable expanded


SWS-Methodology/faoswsProcessing documentation built on June 19, 2019, 5:14 p.m.