% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calculate_uhc_contribution.R
\name{calculate_uhc_contribution}
\alias{calculate_uhc_contribution}
\title{Calculate UHC contribution}
\usage{
calculate_uhc_contribution(
  df,
  value_col = "value",
  start_year = 2018,
  end_year = 2019:2025,
  pop_year = 2025,
  transform_value_col = "transform_value",
  contribution_col = stringr::str_replace(transform_value_col, "transform_value",
    "contribution"),
  contribution_pct_col = paste0(contribution_col, "_percent"),
  scenario_col = NULL,
  scenario_reported_estimated = "routine",
  scenario_covid_shock = "covid_shock",
  scenario_reference_infilling = "reference_infilling",
  ind_ids = billion_ind_codes("uhc", include_calculated = TRUE, include_subindicators =
    TRUE),
  default_scenario = "default"
)
}
\arguments{
\item{df}{Data frame in long format, where 1 row corresponds to a specific
country, year, and indicator.}

\item{value_col}{Column name of column with indicator values.}

\item{start_year}{Base year for contribution calculation, defaults to 2018.}

\item{end_year}{End year(s) for contribution calculation, defaults to 2019 to 2025.}

\item{pop_year}{Year used to pull in HPOP populations, defaults to 2025.}

\item{transform_value_col}{Column name of column(s) with transformed indicator values,
used to calculate contributions.}

\item{contribution_col}{Column name of column(s) to store contribution (population)
values. Must be the same length as \code{transform_value_col}.}

\item{contribution_pct_col}{Column name of column(s) to store contribution (percent)
values. Must be the same length as \code{transform_value_col}.}

\item{scenario_col}{Column name of column with scenario identifiers. Useful for
calculating contributions on data in long format rather than wide format.}

\item{scenario_reported_estimated}{name of the reported/estimated scenario.}

\item{scenario_covid_shock}{name of the scenario with the COVID-19 shock years.}

\item{scenario_reference_infilling}{name of the WHO technical programs projections/imputations scenario.}

\item{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
\code{billion_ind_codes()}.}

\item{default_scenario}{name of the default scenario.}
}
\value{
Data frame in long format.
}
\description{
\code{calculate_uhc_contribution()} calculates country-level UHC contributions, in
total population and percents, based on indicator level data. Calculates it
for each country-year combination in the provided data, and for specific
scenarios if specified.
}
\details{
For more details on the UHC Billion calculation process and how this function
ties in with the rest, see the vignette:

\href{../doc/uhc.html}{\code{vignette("uhc", package = "billionaiRe")}}
}
\seealso{
Other uhc: 
\code{\link{calculate_uhc_billion}()},
\code{\link{transform_uhc_data}()},
\code{\link{transform_uhc_single}()},
\code{\link{uhc_df}},
\code{\link{untransform_uhc_data}()},
\code{\link{untransform_uhc_single}()}
}
\concept{uhc}
