Create a data frame containing final and useful aggregate energy/exergy data
calculate_finaluseful_ex_data.Rd
This functions creates a single data frame containing final and useful
energy/exergy by country, year, method, energy quantification,
and grouping variable (Total, Product, and Sector) using the functions:
calculate_fu_ex_total
, calculate_fu_ex_sector
, calculate_fu_ex_product
and binding the outputs of these functions into a single data frame.
Arguments
- .sutdata
A data frame containing Physical Supply-Use Table (PSUT) matrices with associated final demand sector names
- fd_sectors
A character vector of final demand sectors.
Value
A data frame containing final and useful energy/exergy values aggregated by total, sector and product.
Examples
library(Recca)
#>
#> Attaching package: ‘Recca’
#> The following objects are masked from ‘package:IEATools’:
#>
#> aggregate_cols, energy_types, finaldemand_aggregates,
#> primary_aggregates, psut_cols
finaluseful_data <- Recca::UKEnergy2000mats %>%
tidyr::pivot_wider(names_from = matrix.name,
values_from = matrix) %>%
dplyr::mutate(Method = "PCM") %>%
calculate_finaluseful_ex_data(fd_sectors = c("Residential"))