write_uhc_summary_sheet()
writes all the content and styling for the UHC
summary sheet. Used within export_uhc_country_summary_xls()
Usage
write_uhc_summary_sheet(
df,
wb,
sheet_name,
iso,
start_year = 2018,
end_year = 2019:2025,
value_col = "value",
transform_value_col = "transform_value",
ind_df,
ind_ids
)
Arguments
- df
Data frame in long format filtered for a specific country, where 1 row corresponds to a specific year, and indicator.
- wb
a
openxlsx
workbook to be edited.- sheet_name
character name of the sheet to update
- iso
ISO3 code of country to summarize.
- start_year
Base year for contribution calculation, defaults to 2018.
- end_year
End year(s) for contribution calculation, defaults to 2019 to 2025.
- value_col
Column name of column with indicator values.
- transform_value_col
Column name of column(s) with transformed indicator values, used to calculate contributions.
- ind_df
data frame containing the indicators in the correct order and format to be used.
- 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()
.