Tidy a final-to-useful efficiency table
tidy_eta_fu_table.Rd
Analysts fill final-to-useful (FU) efficiency tables in a human-readable format
provided by eta_fu_template()
and write_eta_fu_template()
.
The templates are not tidy.
However, most code uses in IEATools
requires tidy data frames.
This function converts an FU efficiency table with years in columns
to a tidy data frame with years in a year
column and eta_fu
and phi_u
values in a .values
column.
Identifiers for the variables are in the quantity
column.
Usage
tidy_eta_fu_table(
.eta_fu_table,
year = IEATools::iea_cols$year,
unit = IEATools::iea_cols$unit,
e_dot_machine = IEATools::template_cols$e_dot_machine,
e_dot_machine_perc = IEATools::template_cols$e_dot_machine_perc,
quantity = IEATools::template_cols$quantity,
maximum_values = IEATools::template_cols$maximum_values,
.values = IEATools::template_cols$.values
)
Arguments
- .eta_fu_table
The final-to-useful efficiency table to be tidied.
- year, unit
See
IEATools::iea_cols
.- e_dot_machine, e_dot_machine_perc, quantity, maximum_values, .values
Examples
load_eta_fu_data() %>%
tidy_eta_fu_table()
#> # A tibble: 234 × 9
#> Country Method Energy.type Last.stage Machine Eu.product Quantity Year
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <dbl>
#> 1 GHA PCM E Final Automobiles MD eta.fu 1971
#> 2 GHA PCM E Final Automobiles MD eta.fu 2000
#> 3 GHA PCM E Final Automobiles MD phi.u 1971
#> 4 GHA PCM E Final Automobiles MD phi.u 2000
#> 5 GHA PCM E Final Diesel cars MD eta.fu 1971
#> 6 GHA PCM E Final Diesel cars MD eta.fu 2000
#> 7 GHA PCM E Final Diesel cars MD phi.u 1971
#> 8 GHA PCM E Final Diesel cars MD phi.u 2000
#> 9 GHA PCM E Final Diesel trucks MD eta.fu 1971
#> 10 GHA PCM E Final Diesel trucks MD eta.fu 2000
#> # ℹ 224 more rows
#> # ℹ 1 more variable: .values <dbl>