calculate_hep_prevent_ind: Calculate prevent indicators

View source: R/calculate_hep_components.R

calculate_hep_prevent_indR Documentation

Calculate prevent indicators

Description

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.

Usage

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

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.

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 transform_value_col.

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


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