| Title: | Diagnostics for Vaccine Impact Modelling Consortium Burden and Impact Estimates |
|---|---|
| Description: | Run diagnostics on burden estimates submitted by modellers in the Vaccine Impact Modelling Consortium (VIMC) and impact estimates calculated by the VIMC Science & Policy team. |
| Authors: | Pratik Gupte [aut, cre] (ORCID: <https://orcid.org/0000-0001-5294-7819>), Katy Gaythorpe [aut] (ORCID: <https://orcid.org/0000-0003-3734-9081>), Xiang Li [aut] (ORCID: <https://orcid.org/0000-0002-5945-159X>), Zoë Gibney [aut] (ORCID: <https://orcid.org/0009-0002-8114-9984>), Imperial College of Science, Technology and Medicine [cph, fnd] |
| Maintainer: | Pratik Gupte <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.0.5 |
| Built: | 2026-07-21 12:41:41 UTC |
| Source: | https://github.com/vimc/vimcheck |
Run diagnostics on burden estimates submitted by modellers in the Vaccine Impact Modelling Consortium (VIMC) and impact estimates calculated by the VIMC Science & Policy team.
Maintainer: Pratik Gupte [email protected] (ORCID)
Authors:
Other contributors:
Imperial College of Science, Technology and Medicine [copyright holder, funder]
Useful links:
Report bugs at https://github.com/vimc/vimcheck/issues
Helper function for sanity checks on burden estimate values. Checks whether any burden estimates are non-numeric, missing, or negative.
basic_burden_sanity(burden)basic_burden_sanity(burden)
burden |
A |
A character vector of messages generated by checks on burden estimates, with the length of the vector depending on how many checks fail.
Check the modelled disease burden data has similar population sizes as the provided population data.
check_demography_alignment( burden_set, wpp, gender = c("Both", "Male", "Female") )check_demography_alignment( burden_set, wpp, gender = c("Both", "Male", "Female") )
burden_set |
A |
wpp |
Population estimates for the country in |
gender |
The assigned sex for which demography is to be checked. Options
are |
A <tibble> giving the alignment, i.e., percentage difference of
modelled population size from the WPP-derived population estimates.
Compare sub-regional and national estimates
compare_natl_subreg( df, outcome = c("deaths_averted_rate", "dalys_averted_rate"), activity_filter = c("campaign", "routine") )compare_natl_subreg( df, outcome = c("deaths_averted_rate", "dalys_averted_rate"), activity_filter = c("campaign", "routine") )
df |
A data.frame with sub-region level data on vaccination impact outcomes. |
outcome |
A string for the outcome of interest. May be one of
|
activity_filter |
A string for the type of vaccination activity. May be
one of |
A data.frame of sub-regional vaccination impact estimates where the impact is considered to be outside the tolerance limit.
Constant values used in vimcheck. See the Examples section for the constant values.
file_dict_colnames scenario_data_colnames burden_outcome_names colnames_plot_demog_compare colnames_df_missing_cols COLNAMES_KEY_PRESSURE_TEST COLNAMES_INTEREST_PRESSURE_TEST IMPACT_OUTCOMES EXCLUDED_DISEASES N_TS_MIN_CHARS N_TS_YEAR_CHARS MIN_TS_YEAR MAX_TS_YEAR MIN_TS_MONTH MAX_TS_MONTH DEF_TOUCHSTONE_OLD DEF_TOUCHSTONE_NEW DEF_TOUCHSTONE_OLD_OLD COLOUR_VIMC PINEfile_dict_colnames scenario_data_colnames burden_outcome_names colnames_plot_demog_compare colnames_df_missing_cols COLNAMES_KEY_PRESSURE_TEST COLNAMES_INTEREST_PRESSURE_TEST IMPACT_OUTCOMES EXCLUDED_DISEASES N_TS_MIN_CHARS N_TS_YEAR_CHARS MIN_TS_YEAR MAX_TS_YEAR MIN_TS_MONTH MAX_TS_MONTH DEF_TOUCHSTONE_OLD DEF_TOUCHSTONE_NEW DEF_TOUCHSTONE_OLD_OLD COLOUR_VIMC PINE
An object of class character of length 5.
An object of class character of length 4.
An object of class character of length 10.
An object of class character of length 7.
An object of class character of length 5.
An object of class character of length 7.
An object of class character of length 14.
An object of class character of length 2.
An object of class character of length 4.
An object of class integer of length 1.
An object of class integer of length 1.
An object of class numeric of length 1.
An object of class numeric of length 1.
An object of class numeric of length 1.
An object of class numeric of length 1.
An object of class character of length 1.
An object of class character of length 1.
An object of class character of length 1.
An object of class character of length 1.
An object of class character of length 4.
file_dict_colnames scenario_data_colnames burden_outcome_names colnames_plot_demog_compare colnames_df_missing_cols COLNAMES_KEY_PRESSURE_TEST COLNAMES_INTEREST_PRESSURE_TEST IMPACT_OUTCOMES EXCLUDED_DISEASES N_TS_MIN_CHARS N_TS_YEAR_CHARS MIN_TS_YEAR MAX_TS_YEAR MIN_TS_MONTH MAX_TS_MONTH DEF_TOUCHSTONE_OLD DEF_TOUCHSTONE_NEW DEF_TOUCHSTONE_OLD_OLD COLOUR_VIMC PINEfile_dict_colnames scenario_data_colnames burden_outcome_names colnames_plot_demog_compare colnames_df_missing_cols COLNAMES_KEY_PRESSURE_TEST COLNAMES_INTEREST_PRESSURE_TEST IMPACT_OUTCOMES EXCLUDED_DISEASES N_TS_MIN_CHARS N_TS_YEAR_CHARS MIN_TS_YEAR MAX_TS_YEAR MIN_TS_MONTH MAX_TS_MONTH DEF_TOUCHSTONE_OLD DEF_TOUCHSTONE_NEW DEF_TOUCHSTONE_OLD_OLD COLOUR_VIMC PINE
An example of the central burden template provided by VIMC to modelling groups.
eg_burden_templateeg_burden_template
eg_burden_templateA data frame with 10,201 rows and 11 columns:
Disease name
Year
Age
Country name in short format; this is a placeholder name.
Country name in long format; this is a placeholder.
Cases of the disease averted
.
DALYs averted
.
Deaths averted
.
Years of life-loss averted
.
Population size of the country in a year
.
Vaccination scenario.
Prepared by the VIMC secretariat.
Example of scenario coverage data
eg_coverageeg_coverage
eg_coverageA data frame with 11 rows and 19 columns.
Scenario type name.
Scenario type description string.
Scenario name string.
Scenario description string.
Coverage set string.
String for whether GAVI supported the scenario.
String identifier for the source.
Infection identifier.
Vaccine identifier.
Vaccination activity identifier.
Year
Country name in short format; this is a placeholder name.
Age limit lower limit.
Age limit upper limit.
Description of age range.
Target for vaccination.
Proportional coverage.
Sex to which data applies, may be "Male", "Female", or "Both".
Proportional risk value.
Prepared by the VIMC secretariat.
Example data of fully-vaccinated persons (FVPs).
eg_fvpseg_fvps
eg_fvpsA data frame with 11 rows and 24 columns:
Scenario type name.
Scenario type description string.
Scenario name string.
Scenario description string.
Coverage set string.
String for whether GAVI supported the scenario.
String identifier for the source.
Infection identifier.
Vaccine identifier.
Vaccination activity identifier.
Year
Country name in short format; this is a placeholder name.
Age limit lower limit.
Age limit upper limit.
Description of age range.
Target for vaccination.
Proportional coverage.
Sex to which data applies, may be "Male", "Female", or "Both".
Proportional risk value.
Job code as a numeric.
Count of FVPs.
Count of adjusted FVPs.
Adjusted vaccination target.
Ratio of adjusted FVPs to adjusted target.
Prepared by the VIMC secretariat.
Exampled data for fully-vaccinated persons, created manually from arbitrary data.
eg_fvps_2eg_fvps_2
eg_fvps_2A data frame with 4 rows and 7 columns:
Country name as ISO 3 character code.
Year.
Vaccination activity identifier.
Scenario type name.
Vaccine identifier.
Ratio of adjusted FVPs to adjusted target.
Count of fully vaccinated persons.
Example data prepared by the VIMC secretariat.
Example of vaccine impact data taken from data used to test vimpact. This data is primarily used for testing here too.
eg_impacteg_impact
eg_impactA data frame with 5396 rows and 9 columns:
Disease name.
Vaccine identifier.
Modelling group name.
Country ISO 3-character code.
Country name.
Year for which impacts are modelled.
Activity type: either "routine" or "campaign."
Name of the burden outcome; one of "deaths_averted" or "dalys_averted".
Value of the impact
.
Prepared by the VIMC secretariat.
Second example of impact data
eg_impact_2eg_impact_2
eg_impact_2A data frame with 4 rows and 6 columns:
Example country identifier.
Year.
Numeric for the birth year.
Outcome identifier.
Numeric for impact.
Example identifier.
Prepared manually by the VIMC secretariat.
An example of the population estimate data used by VIMC.
eg_wppeg_wpp
eg_wppA data frame with 65,448 rows and 5 columns:
Country name; this is a placeholder name.
Year
Age
Sex given as three categories, "Male", "Female", or "Both"
.
Population size
Derived from data originally prepared by the United Nations as part of the World Population Prospects: https://population.un.org/wpp/.
A pair of helper functions allowing filtering out of recent touchstone values and excluded diseases.
filter_recent_ts(df, threshold = DEF_TOUCHSTONE_NEW) filter_excluded_diseases_ts(df, threshold = DEF_TOUCHSTONE_OLD_OLD) flag_duplicates(df, key_cols = COLNAMES_KEY_PRESSURE_TEST) filter_invalid_trajectories( df, prev_data, outcome = c("deaths_averted", "dalys_averted") )filter_recent_ts(df, threshold = DEF_TOUCHSTONE_NEW) filter_excluded_diseases_ts(df, threshold = DEF_TOUCHSTONE_OLD_OLD) flag_duplicates(df, key_cols = COLNAMES_KEY_PRESSURE_TEST) filter_invalid_trajectories( df, prev_data, outcome = c("deaths_averted", "dalys_averted") )
df |
A |
threshold |
A six-digit number that is checked as a valid touchstone
identifier (YYYYMM format) using |
key_cols |
Key columns in |
prev_data |
A |
outcome |
A string giving the outcome of interest; may be one of
|
A filtered <data.frame>.
filter_recent_ts() returns df with rows where the touchstone condition
is not met excluded.
filter_excluded_diseases_ts() returns df with rows where rows relating
to the EXCLUDED_DISEASES, when the touchstone year in df is less than the
threshold, excluded.
flag_duplicates() returns df with duplicated combinations of
key_cols flagged using the column n_key (or a user-defined name).
filter_invalid_trajectories() returns df with bad outcome trajectories
(NA to non-NA) removed.
Calculates and flags whether the difference in impact estimates
between touchstones is greater than expected. A row is flagged if the
difference is greater than threshold the inter-quartile range
for cases where the IQR is greater than zero.
flag_large_diffs( changes_list, iqr_df, variable = c("deaths_averted", "dalys_averted"), group_cols = c("country", "vaccine", "activity_type"), threshold = 100, touchstone_old = DEF_TOUCHSTONE_OLD_OLD, touchstone_new = DEF_TOUCHSTONE_NEW )flag_large_diffs( changes_list, iqr_df, variable = c("deaths_averted", "dalys_averted"), group_cols = c("country", "vaccine", "activity_type"), threshold = 100, touchstone_old = DEF_TOUCHSTONE_OLD_OLD, touchstone_new = DEF_TOUCHSTONE_NEW )
changes_list |
A list of data.frames with one element per variable of
interest (see |
iqr_df |
A data.frame of inter-quartile differences generated using
|
variable |
A string specifying the variable of interest. Must be one of
"deaths_averted" or "dalys_averted", and must be present as a name and
element of |
group_cols |
A character vector of grouping columns. Defaults to "country", "vaccine", "activity_type". |
threshold |
A single numeric value for the IQR multiplier. Defaults to 100. |
touchstone_old |
The previous touchstone identifier. Defaults to DEF_TOUCHSTONE_OLD_OLD. |
touchstone_new |
The new touchstone identifier. Defaults to DEF_TOUCHSTONE_NEW. |
A filtered data.frame of differences in impact estimates flagged as too large. Rows with differences within tolerance are removed.
Generates a full join of two data.frames, selecting for columns of interest.
gen_combined_df( prev_dat, df_clean, interest_cols = COLNAMES_INTEREST_PRESSURE_TEST, key_cols = COLNAMES_KEY_PRESSURE_TEST )gen_combined_df( prev_dat, df_clean, interest_cols = COLNAMES_INTEREST_PRESSURE_TEST, key_cols = COLNAMES_KEY_PRESSURE_TEST )
prev_dat |
A data.frame of impact estimates corresponding to an earlier touchstone. |
df_clean |
A data.frame of impact estimates corresponding to a more recent touchstone. |
interest_cols |
A character vector of columns of interest. Defaults to COLNAMES_INTEREST_PRESSURE_TEST. |
key_cols |
A character vector of columns of interest. Defaults to COLNAMES_KEY_PRESSURE_TEST. |
A data.frame which is a full join of prev_dat and df_clean.
Columns are disambiguated with the suffixes "_old" and "_new".
Generate IQR for key outcomes
gen_national_iqr( df, group_cols = c("country", "vaccine", "activity_type"), value_cols = c("deaths_averted", "dalys_averted"), prefix = "national_iqr" )gen_national_iqr( df, group_cols = c("country", "vaccine", "activity_type"), value_cols = c("deaths_averted", "dalys_averted"), prefix = "national_iqr" )
df |
A data.frame of impact estimates. |
group_cols |
A character vector of grouping columns. Defaults to "country", "vaccine", "activity_type". |
value_cols |
A character vector of value columns. Defaults to "deaths_averted" and "dalys_averted". |
prefix |
A string for the prefix applied to every IQR summary column. Defaults to "national_iqr". |
A <data.frame> with the inter-quartile range of the columns
in value_cols, with the column name constructed as {prefix}_{value_col}
using string interpolation.
Explore significant changes in deaths and DALYs
generate_diffs( prev_df, curr_df, interest_cols = COLNAMES_INTEREST_PRESSURE_TEST, key_cols = COLNAMES_KEY_PRESSURE_TEST, touchstone = DEF_TOUCHSTONE_OLD )generate_diffs( prev_df, curr_df, interest_cols = COLNAMES_INTEREST_PRESSURE_TEST, key_cols = COLNAMES_KEY_PRESSURE_TEST, touchstone = DEF_TOUCHSTONE_OLD )
prev_df |
A |
curr_df |
A |
interest_cols |
A character vector of columns to check for differences. Defaults to COLNAMES_INTEREST_PRESSURE_TEST. |
key_cols |
A character vector of columns to use when assigning campaign
identifiers. Passed to |
touchstone |
A six character string that can be converted to a six digit
numeric giving a touchstone identifier in |
A list of tibbles of differences between prev_df and curr_df,
with one list element per element of interest_cols.
Plotting functions for burden diagnostics. All functions operate on data prepared for plotting by a corresponding plotting-preparation function.
plot_compare_demography(data, fig_number) plot_age_patterns(burden_age, fig_number) plot_global_burden_decades(burden_decades, fig_number) plot_global_burden(burden_data, outcome_name, fig_number) plot_coverage_set(coverage_set, fig_number) plot_fvp(fvp_data, fig_number)plot_compare_demography(data, fig_number) plot_age_patterns(burden_age, fig_number) plot_global_burden_decades(burden_decades, fig_number) plot_global_burden(burden_data, outcome_name, fig_number) plot_coverage_set(coverage_set, fig_number) plot_fvp(fvp_data, fig_number)
data |
A |
fig_number |
The figure number displayed in the plot title. |
burden_age |
A |
burden_decades |
A |
burden_data |
This is expected to be a |
outcome_name |
A string for an outcome name. Allowed outcome names are given in the package constant constants. |
coverage_set |
A |
fvp_data |
A |
A <ggplot> object that can be printed to screen in the plot frame
or saved to an output device (i.e., saved as an image file).
Generates plots of routine vaccine coverage and fully vaccinated persons (FVPs) over time for selected countries.
plot_coverage_fvps(fvps, country = PINE)plot_coverage_fvps(fvps, country = PINE)
fvps |
A data.frame (or class extending it) showing the number of FVPs (fully vaccinated persons) by country, year and scenario/activity type. |
country |
A character vector of country identifiers, with all
identifiers expected to be found in |
A named list with two ggplot objects:
A plot of routine vaccine coverage over time.
A plot of fully vaccinated persons over time.
If there is no data on routine vaccination in the dataset, the coverage
element of the return will be an empty <ggplot> object, and a warning is
thrown.
fvps <- eg_fvps_2 plots <- plot_coverage_fvps(fvps, "AGO") plots$coverage plots$fvpsfvps <- eg_fvps_2 plots <- plot_coverage_fvps(fvps, "AGO") plots$coverage plots$fvps
Produces faceted plots of central impact estimates for priority countries, stratified either by birth cohort or by year of vaccination. Impact metrics include cases, deaths, DALYs, and YLLs.
plot_impact( data, country = PINE, burden_type = c("cases", "deaths", "dalys", "yll"), view = c("cohort", "year"), title = NULL )plot_impact( data, country = PINE, burden_type = c("cases", "deaths", "dalys", "yll"), view = c("cohort", "year"), title = NULL )
data |
A tibble containing impact estimates. |
country |
The country names as a character vector. Defaults to PINE countries. |
burden_type |
Burden metric used to evaluate impact; may be one of:
|
view |
A string for the way impact is assigned, either by birth cohort ("cohort") or by year of vaccination ("year"). |
title |
Title of the plot to be rendered. Defaults to |
ggplot object showing central impact estimates
impact_data <- eg_impact_2 plot_impact( data = impact_data, "A", burden_type = "cases", title = "Cases averted", view = "year" )impact_data <- eg_impact_2 plot_impact( data = impact_data, "A", burden_type = "cases", title = "Cases averted", view = "year" )
Functions that create impact diagnostics plots (or plotting objects). All functions are associated with one other upstream data processing function, and can be used in a pipe with that function. Where appropriate, outcome selection and label preparation is automated to reduce function arguments.
Plotting functions for impact diagnostics. See
plotting-preparation functions for a set of
helper functions that prepare impact diagnostics for plotting. See the
details of the data argument for functions that help to prepare the data.
plot_sig_diff(data, outcome = IMPACT_OUTCOMES) plot_diff( data, outcome = IMPACT_OUTCOMES, group_vars = IMPACT_GROUP_VARS, touchstone_old = DEF_TOUCHSTONE_OLD, touchstone_new = DEF_TOUCHSTONE_NEW ) plot_modelling_group_variation(data) plot_vaccine_gavi(data) plot_cumul(data)plot_sig_diff(data, outcome = IMPACT_OUTCOMES) plot_diff( data, outcome = IMPACT_OUTCOMES, group_vars = IMPACT_GROUP_VARS, touchstone_old = DEF_TOUCHSTONE_OLD, touchstone_new = DEF_TOUCHSTONE_NEW ) plot_modelling_group_variation(data) plot_vaccine_gavi(data) plot_cumul(data)
data |
A data.frame suitable for plotting.
|
outcome |
A string for the impact outcome. One of IMPACT_OUTCOMES. |
group_vars |
A single string for the grouping variables. May be any of
IMPACT_OUTCOMES, which are |
touchstone_old |
A string for the previous touchstone in
format |
touchstone_new |
A string for the current or new touchstone in
format |
A <ggplot2> object that can be viewed or saved.
Transform burden estimate data from modelling groups to make them suitable for plotting using an appropriate plotting function. Each preparation function corresponds to a plotting function.
prep_plot_demography(burden) prep_plot_age(burden) prep_plot_burden_decades(burden, year_max) prep_plot_global_burden(burden) prep_plot_coverage_set(coverage) prep_plot_fvp(fvp, year_min, year_max)prep_plot_demography(burden) prep_plot_age(burden) prep_plot_burden_decades(burden, year_max) prep_plot_global_burden(burden) prep_plot_coverage_set(coverage) prep_plot_fvp(fvp, year_min, year_max)
burden |
For |
year_max |
The maximum year to be represented in a subsequent figure.
For |
coverage |
WIP. Coverage data. |
fvp |
WIP. Data on counts of fully vaccinated persons. |
year_min |
Minimum year. |
For prep_plot_demography(): a <tibble> in long-format, with the
identifier-columns, "scenario", "age", and "year", with the added column
"value_millions".
For prep_plot_age(): a <tibble> with the columns "scenario",
"burden_outcome", "age", "value_millions".
For prep_plot_burden_decades(): a <tibble> with the columns "scenario",
"burden_outcome", "decade_label", and "value_millions".
For prep_plot_global_burden(): a nested <tibble> with the string
column "burden_outcome", and a list column of tibbles "burden_data".
For prep_plot_coverage_set(): WIP
For prep_plot_fvp(): WIP.
A suite of helper functions that sit between impact diagnostics functions and plotting functions. These functions transform and aggregate impact estimates to prepare them for visualisation. Functions have basic checks on input data but otherwise assume users will not modify inputs.
prep_plot_mod_grp_varn(df2, df3, outcome = IMPACT_OUTCOMES) prep_plot_vax_gavi( data, prev_data, outcome = IMPACT_OUTCOMES, touchstone_old = DEF_TOUCHSTONE_OLD, touchstone_new = DEF_TOUCHSTONE_NEW ) prep_plot_cumul( data, outcome, disease, touchstone_old = DEF_TOUCHSTONE_OLD, touchstone_new = DEF_TOUCHSTONE_NEW )prep_plot_mod_grp_varn(df2, df3, outcome = IMPACT_OUTCOMES) prep_plot_vax_gavi( data, prev_data, outcome = IMPACT_OUTCOMES, touchstone_old = DEF_TOUCHSTONE_OLD, touchstone_new = DEF_TOUCHSTONE_NEW ) prep_plot_cumul( data, outcome, disease, touchstone_old = DEF_TOUCHSTONE_OLD, touchstone_new = DEF_TOUCHSTONE_NEW )
df2 |
A |
df3 |
A |
outcome |
A character string for the impact outcome. Must be one of
|
data |
A |
prev_data |
A |
touchstone_old |
A six-character touchstone identifier (YYYYMM format)
for the previous dataset. Defaults to DEF_TOUCHSTONE_OLD. Used in
|
touchstone_new |
A six-character touchstone identifier (YYYYMM format)
for the current dataset. Defaults to DEF_TOUCHSTONE_NEW. Used in
|
disease |
A character string specifying a single disease for filtering and analysis. |
prep_plot_mod_grp_varn() returns a grouped <tibble> (grouped by
vaccine) with all columns from df2 and df3 plus derived columns:
adj_outc (adjusted outcome with small offset), outcome_name (input
outcome), and mean_outc (vaccine-level weighted mean outcome).
prep_plot_vax_gavi() returns a <tibble> with columns disease,
year, yearly_outcome, dataset (factor with levels for old touchstone,
"Difference", and new touchstone), and outcome_name. Summarizes outcomes
by disease and year across two touchstones.
prep_plot_cumul() returns a <tibble> with columns year,
modelling_group, touchstone, value (cumulative or average outcome),
line_type ("solid" for individual models, "dashed" for model average),
and outcome_name. Returns NULL if the specified disease has no non-zero
data to plot.
A simple plotting theme building on ggplot2::theme_bw().
theme_vimc(x_text_angle = 45, y_text_angle = 0, ...) theme_vimc_noxaxis()theme_vimc(x_text_angle = 45, y_text_angle = 0, ...) theme_vimc_noxaxis()
x_text_angle |
The angle for X-axis labels. Defaults to 45 degrees. |
y_text_angle |
The angle for Y-axis labels. Defaults to 0 degrees. |
... |
< |
A ggplot2 theme that can be added to ggplot2 plots or objects.
# using an inbuilt dataset data(mtcars) # standard theme ggplot2::ggplot(mtcars, ggplot2::aes(disp, mpg)) + ggplot2::geom_point() + theme_vimc() # with X-axis suppression ggplot2::ggplot(mtcars, ggplot2::aes(disp, mpg)) + ggplot2::geom_point() + theme_vimc_noxaxis()# using an inbuilt dataset data(mtcars) # standard theme ggplot2::ggplot(mtcars, ggplot2::aes(disp, mpg)) + ggplot2::geom_point() + theme_vimc() # with X-axis suppression ggplot2::ggplot(mtcars, ggplot2::aes(disp, mpg)) + ggplot2::geom_point() + theme_vimc_noxaxis()
Save pressure-testing diagnostics data.frames to local compressed files in
the .Rds format. Input data.frames are generated by other package functions
and are not checked here.
save_outputs( missing_in_current, missing_deaths, missing_dalys, changes_deaths, changes_dalys, subregional_flags_deaths_camp, subregional_flags_deaths_rout, subregional_flags_dalys_camp, subregional_flags_dalys_rout, output_dir = here::here("outputs") )save_outputs( missing_in_current, missing_deaths, missing_dalys, changes_deaths, changes_dalys, subregional_flags_deaths_camp, subregional_flags_deaths_rout, subregional_flags_dalys_camp, subregional_flags_dalys_rout, output_dir = here::here("outputs") )
missing_in_current |
A data.frame. |
missing_deaths |
A data.frame that is the output of
|
missing_dalys |
A data.frame that is the output of
|
changes_deaths |
A data.frame that is the output of |
changes_dalys |
A data.frame that is the output of |
subregional_flags_deaths_camp |
A data.frame that is the output of
|
subregional_flags_deaths_rout |
A data.frame that is the output of
|
subregional_flags_dalys_camp |
A data.frame that is the output of
|
subregional_flags_dalys_rout |
A data.frame that is the output of
|
output_dir |
A writeable directory. Defaults to "./outputs". |
None. Called for the convenience side-effect of saving data.frames as
.Rds format.
Check that incoming data files in a burden estimate are complete, and that
no extra files have been included.
This function expects that incoming burden files are in the
directory given by path_burden, which holds a file dictionary which maps
each data file to a specific scenario.
validate_complete_incoming_files(path_burden = "incoming_burden_estimates")validate_complete_incoming_files(path_burden = "incoming_burden_estimates")
path_burden |
A directory with burden estimate data. |
A <tibble> of the scenario file dictionary in path_burden if all
checks pass. Otherwise, exits with informative errors on failed checks.
Function to create a file_dictionary template.
It maps to touchstone disease scenarios and you will see expected number of
scenarios i.e. the number of files that we expect from a model.
Users should populate the file column to match the scenario-file.
This function will run if a file_dictionary.csv file does not exist
validate_file_dict_template(disease, path_burden = "incoming_burden_estimates")validate_file_dict_template(disease, path_burden = "incoming_burden_estimates")
disease |
A disease identifier. |
path_burden |
A directory with burden estimate data. |
Nothing; called primarily for its side-effects.
If the file path_burden/file_dictionary.csv does not exist, a file
dictionary CSV file is written to the same location.
Prints a message to screen informing the user whether any action has been
taken.
Identify extra and missing columns and rows in burden data.
validate_template_alignment(burden_set, template)validate_template_alignment(burden_set, template)
burden_set |
A |
template |
A |
A named list of checks carried out on burden_set to compare it
against template, with information on missing and extra data.
Data that groups countries into WHO subregions.
who_subregionswho_subregions
who_subregionsA data frame with 249 rows and 9 columns:
Sub-region three character code with added letter identifier.
Country name in long form.
ISO 3 character country code.
A constant, 'World'.
Continent-scale region identifier.
Sub-continental scale region identifier.
Alternative regional scale identifier.
Sub-regional identifier.
Logical identifier.
Prepared by the VIMC secretariat.