Skip to contents

This function compares the muscle work and IEA data frames on the country, year, method, energy_type, and last_stage columns and keeps only those rows in .psut_mw that match .psut_iea.

Usage

filter_mw_to_iea_years(
  .psut_mw,
  .psut_iea,
  countries,
  country = IEATools::iea_cols$country,
  year = IEATools::iea_cols$year,
  method = IEATools::iea_cols$method,
  energy_type = IEATools::iea_cols$energy_type,
  last_stage = IEATools::iea_cols$last_stage
)

Arguments

.psut_mw

The incoming muscle work data frame to be filtered.

.psut_iea

The incoming IEA data frame from which years are obtained.

countries

The countries for which the filtering should be done.

country, year, method, energy_type, last_stage

The columns in .psut_mw and .iea_mw to be used for filtering.

Value

A version of .psut_mw that contains only those countries, years, methods, energy types, and last stages also contained in .psut_iea.