stix-global / eutradeflows

A validation algorithm for forest products trade data from Comext
Other
1 stars 2 forks source link

Add symbol for intra eu trade partner in the country code table #7

Open paulrougieux opened 4 years ago

paulrougieux commented 4 years ago

Add a boolean column called eu containing true if the partner is an EU country and False otherwise

paulrougieux commented 4 years ago

Note the change in table vld_comext_partner structure above above leads to the following error

Error in cleancode(RMariaDBcon, "raw_comext_reporter", "vld_comext_reporter",  : 
  outputfields %in% inputfields are not all TRUE
In addition: Warning message:
 Error in cleancode(RMariaDBcon, "raw_comext_reporter", "vld_comext_reporter",  : 
  outputfields %in% inputfields are not all TRUE 
4.
stop(simpleError(msg, call = if (p <- sys.parent(1L)) sys.call(p))) 
3.
stopifnot(outputfields %in% inputfields) at prorepparcodes.R#40
2.
cleancode(RMariaDBcon, "raw_comext_reporter", "vld_comext_reporter", 
    reportercode) at prorepparcodes.R#165
1.
cleanallcomextcodes(con) 

outputfields %in% inputfields are not all TRUE needs to be fixed by changing the assertion. Input field should probably be left un-touched. So it means adding eu to the input fields in the particular case of the vld_comext_partnertable.