View source: R/assert_data_calculations.R
assert_data_calculation_uhc | R Documentation |
assert_data_calculation_uhc
asserts that the minimum data required to run UHC calculations is
present.
assert_data_calculation_uhc(
df,
value_col = "value",
scenario_col = NULL,
start_year = 2018,
end_year = 2025,
ind_ids = billion_ind_codes("uhc")
)
df |
Data frame in long format, where 1 row corresponds to a specific country, year, and indicator. |
value_col |
Column name of column with indicator values. |
scenario_col |
Column name of column with scenario identifiers. Useful for calculating contributions on data in long format rather than wide format. |
start_year |
Base year for contribution calculation, defaults to 2018. |
end_year |
End year(s) for contribution calculation, defaults to 2019 to 2025. |
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
|
The function returns warnings
if start_year
and end_year
are not present in year
column
in the data frame. Not having those values will significantly impact the
billion calculations as hpop_healthier
will return 0.
Warnings are also returned if some country (and scenario if provided) have only NAs.
Data frame in long format.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.