% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calculate_contribution_sums.R
\name{calculate_contribution_sums}
\alias{calculate_contribution_sums}
\title{Calculate global/regional billions contributions}
\usage{
calculate_contribution_sums(
  df,
  billion = c("uhc", "hpop", "hep"),
  sum_years,
  sum_type = c("global", "regional"),
  source = sprintf("WHO DDI calculation, \%s", format(Sys.Date(), "\%B \%Y")),
  scenario_col = NULL,
  contribution_col = "contribution"
)
}
\arguments{
\item{df}{A data frame}

\item{billion}{One of uhc, hpop, and hep. The billion for which we want to find
global sums.}

\item{sum_years}{The year(s) for which we want to sum the billions contributions.}

\item{sum_type}{Allows you to select between global and regional sums.}

\item{source}{The source for the calculated billions. \verb{WHO DDI calculations},
with \verb{month, year} timestamp by default.}

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

\item{contribution_col}{Column name of column(s) to store contribution (population) values.}
}
\value{
A data frame with the global sums for the relevant billion. Does not
include rows from the original data frame.
}
\description{
Calculates global or regional sums for billions contributions for the UHC, HPOP, and HEP billions.
}
\details{
full_data is expected to have the values of the billions calculations per
country already computed.
In this example, we're calculating the global contributions for the HPOP
billion for 2025.
}
\concept{aggregation}
