View source: R/idE_eroi_helpers.R
calc_share_elec_supply_by_ff_group | R Documentation |
This function calculates, for each country, the share of electricity that has been supplied by each fossil fuel group, out of the domestically produced electricity. So, shares don't have to add up to unity - indeed they won't if any electricity is supplied by renewables or nuclear.
calc_share_elec_supply_by_ff_group(
.tidy_iea_df,
list_supply_mats = c(IEATools::psut_cols$V),
list_oil_products = IEATools::oil_and_oil_products,
list_coal_products = IEATools::coal_and_coal_products,
list_gas_products = IEATools::primary_gas_products,
exports = IEATools::interface_industries$exports,
losses = IEATools::tfc_compare_flows$losses,
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",
share = "Share",
product_without_origin = "product_without_origin"
)
.tidy_iea_df |
The |
list_supply_mats |
The list of the supply matrices to be used for the calculating the shares.
Default is |
list_oil_products |
The list of oil products to be used when calculating the use shares.
Default is |
list_coal_products |
The list of coal products to be used when calculating the use shares.
Default is |
list_gas_products |
The list of gas products to be used when calculating the use shares.
Default is |
exports |
The character string identifying exports flows in the |
losses |
The character string identifying losses flows in the |
country, method, energy_type, last_stage, year, product, unit, flow, e_dot |
See |
matnames |
The name of the column containing the matrices names.
Default is |
product.group |
The name of the column containing the product group name. Default is "Product.Group". |
energy.stage |
The name of the column containing the energy stage. Default is "Energy.stage". |
share |
The name of the column containing the shares of heat delivered by each fossil fuel group. |
product_without_origin |
The name of the column containing the product name without the product origin. Default is "product_without_origin" |
Fossil fuel groups used are "All fossil fuels", "Oil and gas products", "Oil products", "Natural gas", and "Coal products", so they are obviously not exclusive. The function can work both on a single country Energy Conversion Chain of Domestic Technology Assumption type, or with a multi-regional Energy Conversion Chain for instance using the Global Market Assumption. The input data frame will have to be slightly adapted in this case (for an example see the tests related to the function)
A tidy data frame containing the shares of heat delivered by each fossil fuel group.
ECCTools::tidy_AB_data %>%
IEATools::add_psut_matnames() %>%
ECCTools::transform_to_dta() %>%
calc_share_elec_supply_by_ff_group()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.