View source: R/extract_erois.R
extract_tidy_industry_erois | R Documentation |
The function extracts industry level EROIs from tidy Input Output matrices, in a tidy format.
extract_tidy_industry_erois(
.tidy_io_mats,
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,
matnames = IEATools::mat_meta_cols$matnames,
matvals = IEATools::mat_meta_cols$matvals,
eroi_g_i = "eroi_g_i",
eroi_n_i = "eroi_n_i",
eroi_g_i_feed = "eroi_g_i_feed",
eroi_n_i_feed = "eroi_n_i_feed",
type = "Type",
boundary = "Boundary",
eroi = "EROI",
industry = "Industry_name",
colnames = "colnames",
rowtypes = "rowtypes",
coltypes = "coltypes"
)
.tidy_io_mats |
The |
country, method, energy_type, last_stage, year |
See |
matnames |
The column name of the column having matrices names.
Default is |
matvals |
The column name of the column reporting matrices values, once expanded.
Default is |
eroi_g_i |
The name of the column containing vectors of industry-level gross EROIs, including both energy use for feedstock and EIOU production. Default is "eroi_g_i". |
eroi_n_i |
The name of the column containing vectors of industry-level net EROIs, including both energy use for feedstock and EIOU production. Default is "eroi_n_i". |
eroi_g_i_feed |
The name of the column containing vectors of industry-level gross EROIs, including only energy use for feedstock production. Default is "eroi_g_i_feed". |
eroi_n_i_feed |
The name of the column containing vectors of industry-level net EROIs, including only energy use for feedstock production. Default is "eroi_g_i_feed". |
type |
The name of the EROI type column (i.e. gross or net EROI). Default is "Type". |
boundary |
The name of the boundary column. Default is "Boundary". |
eroi |
The name of the product EROI column in output. Default is "EROI". |
industry |
The name of the industry column returned in the output data frame. Default is "Industry_name". |
colnames |
The name of columns when expanding matrices. Default is "colnames". |
rowtypes |
The name of row types when expanding matrices. Default is "rowtypes". |
coltypes |
The name of column types when expanding matrices. Default is "coltypes". |
The function can be called after calculating EROIs through the Recca::calc_erois()
function.
The type column indicates whether the calculated EROI is gross or net.
The boundary column indicates whether the EROI includes:
Only energy use for feedstock production ("Feedstock");
Both energy use for feedstock production and for EIOU production ("All").
A data frame reporting calculated EROIs in a tidy format.
# Let's first have a look at the raw data obtained when calculating EROIs:
calculated_erois_raw <- ECCTools::tidy_AB_data %>%
IEATools::prep_psut() %>%
Recca::calc_io_mats() %>%
Recca::calc_E_EIOU() %>%
Recca::calc_erois() %>%
dplyr::glimpse()
# Let's then extract EROIs in a tidy format:
calculated_erois_raw %>%
extract_tidy_industry_erois() %>%
print()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.