Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c8b4bc1
Add initial fns from pressure testing report
pratikunterwegs Mar 12, 2026
db03465
Move pressure testing plotting
pratikunterwegs Mar 12, 2026
50f6b0d
Clean up funs and add constants
pratikunterwegs Mar 12, 2026
13d6244
Clean up fns and add constants
pratikunterwegs Mar 13, 2026
8aa8494
Rename files
pratikunterwegs Mar 13, 2026
de1eda6
Add checks and docs for pressure testing fns
pratikunterwegs Apr 20, 2026
46d3d97
Add pkg constants
pratikunterwegs Apr 20, 2026
63e5871
Add pkg helpers
pratikunterwegs Apr 20, 2026
ffff840
WIP separate plot prep from plot code
pratikunterwegs Apr 20, 2026
d0237fb
WIP add docs and pkg infra
pratikunterwegs Apr 21, 2026
4a52fbb
Reorganise docs
pratikunterwegs Apr 21, 2026
bba30c5
WIP plotting and prep fns impact diagnostics
pratikunterwegs Apr 21, 2026
a455c5a
Add constants
pratikunterwegs Apr 21, 2026
beb2a07
Update plot prep and plot fns
pratikunterwegs Apr 21, 2026
0424f17
Fixes from initial test run
pratikunterwegs Apr 22, 2026
386be9b
Update infra, bump to v0.0.4
pratikunterwegs Apr 22, 2026
43753fb
Rename fn file, fix arg name
pratikunterwegs Apr 22, 2026
14f1829
Adding pine countries to constants for impact plotting key countries
zegibney Apr 29, 2026
0d446cd
Adding plotting functions from rapid-model-run-impact report which pl…
zegibney Apr 29, 2026
fce44b8
Fix for enabling package checks
zegibney Jun 1, 2026
291e905
Adding more meaningful checks and assertions
zegibney Jun 1, 2026
8a1be98
Defining example data and fvps dataframes
zegibney Jun 1, 2026
876048a
Adding impact plots to pkgdown documentation
zegibney Jun 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
^scratch\.R$
^scratch$
^data-raw$
^jarl\.toml$
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
branches: [*]

name: R-CMD-check

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-changed-files.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
on:
workflow_dispatch:
pull_request:
branches: [main, master]
branches: [*]
paths:
- '**.R'
- '**.Rmd'
Expand Down
8 changes: 6 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: vimcheck
Title: Diagnostics for Vaccine Impact Modelling Consortium Burden and
Impact Estimates
Version: 0.0.3
Version: 0.0.4
Authors@R: c(
person("Pratik", "Gupte", , "p.gupte24@imperial.ac.uk", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-5294-7819")),
Expand All @@ -24,13 +24,17 @@ Depends:
Imports:
checkmate,
cli,
diffdf,
dplyr,
forcats,
ggplot2,
ggridges,
glue,
here,
readr,
rlang,
scales,
stats,
stringr,
tidyr
Suggests:
Expand All @@ -48,4 +52,4 @@ Encoding: UTF-8
Language: en-GB
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
RoxygenNote: 7.3.3
40 changes: 40 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,20 +1,56 @@
# Generated by roxygen2: do not edit by hand

export(COLNAMES_INTEREST_PRESSURE_TEST)
export(COLNAMES_KEY_PRESSURE_TEST)
export(COLOUR_VIMC)
export(DEF_TOUCHSTONE_NEW)
export(DEF_TOUCHSTONE_OLD)
export(DEF_TOUCHSTONE_OLD_OLD)
export(EXCLUDED_DISEASES)
export(IMPACT_OUTCOMES)
export(MAX_TS_MONTH)
export(MAX_TS_YEAR)
export(MIN_TS_MONTH)
export(MIN_TS_YEAR)
export(N_TS_MIN_CHARS)
export(N_TS_YEAR_CHARS)
export(basic_burden_sanity)
export(burden_outcome_names)
export(check_demography_alignment)
export(colnames_df_missing_cols)
export(colnames_plot_demog_compare)
export(compare_natl_subreg)
export(file_dict_colnames)
export(filter_duplicates)
export(filter_excluded_diseases_ts)
export(filter_invalid_trajectories)
export(filter_recent_ts)
export(flag_large_diffs)
export(gen_combined_df)
export(gen_national_iqr)
export(generate_diffs)
export(plot_age_patterns)
export(plot_compare_demography)
export(plot_coverage_set)
export(plot_cumul)
export(plot_diff)
export(plot_fvp)
export(plot_global_burden)
export(plot_global_burden_decades)
export(plot_modelling_group_variation)
export(plot_sig_diff)
export(plot_vaccine_gavi)
export(prep_plot_age)
export(prep_plot_burden_decades)
export(prep_plot_coverage_set)
export(prep_plot_cumul)
export(prep_plot_demography)
export(prep_plot_fvp)
export(prep_plot_global_burden)
export(prep_plot_mod_grp_varn)
export(prep_plot_vax_gavi)
export(save_outputs)
export(scenario_data_colnames)
export(theme_vimc)
export(theme_vimc_noxaxis)
export(validate_complete_incoming_files)
Expand All @@ -26,12 +62,16 @@ importFrom(ggplot2,facet_grid)
importFrom(ggplot2,facet_wrap)
importFrom(ggplot2,geom_col)
importFrom(ggplot2,geom_hline)
importFrom(ggplot2,geom_point)
importFrom(ggplot2,geom_segment)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,label_wrap_gen)
importFrom(ggplot2,labeller)
importFrom(ggplot2,labs)
importFrom(ggplot2,scale_fill_distiller)
importFrom(ggplot2,scale_x_continuous)
importFrom(ggplot2,scale_y_continuous)
importFrom(ggplot2,theme)
importFrom(ggplot2,vars)
importFrom(rlang,":=")
importFrom(rlang,.data)
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# vimcheck 0.0.4

- Added impact diagnostics functions in `R/fn_impact_diagnostics.R`.

- Added plotting preparation functions and plotting functions in `R/fn_plotting_prep_impact_diagnostics.R` and `R/fn_plotting_impact_diagnostics.R`.

- Added dependencies _diffdf_ and _here_.

# vimcheck 0.0.3

- Separated data-prep for plotting from plotting functions.
Expand Down
177 changes: 177 additions & 0 deletions R/constants.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
#' Package constants
#'
#' @description
#' Constant values used in _vimcheck_. See the **Examples** section for the
#' constant values.
#'
#' @name constants
#' @rdname constants
#'
#' @keywords constants
#'
#' @examples
#' file_dict_colnames
#'
#' @export
file_dict_colnames <- c(
"scenario_type",
Expand All @@ -15,6 +22,11 @@ file_dict_colnames <- c(
)

#' @name constants
#'
#' @examples
#' scenario_data_colnames
#'
#' @export
scenario_data_colnames <- c(
"scenario_type",
"scenario_type_description",
Expand All @@ -23,6 +35,11 @@ scenario_data_colnames <- c(
)

#' @name constants
#'
#' @examples
#' burden_outcome_names
#'
#' @export
burden_outcome_names <- c(
"cases",
"deaths",
Expand All @@ -37,6 +54,11 @@ burden_outcome_names <- c(
)

#' @name constants
#'
#' @examples
#' colnames_plot_demog_compare
#'
#' @export
colnames_plot_demog_compare <- c(
"variable",
"scenario",
Expand All @@ -46,3 +68,158 @@ colnames_plot_demog_compare <- c(
"value",
"value_millions"
)

#' @name constants
#'
#' @examples
#' colnames_df_missing_cols
#'
#' @export
colnames_df_missing_cols <- c(
"country_name",
"vaccine",
"activity_type",
"year",
"modelling_group"
)

#' @name constants
#'
#' @examples
#' COLNAMES_KEY_PRESSURE_TEST
#'
#' @export
COLNAMES_KEY_PRESSURE_TEST <- c(
"country",
"country_name",
"vaccine",
"activity_type",
"year",
"disease",
"modelling_group"
)

#' @name constants
#'
#' @examples
#' COLNAMES_INTEREST_PRESSURE_TEST
#'
#' @export
COLNAMES_INTEREST_PRESSURE_TEST <- union(
COLNAMES_KEY_PRESSURE_TEST,
c(
"fvps",
"target_population",
"coverage",
"deaths_averted",
"dalys_averted",
"deaths_averted_rate",
"dalys_averted_rate"
)
)

#' @name constants
#'
#' @examples
#' IMPACT_OUTCOMES
#'
#' @export
IMPACT_OUTCOMES <- c("deaths_averted", "dalys_averted")

IMPACT_GROUP_VARS <- c("activity_type", "vaccine")

#' @name constants
#'
#' @examples
#' EXCLUDED_DISEASES
#'
#' @export
EXCLUDED_DISEASES <- c("Hib", "PCV", "Rota", "JE")

#' @name constants
#'
#' @examples
#' N_TS_MIN_CHARS
#'
#' @export
N_TS_MIN_CHARS <- 6L

#' @name constants
#'
#' @examples
#' N_TS_YEAR_CHARS
#'
#' @export
N_TS_YEAR_CHARS <- 4L

#' @name constants
#'
#' @examples
#' MIN_TS_YEAR
#'
#' @export
MIN_TS_YEAR <- 2000

#' @name constants
#'
#' @examples
#' MAX_TS_YEAR
#'
#' @export
MAX_TS_YEAR <- 2100

#' @name constants
#'
#' @examples
#' MIN_TS_MONTH
#'
#' @export
MIN_TS_MONTH <- 1

#' @name constants
#'
#' @examples
#' MAX_TS_MONTH
#'
#' @export
MAX_TS_MONTH <- 12

#' @name constants
#'
#' @examples
#' DEF_TOUCHSTONE_OLD
#'
#' @export
DEF_TOUCHSTONE_OLD <- "201910"

#' @name constants
#'
#' @examples
#' DEF_TOUCHSTONE_NEW
#'
#' @export
DEF_TOUCHSTONE_NEW <- "202310"

#' @name constants
#'
#' @examples
#' DEF_TOUCHSTONE_OLD_OLD
#'
#' @export
DEF_TOUCHSTONE_OLD_OLD <- "202110"

#' @name constants
#'
#' @examples
#' COLOUR_VIMC
#'
#' @export
COLOUR_VIMC <- "#008080"

#' @name constants
#'
#' @examples
#' pine
#'
#' @export
pine <- c("PAK", "IND", "NGA", "ETH")
Loading
Loading