View source: R/data_functions.R
make_balanced | R Documentation |
Balances the IEA data in a way that is amenable to drake subtargets.
Internally, this function uses IEATools::fix_tidy_iea_df_balances()
.
Grouping is done internal to this function using the value of grp_vars
.
make_balanced( IEAData, countries, country = IEATools::iea_cols$country, grp_vars = c(country, IEATools::iea_cols$method, IEATools::iea_cols$energy_type, IEATools::iea_cols$last_stage, IEATools::iea_cols$year, IEATools::iea_cols$product) )
IEAData |
A tidy IEA data frame |
countries |
The countries that should be balanced |
country |
See |
grp_vars |
the groups that should be checked. Default is
|
balanced IEA data
IEATools::sample_iea_data_path() %>% IEATools::load_tidy_iea_df() %>% make_balanced(countries = c("GHA", "ZAF")) %>% is_balanced(countries = c("GHA", "ZAF"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.