Skip to contents

The IEA extended energy balances contain several aggregation regions by default. In some situations, it may be desirable to remove those aggregation regions. This function performs that task.

Usage

remove_agg_regions(
  .iea_df,
  country = IEATools::iea_cols$country,
  agg_regions = IEATools::aggregation_regions
)

Arguments

.iea_df

The IEA data frame from which you want to remove aggregation regions.

country

The name of the Country column in .iea_df. Default is IEATools::iea_cols$country.

agg_regions

A list of aggregation regions in the country column of .iea_df. Default is IEATools::aggregation_regions.

Value

A version of .iea_df with aggregation regions removed.

Examples

tibble::tibble(Year = c(1967, 1995), 
               Country = c("World", "Spain")) %>%
 remove_agg_regions()
#> # A tibble: 1 × 2
#>    Year Country
#>   <dbl> <chr>  
#> 1  1995 Spain