Chapter 4 SWS Resources

This section enclose a detailed description of all the auxiliary resources needed by the modules to accomplish their calculation. It includes definition of code lists, used to define the various dimensions of data sets, and data tables.

4.1 Code Lists

Code lists describe the dimensions that compose the different datasets, they are designed by the users to store analytical results from SWS modules. Each dataset have a set of codes and their associated description, thus Codelists are used within different sets for the sake of standardization, visualization and metadata associated to each dimentions.
The code lists that describe Trade Indices Numbers dataset are the following :

  • GeographicAreaM49 : Represent the spatial scale, it is composed by countries territories, , regional aggregates, regional special groups aggregates, global aggregates.

  • measuredElementTrade : Represent the different element calculated by the plugin through the methodology mentioned above.

  • measuredItemCPC : Those items wants to take measure of production. For example, commodities and commodity groups produced by a country;

  • timePointYears : The time unit (year) data is displayed for.

4.2 Data Tables

Datatables are flexible tool made available inside the Statistical Working System to store a wide range of useful information. They indeed provide a strong support to R module to record countries and items groups composition, to map conversion factors and to store different type of data. Variable names (column names) of datatables are more flexible compared to those of datasets, they can accommodate all kind of names and are not strictly constrained by code lists or by the domain in which they are stored. Below a detailed description of all the datatable used in the Value of Production module.

4.2.1 TI - Base Year

  • Datatable : ti_base_year
  • Domain : Trade
  • Usage : Used to define the base year. The plugin will calculate the three-year base period around the specified value.


Field Description
Base Year Base Year of the Trade Indices Numbers Plugin

4.2.2 TI - Country List

  • Datatable : ti_country_list
  • Domain : Trade
  • Usage : Contain the list of countries for which trade indices are calcualted.


Field Description
Country Name Extended name of the Country
M49 Code Area Code M49
Start Year Stasting validity year
End Year Ending validity year


4.2.3 TI - Item List

  • Datatable : ti_item_list
  • Domain : Trade
  • Usage : Used to define the items list for which the trade indices are calculated .


Field Description
Item Name Name of the item
CPC code Corresponding CPC item code


4.2.4 TI - Aggregation Table

  • Datatable : ti_aggregation_table
  • Domain : Trade
  • Usage : Used to define the aggregate composition for regions and items.


Field Description
Variable Type Type of group variable (Area/Item)
Variable Group code FAOSTAT group code
Variable Code Code of single item/country
Variable Element Specific element for which the group composition may change. If not specified it will be consideres as the default composition
Factor Factor for aggregation
Variable Group Name Name of the Group
Variable Name Name of the single item/country


4.2.5 TI - area not FOB/CIF multipliers

  • Datatable : ti_fob_cif_multipliers
  • Domain : Trade
  • Usage : Define Area for which FOB/CIF Multipliers must be applied.


Field Description
Area Code FCL Code, can be omitted
Area Code M49 M49 code
Start Year Starting year of validity period
End Year Ending year of validity period
Multiplier Multiplier to apply


4.2.6 TI - Code conversion table

  • Datatable : ti_code_conversion
  • Domain : Trade
  • Usage : Map correct CPC code specified in TI - Item List, with the wrong one used in SWS.


Field Description
FAOSTAT Code Correct CPC Code used in FAOSTAT
SWS Code CPC Code used in SWS that contain data
Note Describing notes

4.2.7 TI - LOG

  • Datatable : ti_log
  • Domain : Trade
  • Usage : Provide a LOG history of plugin runs.


Field Description
User User email of the user that run the plugin
Execution Date Date of the execution
Base Year Parameter Base year selected
Years Computed Years range of the plugin run
Source input data Source of Input data
Import/Export Filter Parameter Filter selection
Lines writed Data points writed by the plugin
Lines omitted Data points not updated by the plugin
Lines discarded Data points not writed by the plugin
Time Elapsed Total time to complete the Task