Skip to contents

Ghana's Primary solid biofuels data show a very large and dramatic decline from 1999 to 2000. This decline is due to new survey data being used for the 2000 data. When we look at the PSB data on a per-capita basis, it is clear that a near-constant PSB/capita value was used to extrapolate per-capita usage in the late 1990s. When new survey data became available for the 2000 reporting year, the per-capita consumption of PSB obviously changed. Our approach to this problem is to smooth out the really big peak in PSB consumption by reducing the per-capita consumption of PSB, starting in 1991.

Usage

fix_GHA_psb(
  .tidy_iea_df,
  country = IEATools::iea_cols$country,
  year = IEATools::iea_cols$year,
  e_dot = IEATools::iea_cols$e_dot
)

Arguments

.tidy_iea_df

a tidy IEA data frame produced by load_tidy_iea_df()

country, year, e_dot

See IEATools::iea_cols.

Value

.tidy_iea_df with smoothed Ghana Primary solid biofuels data

Details

If .tidy_iea_df does not contain data from Ghana for the years in question, no fixing is performed, and .tidy_iea_df is returned unmodified.

See the Supplemental information to M. K. Heun and P. E. Brockway. Meeting 2030 primary energy and economic growth goals: Mission impossible? Applied Energy, 251(112697):1–24, May 2019 for additional details.

Also see the file named "GHA-PSB.xlsx" for the actual calculations.

Examples

library(dplyr)
# Build an example tidy IEA data frame in which Ghana's Primary solid biofuels can be fixed.
example_tidy_iea_df <- load_tidy_iea_df() %>% 
  filter(Country == "GHA") %>% 
  filter(Product == "Primary solid biofuels") %>% 
  # The example data frame has PSB for Ghana for 1971 and 2000.  
  # Let's pretend that 1971 is 1991 and 2000 is 1992.
  mutate(
    Year := dplyr::case_when(
      Year == 1971 ~ 1991,
      Year == 2000 ~ 1992
    )
  ) 
example_tidy_iea_df
#> # A tibble: 10 × 11
#>    Country Method Energy.type Last.stage  Year Ledger.side
#>    <chr>   <chr>  <chr>       <chr>      <dbl> <chr>      
#>  1 GHA     PCM    E           Final       1991 Supply     
#>  2 GHA     PCM    E           Final       1992 Supply     
#>  3 GHA     PCM    E           Final       1991 Supply     
#>  4 GHA     PCM    E           Final       1992 Supply     
#>  5 GHA     PCM    E           Final       1991 Consumption
#>  6 GHA     PCM    E           Final       1992 Consumption
#>  7 GHA     PCM    E           Final       1991 Consumption
#>  8 GHA     PCM    E           Final       1992 Consumption
#>  9 GHA     PCM    E           Final       1992 Consumption
#> 10 GHA     PCM    E           Final       1992 Consumption
#> # ℹ 5 more variables: Flow.aggregation.point <chr>, Flow <chr>, Product <chr>,
#> #   Unit <chr>, E.dot <dbl>
fixed <- example_tidy_iea_df %>% 
  fix_GHA_psb()
# Compare production of Primary solid biofuels in 1991
example_tidy_iea_df %>% 
  filter(Year == 1991, Flow == "Production") %>% 
  select("E.dot", "Unit")
#> # A tibble: 1 × 2
#>    E.dot Unit 
#>    <dbl> <chr>
#> 1 87400. TJ   
fixed %>% 
  filter(Year == 1991, Flow == "Production") %>% 
  select("E.dot", "Unit")
#> # A tibble: 1 × 2
#>     E.dot Unit 
#>     <dbl> <chr>
#> 1 168519. TJ