Provides a dataframe which contains all CN8 product codes and their history in the demanded time period, as well as harmonized CN8plus code, harmonized HS6plus code and BEC classification.
harmonize_cn8(b, e, historymatrix, harmonize.to = "e",
HS6breaks = c(1992, 1996, 2002, 2007, 2012, 2017),
progress = TRUE)
A data frame that contains all CN8 product codes and their history, harmonized CN8plus codes, harmonized HS6plus codes, and BEC classification. The 'plus-codes' are the main outcome of the function. They provide harmonized information of the product codes, i.e. comparable codes. Every harmonization refers to the last year of interest. The following table offers an overview of all provided variables.
Variable | Explanation |
CN8_xxxx | character; a specific CN8 code in a given year |
CN8plus | character; the harmonization code for CN8, which refers to the last/first year of the time period |
HS6plus | character; the harmonization code of HS6, which refers to the last/first year of the time period |
BEC | character; provides the BEC classification at a high aggregation level (1 digit) |
BEC_agr | character; provides the BEC classification at a lower aggregation level (up to 3 digits) |
SNA | character; provides information if the code is classified as consumption, capital or intermediate good in SNA |
flag | numeric; integer from 0 to 3; 1 indicates that this code remained the same in notation over the whole time period but was split or merged in addition; 2 indicates that this code is either new or was dropped during the period of interest; 3 indicates the code had at least one simple change, but is not associated with a family |
flagyear | numeric; indicates the first year in which the flag was set |
first year of interest
last year of interest
History matrix of CN8 product codes. Provided by history_matrix_cn8(). By default NULL; the function computes the needed harmonized data.
Defines which year for harmonization is used. It may take the following values:
"e", harmonizes product codes towards year e
"b", harmonizes product codes towards year b
Vector of years, where HS6 codes were changed. Do not edit, unless additional break is needed.
logical, determines whether progress is printed in console or not.
# \donttest{
myharmonization <- harmonize_cn8(b = 2008, e = 2010)
mydata <- history_matrix_cn8(b = 2016, e = 2018)
myharmonization <- harmonize_cn8(b = 2016, e = 2018,
historymatrix = mydata)
# }
Run the code above in your browser using DataLab