Description Usage Arguments Value
View source: R/write_hep_summary_sheet.R
write_hep_summary_sheet()
writes all the content and styling for the HEP
summary sheet. Used within export_hep_country_summary_xls()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | write_hep_summary_sheet(
df,
wb,
sheet_name,
iso,
start_year = 2018,
end_year = 2019:2025,
value = "value",
transform_value = "transform_value",
year = "year",
iso3 = "iso3",
ind = "ind",
scenario = "scenario",
population = "population",
type_col = "type",
source_col = "source",
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 |
Column name of column with indicator values. |
transform_value |
Column name of column(s) with transformed indicator values, used to calculate contributions. |
year |
Column name of column with years. |
iso3 |
Column name of column with country ISO3 codes. |
ind |
Column name of column with indicator names. |
scenario |
Column name of column with scenario identifiers. Useful for calculating contributions on data in long format rather than wide format. |
population |
Column name of column with population figures. |
type_col |
Column name of column with type data. |
source_col |
Column name of column to store source information. |
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.