View source: R/transform_helpers.R
calc_total_consumption_by_product | R Documentation |
The function calculates total consumption by product, for each country and year.
calc_total_consumption_by_product(
.tidy_iea_df,
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,
matnames = "matnames",
Y_matrix = "Y",
U_feed_matrix = "U_feed",
U_EIOU_matrix = "U_EIOU",
balancing_matrix = "B",
Total_Consumption_By_Product = "Total_Consumption_By_Product"
)
.tidy_iea_df |
The |
flow, country, method, energy_type, last_stage, year, product, unit, e_dot |
See |
exports |
The name of exports flows in the input data.
Default is |
matnames |
The column name for matrices names.
Default is |
Y_matrix |
The name of the final demand 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". |
Total_Consumption_By_Product |
The name of the new column reporting total consumption by product. |
Flows included in the calculation of the total consumption by product are flows belonging to either the Y, U_feed, or U_eiou matrices. Flows belonging to the Y matrix but representing exports, are excluded. In addition, flows belonging to the Balancing matrix and akin to a final demand (i.e. E.dot > 0) are also included, provided they do not represent exports.
A data frame with total consumption by product, for each country and year.
tidy_AB_data %>%
IEATools::add_psut_matnames() %>%
calc_total_consumption_by_product() %>%
print()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.