Write and style ASC box in UHC summary data
Source:R/write_dataframes_uhc_summary.R
write_asc_uhc_data_summary.Rd
write_asc_uhc_data_summary
writes and styles the ASC box in UHC summary worksheet.
Used in write_uhc_summary_sheet()
.
Usage
write_asc_uhc_data_summary(
df,
pillar,
wb,
sheet_name,
value_col,
transform_value_col,
boxes_bounds,
start_year,
end_year,
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.
- pillar
character Pillar identifying the pillar to style. Must be one of
RMNCH
infectious
NCD
service
- wb
a
openxlsx
workbook to be edited.- sheet_name
character name of the sheet to update
- 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.
- boxes_bounds
named list of bounds for data frame boxes to be written in sheet.
- start_year
Base year for contribution calculation, defaults to 2018.
- end_year
End year(s) for contribution calculation, defaults to 2019 to 2025.
- 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()
.