View source: R/calculate_uhc_billion.R
calculate_uhc_billion | R Documentation |
calculate_uhc_billion()
calculates country-level UHC Billion based on
indicator level data. Calculates it for each country-year combination in the provided data.
In order to calculate average service coverage, and thus the overall Billion,
all UHC indicators must be present for a given year. The only exception is
insecticide treated nets, which need not be present.
calculate_uhc_billion(
df,
transform_value_col = "transform_value",
value_col = "value",
scenario_col = NULL,
source = sprintf("WHO DDI calculation, %s", format(Sys.Date(), "%B %Y")),
projected_year = lubridate::year(lubridate::now()),
ind_ids = billion_ind_codes("uhc")
)
df |
Data frame in long format, where 1 row corresponds to a specific country, year, and indicator. |
transform_value_col |
Column name of column(s) with transformed indicator values, used to calculate contributions. |
value_col |
Column name of column with indicator values. |
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 provide for calculated average service coverage and single measure. |
projected_year |
Year that calculated data will be regarded as projected. Years prior reported as estimated. |
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
|
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")
Data frame in long format.
Other uhc:
calculate_uhc_contribution()
,
transform_uhc_data()
,
transform_uhc_single()
,
uhc_df
,
untransform_uhc_data()
,
untransform_uhc_single()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.