A function to calculate the percentage change on world imports and exports
1 2 | changeflowmessage(dtf0, dtf1, import = "Import", export = "Export",
variable = "quantity")
|
dtf0 |
a data frame of trade flows before the modification |
dtf1 |
a data frame of modified trade flows |
import |
code indicating import data, can be "Import" for Comtrade and 1 for Comext |
export |
code indicating export data, can be "Export" for Comtrade and 2 for Comext Note: Add a function changeflowmessage(dtf, dtfsplit) which will return a character string about both trade flows. This function could be defined in the main scope and reused in other parts of the workflow. Or maybe not because the quantity is not empty for addpartner flow and shaveprice. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.