View source: R/write_hep_summary_sheet.R
write_hep_summary_sheet | R Documentation |
write_hep_summary_sheet()
writes all the content and styling for the HEP
summary sheet. Used within export_hep_country_summary_xls()
write_hep_summary_sheet( df, wb, sheet_name, iso, start_year = 2018, end_year = 2019:2025, value_col = "value", transform_value_col = "transform_value", scenario_col = "scenario", ind_df, ind_ids )
df |
Data frame in long format filtered for a specific country, where 1 row corresponds to a specific year, and indicator. |
wb |
a |
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. |
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
|
openxslx
Workbook object. Output file is in output_folder
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.