SWS resources

SWS resources are R modules, data tables, data sets, and code lists comprising a migration framework. Data tables are typically used as auxiliary data to help R modules to achieve their goals. The statistical domains in SWS, through code/reference lists, define the dimensions of the datasets. Therefore, datasets are primarily used to store code list - referenced values as either input and output in the SWS.

Code lists

Code lists, also called reference lists in SWS parlance, are the dimensions making up the data sets that are designed by the user to store analytical results from SWS modules. The dimensions are statistical-domain-specific and are defined by the technical unit to reflect its needs regarding data collection, processing, and dissemination while meeting FAO standards. Each data set dimension has a set of codes and their associated descriptions. Thus, code lists serve to the purpose of standardization, visualization, and metadata by associating standardized codes to standardized names in the SWS data set outputs. A typical SWS compliant data set has, therefore, the following dimensions/reference lists:

  • Geographic area. Representing a spatial scale the information is measured at. For example, countries, territories, regional aggregates, regional special groups aggregates, global aggregates.

  • Items. Those one wants to take a measurement from. For example, commodities, commodity groups, land use types, species, etc. Typical item dimension names are measuredItemCPC, *measuredItemHS, measuredItem.

  • Elements. Often representing a measurement that can be taken across different items. For example, area, production, share. Typical element dimension names are measuredElement, *measuredElementTrade, aquastatElement.

  • Time (the time unit the data is displayed for: year, months, etc). timePointYears represents year.

  • Flag (A standardized label indicating origin and/or nature of a number in the data set, e.g.  (Official number)). Please check the OCS statistical standards and the flags document to understand the flagObservationStatus rational and obtain the description of flags.

Table 4.1: Observation Status Flags Annotations
Field Description
Flag Observation Status The flag of observation status
Flag Description Description of the flag
Type Type of flag (e.g. official, imputed <85> )


- Method (A standardized label indicating method utilized to obtain a number in the data set. Please check the OCS statistical standards and the flags document to understand the flagMethod rational and obtain the description of flags.

Table 4.2: Method flags
Flag Description
dash Unknown collection method
b Balancing item
c Copied from elsewhere in the working system
e Estimate automatically generated by a statistical algorithm (short: statistical estimate)
f Estimate manually derived, also on the basis of expert judgement (short: manual estimate)
h Collected using automatic data harvesting
i Calculated as identity (e.g. yield)
n Value not collected or estimated, but can be assumed to be negligible
p Collected (manually) from publications or databases
q Collected via a questionnaire (e.g. APQ)
s Calculated as sum (e.g. Grand Total, or High-income countries)
t Carry-forward estimate
u Value not known


Datatables

Datatables are mainly used to store information helping R modules to output analytical results. Information in datatables can be of a number of types. For example, conversion factors, arithmetic formulas, mapping between flags, mapping between international classifications, etc. In SWS hierarchy, all datatables reside in a given statistical domain. Variable names (aka column names) in SWS Datatables are more flexible in terms of the names they can take than SWS datasets. One can find SWS Datatables naming variables as element_code, element_code_sws, element_code_faostat, etc. Likewise, columns describing countries across different datatables may have different classification systems. This flexibility in Datatables is beneficial as it allows to accommodate different auxiliary information. In the Quality Indicators framework, the datatables are in the domain Quality Indicators. Below is a list of current available and filled datatables in this domain.

Mapping Datasets QI

  • Datatable: Mapping Datasets QI
  • Domain: Quality Indicators
  • Usage: A data table with the reference data used for each statistical output.
Table 4.3: Columns description of the data table: Mapping Datasets QI
Field Description
Domain SWS The SWS domain which contains the data that goes to dissemination
Dataset SWS The id of the datasets that go to dissemination
Dissemination Platform The dissemination platform
Dataset Code The code used in the dissemination platform to represent that statistical output
Dataset Name The name of the datasets that go to dissemination
Datatable Aggregate Group ID The id of the datatable that contains the areas and items aggregates
Dataset Name QI The name of the dataset in the domain Quality Indicators
Dataset ID QI The id of the dataset in the domain Quality Indicators

Mapping Aggregate Groups - CROPS

  • Datatable: Mapping Aggregate Groups - CROPS
  • Domain: Quality Indicators
  • Usage: A data table with the area and item groups of Crops Production.
Table 4.4: Columns description of the data table: Mapping Aggregate Groups - CROPS
Field Description
Dataset Code Dataset code in the dissemination platform
Dataset Name Dataset name in the dissemination platform
Var Type Type of var: area or item
Var Group Code Var group code in the dissemination platform
Var Code Var code in the dissemination platform
Factor Factor
GroupDomainVar_LevelInt
GroupDomainVar_LevelExt
Var Group Name Var group name in the dissemination platform
Var Name Var name in the dissemination platform
Var Group Code SWS Var group code in the SWS
Var Code SWS Var code in the SWS

Mapping Aggregate Groups - Livestock Production

  • Datatable: Mapping Aggregate Groups - Livestock Production
  • Domain: Quality Indicators
  • Usage: A data table with the area and item groups of Livestock Production.
Table 4.5: Columns description of the data table: Mapping Aggregate Groups - Livestock Production
Field Description
Dataset Code Dataset code in the dissemination platform
Dataset Name Dataset name in the dissemination platform
Var Type Type of var: area or item
Var Group Code Var group code in the dissemination platform
Var Code Var code in the dissemination platform
Factor Factor
GroupDomainVar_LevelInt
GroupDomainVar_LevelExt
Var Group Name Var group name in the dissemination platform
Var Name Var name in the dissemination platform
Var Group Code SWS Var group code in the SWS
Var Code SWS Var code in the SWS

Mapping Aggregate Groups - Trade Crops Livestock

  • Datatable: Mapping Aggregate Groups - Trade Crops Livestock
  • Domain: Quality Indicators
  • Usage: A data table with the area and item groups of Trade Crops Livestock.
Table 4.6: Columns description of the data table: Mapping Aggregate Groups - Trade Crops Livestock
Field Description
Dataset Code Dataset code in the dissemination platform
Dataset Name Dataset name in the dissemination platform
Var Type Type of var: area or item
Var Group Code Var group code in the dissemination platform
Var Code Var code in the dissemination platform
Factor Factor
GroupDomainVar_LevelInt
GroupDomainVar_LevelExt
Var Group Name Var group name in the dissemination platform
Var Name Var name in the dissemination platform
Var Group Code SWS Var group code in the SWS
Var Code SWS Var code in the SWS

Mapping Aggregate Groups - Trade Live Animals

  • Datatable: Mapping Aggregate Groups - Trade Live Animals
  • Domain: Quality Indicators
  • Usage: A data table with the area and item groups of Trade Live Animals.
Table 4.7: Columns description of the data table: Mapping Aggregate Groups - Trade Live Animals
Field Description
Dataset Code Dataset code in the dissemination platform
Dataset Name Dataset name in the dissemination platform
Var Type Type of var: area or item
Var Group Code Var group code in the dissemination platform
Var Code Var code in the dissemination platform
Factor Factor
GroupDomainVar_LevelInt
GroupDomainVar_LevelExt
Var Group Name Var group name in the dissemination platform
Var Name Var name in the dissemination platform
Var Group Code SWS Var group code in the SWS
Var Code SWS Var code in the SWS

Mapping Aggregate Groups - Forestry Production and Trade

  • Datatable: Mapping Aggregate Groups - Forestry Production and Trade
  • Domain: Quality Indicators
  • Usage: A data table with the area and item groups of Forestry Production and Trade.
Table 4.8: Columns description of the data table: Mapping Aggregate Groups - Forestry Production and Trade
Field Description
Dataset Code Dataset code in the dissemination platform
Dataset Name Dataset name in the dissemination platform
Var Type Type of var: area or item
Var Group Code Var group code in the dissemination platform
Var Code Var code in the dissemination platform
Factor Factor
GroupDomainVar_LevelInt
GroupDomainVar_LevelExt
Var Group Name Var group name in the dissemination platform
Var Name Var name in the dissemination platform
Var Group Code SWS Var group code in the SWS
Var Code SWS Var code in the SWS

Mapping Aggregate Groups - Fisheries

  • Datatable: Mapping Aggregate Groups - Fisheries
  • Domain: Quality Indicators
  • Usage: A data table with the area and item groups of Fisheries.
Table 4.9: Columns description of the data table: Mapping Aggregate Groups - Fisheries
Field Description
Domain Name Name of the domain
Var Type Type of var: area or item
Var Group Code Var group code in the dissemination platform
Var Code Var code in the dissemination platform
Var Group Name Var group name in the dissemination platform
Var Name Var name in the dissemination platform

Mapping Aggregate Groups - Fertilizers Nutrient

  • Datatable: Mapping Aggregate Groups - Fertilizers Nutrient
  • Domain: Quality Indicators
  • Usage: A data table with the area and item groups of Fertilizers Nutrient.
Table 4.10: Columns description of the data table: Mapping Aggregate Groups - Fertilizers Nutrient
Field Description
Dataset Code Dataset code in the dissemination platform
Dataset Name Dataset name in the dissemination platform
Var Type Type of var: area or item
Var Group Code Var group code in the dissemination platform
Var Code Var code in the dissemination platform
Factor Factor
GroupDomainVar_LevelInt
GroupDomainVar_LevelExt
Var Group Name Var group name in the dissemination platform
Var Name Var name in the dissemination platform
Var Group Code SWS Var group code in the SWS
Var Code SWS Var code in the SWS

Mapping Aggregate Groups - Pesticides Trade

  • Datatable: Mapping Aggregate Groups - Pesticides Trade
  • Domain: Quality Indicators
  • Usage: A data table with the area and item groups of Pesticides Trade.
Table 4.11: Columns description of the data table: Mapping Aggregate Groups - Pesticides Trade
Field Description
Dataset Code Dataset code in the dissemination platform
Dataset Name Dataset name in the dissemination platform
Var Type Type of var: area or item
Var Group Code Var group code in the dissemination platform
Var Code Var code in the dissemination platform
Factor Factor
GroupDomainVar_LevelInt
GroupDomainVar_LevelExt
Var Group Name Var group name in the dissemination platform
Var Name Var name in the dissemination platform
Var Group Code SWS Var group code in the SWS
Var Code SWS Var code in the SWS

Mapping Aggregate Groups - Pesticides Trade

  • Datatable: Mapping Aggregate Groups - Pesticides Use
  • Domain: Quality Indicators
  • Usage: A data table with the area and item groups of Pesticides Use
Table 4.12: Columns description of the data table: Mapping Aggregate Groups - Pesticides Use
Field Description
Dataset Code Dataset code in the dissemination platform
Dataset Name Dataset name in the dissemination platform
Var Type Type of var: area or item
Var Group Code Var group code in the dissemination platform
Var Code Var code in the dissemination platform
Factor Factor
GroupDomainVar_LevelInt
GroupDomainVar_LevelExt
Var Group Name Var group name in the dissemination platform
Var Name Var name in the dissemination platform
Var Group Code SWS Var group code in the SWS
Var Code SWS Var code in the SWS

Mapping Aggregate Groups - Land Use

  • Datatable: Mapping Aggregate Groups - Land Use
  • Domain: Quality Indicators
  • Usage: A data table with the area and item groups of Land Use
Table 4.13: Columns description of the data table: Mapping Aggregate Groups - Land Use
Field Description
Dataset Code Dataset code in the dissemination platform
Dataset Name Dataset name in the dissemination platform
Var Type Type of var: area or item
Var Group Code Var group code in the dissemination platform
Var Code Var code in the dissemination platform
Factor Factor
GroupDomainVar_LevelInt
GroupDomainVar_LevelExt
Var Group Name Var group name in the dissemination platform
Var Name Var name in the dissemination platform
Var Group Code SWS Var group code in the SWS
Var Code SWS Var code in the SWS

Mapping Aggregate Groups - Prices

  • Datatable: Mapping Aggregate Groups - Prices
  • Domain: Quality Indicators
  • Usage: A data table with the area and item groups of Prices
Table 4.14: Columns description of the data table: Mapping Aggregate Groups - Prices
Field Description
Dataset Code Dataset code in the dissemination platform
Dataset Name Dataset name in the dissemination platform
Var Type Type of var: area or item
Var Group Code Var group code in the dissemination platform
Var Code Var code in the dissemination platform
Factor Factor
GroupDomainVar_LevelInt
GroupDomainVar_LevelExt
Var Group Name Var group name in the dissemination platform
Var Name Var name in the dissemination platform
Var Group Code SWS Var group code in the SWS
Var Code SWS Var code in the SWS

flagObservationStatus - QI

  • Datatable: flagObservationStatus - QI
  • Domain: Quality Indicators
  • Usage: A data table with the flag of observatiob status, its description and type.
Table 4.15: Columns description of the data table: flagObservationStatus - QI
Field Description
Flag Observation Status The flag of observation status
Flag Description Description of the flag
Type Type of flag (e.g. official, imputed <85> )

Dataset Code List QI

  • Datatable: Dataset Code List QI
  • Domain: Quality Indicators
  • Usage: A data table with the list of countries, items and elements by each statistical output.
Table 4.16: Columns description of the data table: Dataset Code List QI
Field Description
Dataset Name of the statistical output
Area Country code M49
Area Name Country Name
Element Element code
Element Name Element description
Item Item code
Item Name Item description
Quality Indicators Quality Indicators code
Quality Indicators Name Quality Indicators name

QI Dimensions

  • Datatable: QI Dimensions
  • Domain: Quality Indicators
  • Usage: A data table with the type of code list for each data set. It is used in the shiny app.
Table 4.17: Columns description of the data table: QI Dimensions
Field Description
Dataset Name Dataset name in the dissemination platform
Dataset Name QI The name of the dataset in the domain Quality Indicators
Dataset ID QI The id of the dataset in the domain Quality Indicators
Area Codelist of area
Element Codelist of element
Item Codelist of item
Year Codelist of item