View source: R/transforms_to_gma.R
specify_imported_products | R Documentation |
This function specifies imported and domestic products in the Y, U_EIOU, U_feed, and Balancing matrices. For instance, a flow of "Gasoline" will be broken down in two flows: one of imported gasoline, and one of domestic gasoline. The origin is specified in a new column. One of the two flows may be absent, in the case of a product that is not imported, or not domestically produced.
specify_imported_products(
.tidy_iea_df,
V_matrix = IEATools::psut_cols$V,
Y_matrix = IEATools::psut_cols$Y,
U_feed_matrix = IEATools::psut_cols$U_feed,
U_EIOU_matrix = IEATools::psut_cols$U_eiou,
balancing_matrix = "B",
matnames = IEATools::mat_meta_cols$matnames,
domestic = "Domestic",
imported = "Imported",
origin = "Origin",
flow = IEATools::iea_cols$flow,
country = IEATools::iea_cols$country,
method = IEATools::iea_cols$method,
energy_type = IEATools::iea_cols$energy_type,
last_stage = IEATools::iea_cols$last_stage,
year = IEATools::iea_cols$year,
product = IEATools::iea_cols$product,
unit = IEATools::iea_cols$unit,
e_dot = IEATools::iea_cols$e_dot,
exports = IEATools::interface_industries$exports,
imports = IEATools::interface_industries$imports,
Share_Imports_By_Product = "Share_Imports_By_Product",
Total_Consumption_By_Product = "Total_Consumption_By_Product"
)
.tidy_iea_df |
The |
V_matrix |
The name of the V matrix.
Default is |
Y_matrix |
The name of the Y matrix.
Default is |
U_feed_matrix |
The name of the U_feed matrix.
Default is |
U_EIOU_matrix |
The name of the U_eiou matrix.
Default is |
balancing_matrix |
The name of the Balancing matrix. Default is "B". |
matnames |
The name of the matrix names column.
Default is |
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". |
origin |
The name of the column that specifies the origin of each product. |
flow, country, method, energy_type, last_stage, year, product, unit, e_dot |
See |
exports |
The name of the Exports flows in the |
imports |
The name of the Imports flows in the |
Share_Imports_By_Product |
The name of the temporary column that contains the share of imports for each product, by country. Default is "Share_Imports_By_Product". |
Total_Consumption_By_Product |
The name of the temporary column that contains total consumption by product? Default is "Total_Consumption_By_Product". |
Only flows belonging to the Y, U_eiou, U_feed, or Balancing 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
that includes only flows belonging to the Y, U_eiou, U_feed, or Balancing matrices,
and for which flows are specified in terms of flows or imported or domestic products.
tidy_AB_data %>%
IEATools::add_psut_matnames() %>%
specify_imported_products() %>%
print()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.