primary_aggregates | R Documentation |
Calculates total aggregate primary energy from a data frame of IEA data.
This function works similar to dplyr::summarise()
:
it distills .ieadata
to many fewer rows
according to the grouping variables
country
, method
, energy_type
, last_stage
, and year
,
and, possibly, additional grouping variables in the input (.ieadata
).
.ieadata
is grouped by those variables internally.
Any grouping variables present in .ieadata
are retained
for calculating primary aggregate energy.
Grouping is removed before output.
primary_aggregates(
.ieadata,
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,
flow_aggregation_point = IEATools::iea_cols$flow_aggregation_point,
e_dot = IEATools::iea_cols$e_dot,
total_primary_energy_supply = IEATools::aggregation_flows$total_primary_energy_supply,
ex_p = IEATools::aggregate_cols$aggregate_primary
)
.ieadata |
The data frame containing IEA data. |
country , method , energy_type , last_stage , year , flow_aggregation_point , e_dot |
See |
total_primary_energy_supply |
See |
ex_p |
See |
A data frame containing the country
, method
, energy_type
, last_stage
, and year
columns of .ieadata
and a column named with the value of ex_p
.
load_tidy_iea_df() %>%
primary_aggregates()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.