fu_allocation_template | R Documentation |
This function creates a blank template for final-to-useful energy transformation process analysis.
The template is a data frame derived from IEA extended energy balance data (.tidy_iea_df
),
which gives both energy industry own use and final demand for final energy carriers.
From the IEA's final energy information, templates are created for conversion to
useful energy carriers.
Final energy consumed by each final demand sector or transformation process machine
is allocated to final-to-useful machines and converted to useful energy at some efficiency.
The allocation fractions are to be supplied by the analyst by filling blanks in
the template.
fu_allocation_template(
.tidy_iea_df,
energy_type = IEATools::iea_cols$energy_type,
energy = IEATools::energy_types$e,
last_stage = IEATools::iea_cols$last_stage,
final = IEATools::all_stages$final,
year = IEATools::iea_cols$year,
ledger_side = IEATools::iea_cols$ledger_side,
consumption = IEATools::ledger_sides$consumption,
flow_aggregation_point = IEATools::iea_cols$flow_aggregation_point,
eiou = IEATools::tfc_compare_flows$energy_industry_own_use,
non_energy_use = IEATools::tfc_flows$non_energy_use,
tfc = IEATools::aggregation_flows$total_final_consumption,
tpes = IEATools::tfc_compare_flows$total_primary_energy_supply,
flow = IEATools::iea_cols$flow,
product = IEATools::iea_cols$product,
destination = IEATools::template_cols$destination,
quantity = IEATools::template_cols$quantity,
e_dot = IEATools::iea_cols$e_dot,
e_dot_total = paste0(e_dot, ".total"),
perc_unit_string = "[%]",
e_dot_perc = paste(e_dot, perc_unit_string),
maximum_values = IEATools::template_cols$maximum_values,
year_for_maximum_values = 0,
ef_product = IEATools::template_cols$ef_product,
allocation_var = "C_",
n_allocation_rows = 4,
machine = IEATools::template_cols$machine,
eu_product = IEATools::template_cols$eu_product,
arrange = TRUE,
.value = ".value"
)
.tidy_iea_df |
a tidy data frame containing IEA extended energy balance data |
energy_type |
the name of the energy type column. Default is "EnergyType". |
energy |
the string identifier for energy (as opposed to exergy) in the |
last_stage |
the name of the last stage column. Default is "LastStage". |
final |
the string identifier for final energy (as |
year |
the name of the year column. Default is "Year". |
ledger_side |
the name of the ledger side column. Default is "LedgerSide". |
consumption |
the string identifier for the consumption side of the ledger. Default is "Consumption". |
flow_aggregation_point |
the name of the flow aggregation point column. Default is FlowAggregationPoint. |
eiou |
the string identifier for energy industry own use in |
non_energy_use |
string identifier for non-energy use in |
tfc |
the string identifier for total final consumption. Default is "Total final consumption". |
tpes |
the string identifier for total primary energy supply. Default is "Total primary energy supply". |
flow |
the name of the flow column. Default is "Flow". |
product |
the name of the product column. Default is "Product". |
destination |
the name for the destination column. Default is "Destination". |
quantity |
the name of the quantity column. Default is "Quantity". |
e_dot |
the name of the energy flow rate column. Default is "Edot". |
e_dot_total |
the string identifier for total energy. Default is "Edot.total". |
perc_unit_string |
the string used to indicate percentages. Default is " |
e_dot_perc |
the string identifier for energy percentage. Default is "Edot.perc". |
maximum_values |
the name for the maximum energy values column. Default is "Maximum values". |
year_for_maximum_values |
an integer for the first year (in which maximum values will be stored before renaming the column to |
ef_product |
the name of the final energy carrier column. Default is "Ef product". |
allocation_var |
the string identifier for the allocation percentage column. Default is "C_". |
n_allocation_rows |
an integer stating how many allocation rows are desired. Default is |
machine |
the name of the column of final-to-useful transformation process machines. Default is "Machine". |
eu_product |
the name of the useful energy carrier column. Default is "Eu product". |
arrange |
a boolean telling whether to arranged the rows and columns
(using |
.value |
the name of a temporary value column added to |
Non-energy use is removed from .tidy_iea_df
before creating the template.
a data frame containing the EIOU template
load_tidy_iea_df() %>%
specify_all() %>%
fu_allocation_template()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.