% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/transform_hep.R
\name{transform_prev_cmpgn_data}
\alias{transform_prev_cmpgn_data}
\title{Transform Prevent campaigns data}
\usage{
transform_prev_cmpgn_data(
  df,
  scenario_col,
  value_col,
  transform_value_col,
  source,
  ind_ids,
  extrapolate_to
)
}
\arguments{
\item{df}{Data frame in long format, where 1 row corresponds to a specific
country, year, and indicator.}

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

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

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

\item{source}{Source to use for prevent data that is flat extrapolated
that has more than one unique value.}

\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{extrapolate_to}{Year to extrapolate Prevent data to, defaults to 2025}
}
\description{
Prevent campaign data uses aggregates across years that a vaccine provides
protection against a specific pathogen. Thus, we want to do some specific
aggregation so that this analysis can be brought into the overall HEP
calculations. This function does just that. For each pathogen, we take the
data out to the latest year observed, or a separate year if provided. Then we
do the rolling sums for them, and ensure that the rows make sense (filtering
out for instance years before there were any pathogens reported for a country).
}
\details{
These transform values are then flat extrapolated from their latest year out to
a specific year, the default being 2023 If latest year values are provided
for a specific pathogen, those years are used for calculating the rolling
average out to, otherwise, the latest year with observed values is used.
}
\seealso{
HEP functions
\code{\link{add_hep_populations}()},
\code{\link{calculate_hep_billion}()},
\code{\link{calculate_hep_components}()},
\code{\link{hep_df}},
\code{\link{transform_hep_data}()},
\code{\link{transform_prev_routine_data}()}

Other transform: 
\code{\link{transform_prev_routine_data}()}
}
\concept{hep}
\concept{transform}
\keyword{internal}
