load_fu_allocation_data: Load final-to-useful allocation data

View source: R/templates.R

load_fu_allocation_dataR Documentation

Load final-to-useful allocation data

Description

When performing extending an energy conversion chain from useful energy to final energy, allocations of final energy consumption to useful energy categories are defined by the analyst. The Excel file at path contains those allocations.

Usage

load_fu_allocation_data(
  path = sample_fu_allocation_table_path(),
  fu_allocations_tab_name = IEATools::fu_analysis_file_info$fu_allocation_tab_name,
  country = IEATools::iea_cols$country,
  flow_aggregation_point = IEATools::iea_cols$flow_aggregation_point,
  ef_product = IEATools::template_cols$ef_product,
  machine = IEATools::template_cols$machine,
  eu_product = IEATools::template_cols$eu_product,
  destination = IEATools::template_cols$destination,
  non_energy_machine = "Non-energy"
)

Arguments

path

The path from which final-to-useful allocation data will be loaded. Default is the path to allocation data supplied with this package.

fu_allocations_tab_name

See IEATools::fu_analysis_file_info.

country, flow_aggregation_point

See IEATools::iea_cols

ef_product, machine, eu_product, destination

See IEATools::template_cols.

non_energy_machine

The string that identifies a Non-energy machine. Default is "Non-energy".

Details

A final-to-useful allocation template can be generated using fu_allocation_template() and write_fu_allocation_template().

A filled example can be loaded with the default value of path.

Note that any machine named non_energy_machine is required to have identical values for Ef.product and Eu.product. Violations of this requirement cause errors to be thrown.

Value

the fu_allocations_tab_name tab in path as a data frame.

Examples

# Loads final-to-useful allocation data supplied with the package
load_fu_allocation_data()

MatthewHeun/IEATools documentation built on Feb. 6, 2024, 3:29 p.m.