View source: R/calculate_hep_components.R
calculate_hep_prevent_ind | R Documentation |
This function calculates the overall vaccine coverage scores for each pathogen,
including the overall prevent indicator. It primarily relies on using
purrr::pmap_dfr()
to apply the pathogen_calc()
function for each prevent
component and overall score.
calculate_hep_prevent_ind(
df,
scenario_col = NULL,
transform_value_col = "transform_value",
source = sprintf("WHO DDI, %s", format(Sys.Date(), "%B %Y")),
level_col = stringr::str_replace(transform_value_col, "transform_value", "level"),
ind_ids = billion_ind_codes("hep", include_calculated = TRUE)
)
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. |
transform_value_col |
Column name of column(s) with transformed indicator values, used to calculate contributions. |
source |
Source to use if no unique source available for the calculation. |
level_col |
Column name(s) to create to hold levels data. Should be same length
as |
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.