Skip to contents

Gets the annual average rate of change (AARC or AROC) between the baseline year and the target year to reach the target value for every combination of iso3 and ind present in df.

Usage

get_target_aarc(
  df,
  target_value,
  baseline_year,
  target_year,
  value_col = "value"
)

Arguments

df

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

target_value

value to be reached. Used when aroc_type is target. Should be expressed as a percentage point and not a fraction of 100 (e.g. 6% increase = 6, and not 0.06).

baseline_year

Year from which the scenario is measured. Defaults to start_year

target_year

Year by which the scenario should eventually be achieved. Defaults to end_year

value_col

Column name of column with indicator values.

Value

dataframe with AROC (in aroc column) for every combination of iso3 and ind