View source: R/transforms_to_gma.R
specify_MR_Y_U_gma | R Documentation |
This function specifies flows belonging to the Y, U_feed, U_eiou, and B (only for those flows akin to final demand) matrices, according to the Global Market Assumption. See details for more explanations.
specify_MR_Y_U_gma(
.tidy_iea_df,
flow = IEATools::iea_cols$flow,
product = IEATools::iea_cols$product,
year = IEATools::iea_cols$year,
method = IEATools::iea_cols$method,
energy_type = IEATools::iea_cols$energy_type,
last_stage = IEATools::iea_cols$last_stage,
e_dot = IEATools::iea_cols$e_dot,
unit = IEATools::iea_cols$unit,
country = IEATools::iea_cols$country,
aggregate_country_name = "World",
origin = "Origin",
domestic = "Domestic",
imported = "Imported",
provenience = "Provenience",
Share_Exports_By_Product = "Share_Exports_By_Product",
Share_Global_Production_By_Product = "Share_Global_Production_By_Product",
Producing_Country = "Producing_Country"
)
.tidy_iea_df |
The |
flow, product, method, year, energy_type, last_stage, e_dot, unit, country |
See |
aggregate_country_name |
The name of the new aggregate region for which the Multi-Regional tables are created. Default is "World". |
origin |
The name of the temporary column specifying whether a given flow is of domestic or imported origin. Default is "Origin. |
domestic |
The string that indicates that the product is of domestic origin in the new origin column. Default is "Domestic". |
imported |
The string that indicates that the product is of imported origin in the new origin column. Default is "Imported". |
provenience |
The name of a temporary column that provides the provenience of each imported flow, according to the Global Market Assumption. Default is "Provenience". |
Share_Exports_By_Product |
The name of the temporary column containing the share of exports for each product, by country. Default is "Share_Exports_By_Product". |
Share_Global_Production_By_Product |
The name of the temporary column containing the share of global production for each product, by country. Default is "Share_Global_Production_By_Product". |
Producing_Country |
The name of the temporary column containing the country of origin of a given flow, i.e. the exporting country. Default is "Producing_Country". |
First, each flow is separated into a flow of domestic product and imported product, using the specify_imported_products()
function.
Then, the calc_share_exports_by_product()
function is used to calculate the share of global exports, for each product, by country.
These shares is used to specify the importations of each country, for each product, hence the assumption of a global market.
Only flows belonging to the Y, U_feed, U_eiou, and B matrices are returned.
Note that matrices names need to be added first, most likely using the IEATools::add_psut_matnames()
function.
A .tidy_iea_df
with flows corresponding to the Y, U_feed, U_eiou, and B matrices are specified.
tidy_AB_data %>%
IEATools::add_psut_matnames() %>%
specify_MR_Y_U_gma() %>%
print()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.