transform_uhc_data: Transform Raw Indicator Values for UHC Billion

View source: R/transform_uhc.R

transform_uhc_dataR Documentation

Transform Raw Indicator Values for UHC Billion

Description

transform_uhc_data() applies transformations on UHC Billion indicators so that transformed indicator values can be used within Billions calculations. Details on the specific transformations applied can be found within the Billions methods report. Values in the transform column, if it already exists, are replaced for UHC indicators that have data in the value column, otherwise the column keeps its original data.

Usage

transform_uhc_data(
  df,
  value_col = "value",
  transform_glue = "transform_{value_col}",
  ind_ids = billion_ind_codes("uhc"),
  recycle = FALSE,
  ...
)

Arguments

df

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

value_col

Column name of column with indicator values.

transform_glue

Glue expression to be passed to glue::glue(). Defaults to 'transform_{value_col}' which will create new column names by prefixing transform_ to the original name.

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().

recycle

Boolean to indicate if data should be recycled

...

additional parameters to to pass to recycle_data

Details

For more details on the UHC Billion calculation process and how this function ties in with the rest, see the vignette:

vignette("uhc", package = "billionaiRe")

Value

Data frame in long format.

See Also

Other uhc: calculate_uhc_billion(), calculate_uhc_contribution(), transform_uhc_single(), uhc_df, untransform_uhc_data(), untransform_uhc_single()


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