transform_hep_data()
applies transformations on HEP 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.
Usage
transform_hep_data(
df,
scenario_col = NULL,
value_col = "value",
transform_glue = "transform_{value_col}",
source = "WUENIC/IVB/WHO Technical Programme",
ind_ids = billion_ind_codes("hep", include_calculated = TRUE),
extrapolate_to = 2025,
recycle = FALSE,
...
)
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.
- 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 prefixingtransform_
to the original name.- source
Source to use for prevent data that is flat extrapolated that has more than one unique value.
- 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()
.- extrapolate_to
Year to extrapolate Prevent data to, defaults to 2025
- recycle
Boolean to indicate if data should be recycled
- ...
additional parameters to to pass to
recycle_data
Details
Currently, this function only changes Prevent campaign data by calculating the total sum of campaigns for each year for use in Prevent calculations. For more details on the HEP Billion calculation process and how this function ties in with the rest, see the vignette:
See also
HEP functions
add_hep_populations()
,
calculate_hep_billion()
,
calculate_hep_components()
,
hep_df
,
transform_prev_cmpgn_data()
,
transform_prev_routine_data()