Skip to contents

write_data_boxes_hep_summary writes and styles the data box in UHC summary worksheet. Used in write_hep_summary_sheet().

Usage

write_data_boxes_hep_summary(
  df,
  pillar = c("prepare", "prevent", "detect_respond"),
  wb,
  sheet_name,
  value_col,
  transform_value_col,
  boxes_bounds,
  start_year,
  end_year,
  scenario_col,
  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.

scenario_col

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

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().

Value

openxslx Workbook object. Output file is in output_folder.