finaldemand_aggregates | R Documentation |
Calculates total aggregate final demand energy from a data frame of IEA data on both net and gross bases.
finaldemand_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,
ledger_side = IEATools::iea_cols$ledger_side,
flow_aggregation_point = IEATools::iea_cols$flow_aggregation_point,
flow = IEATools::iea_cols$flow,
e_dot = IEATools::iea_cols$e_dot,
consumption = IEATools::ledger_sides$consumption,
eiou = IEATools::tfc_compare_flows$energy_industry_own_use,
diff_colname = ".gross_less_net",
net_aggregate_demand = IEATools::aggregate_cols$net_aggregate_demand,
gross_aggregate_demand = IEATools::aggregate_cols$gross_aggregate_demand
)
.ieadata |
A data frame with columns of IEA data. |
country , method , energy_type , last_stage , year , ledger_side , flow_aggregation_point , flow , e_dot |
See |
consumption |
See |
eiou |
See |
diff_colname |
The name of a column containing differences between gross and net final demand. Default is ".gross_less_net". |
net_aggregate_demand , gross_aggregate_demand |
See |
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.
A data frame containing grouping columns of .ieadata
and
two additional columns containing net and gross final demand.
load_tidy_iea_df() %>%
finaldemand_aggregates()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.