calculate_hepi: Calculate HEPI

View source: R/calculate_hep_components.R

calculate_hepiR Documentation

Calculate HEPI

Description

Function to calculate HEPI as the average of DNR, Prepare, and Prevent. Used within calculate_hep_components().

Usage

calculate_hepi(
  df,
  scenario_col,
  source,
  transform_value_col,
  earliest_year,
  ind_ids
)

Arguments

df

Data frame in long format, where 1 row corresponds to a specific country, year, and indicator.

scenario_col

Column name of column with scenario identifiers. Useful for calculating contributions on data in long format rather than wide format.

source

Source to use if no unique source available for the calculation.

transform_value_col

Column name of column(s) with transformed indicator values, used to calculate contributions.

earliest_year

Earliest year for HEPI calculation.

ind_ids

Named vector of indicator codes for input indicators to the Billion. Although separate indicator codes can be used than the standard, they must be supplied as a named vector where the names correspond to the output of billion_ind_codes().


gpw13/billionaiRe documentation built on Sept. 27, 2024, 10:05 p.m.