Skip to contents

An exemplar table has a column of country names and additional metadata, including the exemplar country and any name changes through time.

Usage

load_exemplar_table(
  exemplar_table_path = sample_exemplar_table_path(),
  countries = NULL,
  years = NULL,
  exemplar_table_tab_name = PFUPipeline::exemplar_names$exemplar_tab_name,
  prev_names = PFUPipeline::exemplar_names$prev_names,
  country = IEATools::iea_cols$country,
  year = IEATools::iea_cols$year
)

Arguments

exemplar_table_path

The path to the Excel file containing an exemplar table. Default is the value of sample_exemplar_table_path().

countries

The countries for which exemplars are desired. If NULL, the default, all countries in the file at exemplar_table_path are returned.

years

The years for which you want the exemplar table, an integer. Default is NULL, meaning that all years from the file at exemplar_table_path are included.

exemplar_table_tab_name, prev_names

See PFUPipeline::exemplar_names.

year, country

See IEATools::iea_cols.

Value

an exemplar table

Details

This function gathers (actually, tidyr::pivot_longer()) years into a Year column.

Examples

load_exemplar_table()
#> # A tibble: 13,176 × 5
#>    Region.code Exemplar.country Country Year  Prev.names
#>    <chr>       <chr>            <chr>   <chr> <chr>     
#>  1 NAMR        USA              ABW     1960  OAMR      
#>  2 NAMR        USA              ABW     1961  OAMR      
#>  3 NAMR        USA              ABW     1962  OAMR      
#>  4 NAMR        USA              ABW     1963  OAMR      
#>  5 NAMR        USA              ABW     1964  OAMR      
#>  6 NAMR        USA              ABW     1965  OAMR      
#>  7 NAMR        USA              ABW     1966  OAMR      
#>  8 NAMR        USA              ABW     1967  OAMR      
#>  9 NAMR        USA              ABW     1968  OAMR      
#> 10 NAMR        USA              ABW     1969  OAMR      
#> # ℹ 13,166 more rows