Write the contribution to billion per indicator data frame to the data sheet
Source:R/write_dataframes_hpop_summary.R
write_billion_contrib_ind_hpop_summary.Rd
Used within write_hpop_summary_sheet()
Usage
write_billion_contrib_ind_hpop_summary(
df,
wb,
sheet_name,
start_year,
end_year,
contribution_pct,
contribution,
contribution_pct_total_pop,
ind_df,
boxes_bounds,
ind_ids
)
Arguments
- df
data frame to be written
- wb
a
openxlsx
workbook to be edited.- sheet_name
character name of the sheet to update
- start_year
Base year for contribution calculation, defaults to 2018.
- end_year
End year(s) for contribution calculation, defaults to 2019 to 2025.
- contribution_pct
Column name of column(s) to store contribution (percent) values. Must be the same length as
transform_value_col
.- contribution
Column name of column(s) to store contribution (population) values. Must be the same length as
transform_value_col
.- contribution_pct_total_pop
Column name of column(s) to store contribution (percent of total population of the country) values. Must be the same length as
transform_value_col
.- ind_df
data frame containing the indicators in the correct order and format to be used.
- boxes_bounds
named list of bounds for data frame boxes to be written in sheet.
- 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()
.