getShareData: Get Share Data

Description Usage Arguments Value

Description

This function extracts the shares data from the data base. The shares data contains information on children are shared amongst parents. For example, some children of wheat flour (item = "16") are: macaroni (18), bread (20), and pastry (22). In Algeria (geographicAreaFS = "4"), the shares are 95, 3, and 2 which means that 95 to bread and 2 wildcard, and values can vary by year (also with a wildcard of 0).

Usage

1
getShareData(aupusParam, database = c("new", "old"), conn)

Arguments

aupusParam

A list of running parameters to be used in pulling the data. Typically, this is generated from getAupusParameter (see that function for a description of the required elements).

database

Whether to use the new or the old statistical working system.

conn

The RJDBS connection to the old working system. Only required if database = "old".

Value

A list of three items: specific, yearWildCard, and areaYearWildCard. Each of these elements has the same general structure: a data.table with zero to two dimension columns (area and year), the parent and child items, and then the Value_share column (representing the proportion allocated to each child).


SWS-Methodology/faoswsAupus documentation built on May 9, 2019, 11:45 a.m.