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,
  max_year = NULL,
  exemplar_table_tab_name = PFUWorkflow::exemplar_names$exemplar_tab_name,
  prev_names = PFUWorkflow::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.

max_year

The maximum year 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 PFUWorkflow::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. It also

Examples

load_exemplar_table()
#> # A tibble: 9,272 × 6
#>    Aggregation Region.code Exemplar.country Country Year  Prev.names
#>    <chr>       <chr>       <chr>            <chr>   <chr> <chr>     
#>  1 Restofworld EUR         ESP              ALB     1960  ALB       
#>  2 Restofworld EUR         ESP              ALB     1961  ALB       
#>  3 Restofworld EUR         ESP              ALB     1962  ALB       
#>  4 Restofworld EUR         ESP              ALB     1963  ALB       
#>  5 Restofworld EUR         ESP              ALB     1964  ALB       
#>  6 Restofworld EUR         ESP              ALB     1965  ALB       
#>  7 Restofworld EUR         ESP              ALB     1966  ALB       
#>  8 Restofworld EUR         ESP              ALB     1967  ALB       
#>  9 Restofworld EUR         ESP              ALB     1968  ALB       
#> 10 Restofworld EUR         ESP              ALB     1969  ALB       
#> # … with 9,262 more rows