calculate_finaluseful_ex_data: Create a data frame containing final and useful aggregate...

View source: R/tes_tfc_functions.R

calculate_finaluseful_ex_dataR Documentation

Create a data frame containing final and useful aggregate energy/exergy data

Description

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.

Usage

calculate_finaluseful_ex_data(.sutdata, fd_sectors)

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)
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"))

MatthewHeun/SEAPSUTWorkflow documentation built on April 22, 2022, 2:21 p.m.