View source: R/transforms_to_gma.R
| calc_bilateral_trade_df_gma | R Documentation | 
The function calculates the bilateral trade data associated to a .tidy_iea_df, using the Global Market Assumption.
calc_bilateral_trade_df_gma(
  .tidy_iea_df,
  year = IEATools::iea_cols$year,
  method = IEATools::iea_cols$method,
  energy_type = IEATools::iea_cols$energy_type,
  last_stage = IEATools::iea_cols$last_stage,
  country = IEATools::iea_cols$country,
  provenience = "Provenience",
  matnames = "matnames",
  Share_Exports_By_Product = "Share_Exports_By_Product"
)
.tidy_iea_df | 
 The   | 
year, method, energy_type, last_stage | 
 See   | 
country | 
 The name of the column in the output data frame that receives the flow,
i.e. the importing country for a given flow.
Default is   | 
provenience | 
 The name of the column in the output data frame that originates the flow, i.e. the exporting country for a given flow. Default is "Provenience".  | 
matnames | 
 The column name for matrices names.
Default is   | 
Share_Exports_By_Product | 
 The name of the column containing the share of exports by country, for each product. Default is "Share_Exports_By_Product".  | 
A column specifying matrix name for each flows needs to be added before, most likely using the IEATools::add_psut_matnames() function.
A data frame that represents the bilateral trade data associated to the input .tidy_iea_df,
using the Global Market Assumption.
tidy_AB_data %>%
IEATools::add_psut_matnames() %>%
calc_bilateral_trade_df_gma() %>%
print()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.