View source: R/helpers_supply_use.R
calc_primary_products_supply_by_group | R Documentation |
The function calculates primary energy supply for each primary stage fossil fuel group (coal products, oil and gas products, all fossil fuels). It does not disaggregate the oil and gas products group because they are jointly extracted, so it is not robust to separate them in EROI calculations, at least from the IEA data we use here. By default, it uses flows in the V matrix and selects primary energy products to determine primary energy production flows.
calc_primary_products_supply_by_group(
.tidy_iea_df,
primary_production_mats = c(IEATools::psut_cols$V),
list_primary_oil_products = IEATools::primary_oil_products,
list_primary_coal_products = IEATools::primary_coal_products,
list_primary_gas_products = IEATools::primary_gas_products,
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,
flow = IEATools::iea_cols$flow,
e_dot = IEATools::iea_cols$e_dot,
matnames = IEATools::mat_meta_cols$matnames,
product.group = "Product.Group",
energy.stage = "Energy.stage",
total_group_supply = "Total_Group_Supply",
product_without_origin = "product_without_origin"
)
.tidy_iea_df |
A tidy iea data frame for which the primary energy supply needs to be calculated. |
primary_production_mats |
A list containing the names of matrices containing primary production flows.
Default is |
list_primary_oil_products |
A list containing the names of primary oil products.
Default is |
list_primary_coal_products |
A list containing the names of primary coal products.
Default is |
list_primary_gas_products |
A list containing the names of primary gas products.
Default is |
country, method, energy_type, last_stage, year, product, unit, flow, e_dot |
See |
matnames |
The column name of the column having matrices names.
Default is |
product.group |
The column name of the column defining the fossil fuel group. Default is "Product.Group". |
energy.stage |
The column name of the column defining the energy stage. Default is "Energy.stage". |
total_group_supply |
Column name containing total energy supply by product group. Default is "Total_Group_Supply". |
product_without_origin |
Column name containing the name of the product excluding the country of origin. Helpful for doing calculations with Global Market Assumption. Default is "product_without_origin". |
A tidy data frame returning the total primary energy supply by fossil fuel group.
ECCTools::tidy_AB_data %>%
IEATools::add_psut_matnames() %>%
ECCTools::transform_to_dta() %>%
calc_primary_products_supply_by_group()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.