Skip to content

Commit e911b86

Browse files
Minor fixes
1 parent dd70521 commit e911b86

6 files changed

Lines changed: 8 additions & 16 deletions

File tree

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ importFrom(ggplot2,scale_fill_distiller)
3434
importFrom(ggplot2,scale_x_continuous)
3535
importFrom(ggplot2,scale_y_continuous)
3636
importFrom(ggplot2,vars)
37+
importFrom(rlang,.data)

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
- Added tests for plotting preparation and plotting functions.
66

7+
- Removed impact and FVPs checker functions.
8+
9+
- Importing `rlang::.data` data pronoun in plotting function; works overall.
10+
711
# vimcheck 0.0.2
812

913
- Added initial data validation functions and some tests.

R/burden_diagnositics.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ validate_file_dict_template <- function(
3131
template <- file.path(path_burden, "file_dictionary.csv")
3232

3333
if (file.exists(template)) {
34-
# TODO: check that file_dictionary entries are acceptable?
3534
data_dict <- readr::read_csv(
3635
template,
3736
show_col_types = FALSE
@@ -349,7 +348,6 @@ check_demography_alignment <- function(
349348
#'
350349
#' @export
351350
basic_burden_sanity <- function(burden) {
352-
# TODO: expectations on burden
353351
mes_start <- "Basic sanity check for burden estimates:"
354352
mes <- mes_start
355353

R/plotting.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ theme_vimc_noxaxis <- function() {
7272
#' scale_fill_distiller scale_x_continuous scale_y_continuous labs vars
7373
#' labeller label_wrap_gen
7474
#'
75+
#' @importFrom rlang .data
76+
#'
7577
#' @description
7678
#' Plotting functions for burden and impact diagnostics. All functions operate
7779
#' on data prepared for plotting by a corresponding
@@ -98,7 +100,6 @@ plot_compare_demography <- function(data, fig_number) {
98100
n_cols_allowed <- 3
99101
num_countries <- length(unique(data$country))
100102

101-
# TODO: use .data and .vars, import or namespace functions
102103
g <- ggplot(
103104
data,
104105
aes(.data$year, .data$value_millions, fill = .data$age)
@@ -246,7 +247,6 @@ plot_coverage_set <- function(coverage_set, fig_number) {
246247
aes(.data$year, .data$coverage, fill = .data$delivery)
247248
) +
248249
geom_col(
249-
# TODO: check if dodging is really needed
250250
position = ggplot2::position_dodge(dodge_width),
251251
alpha = col_opacity
252252
) +

R/plotting_prep.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ prep_plot_burden_decades <- function(burden, year_max) {
162162
#'
163163
#' @export
164164
prep_plot_global_burden <- function(burden) {
165-
# TODO: add colnames check
166165
checkmate::assert_tibble(burden)
167166

168167
nesting_cols <- "burden_outcome"
@@ -267,7 +266,6 @@ prep_plot_fvp <- function(fvp, year_min, year_max) {
267266
) # convert characters to factors and set first level
268267
)
269268

270-
# TODO: need to see an example to figure this out
271269
fvp_final$scenario <- gsub(tolower(fvp$disease[1L]), "", fvp_final$scenario)
272270
fvp_final$scenario <- gsub("-", " ", fvp_final$scenario, fixed = TRUE)
273271

vignettes/vimcheck.Rmd

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,6 @@ knitr::opts_chunk$set(
1818
library(vimcheck)
1919
```
2020

21-
This is a special vignette, which shares the same name as the package.
22-
It will render as the "Get started" page in the navigation bar of _pkgdown_ websites.
23-
24-
To develop it further:
25-
26-
1. Rename the file to your package name;
27-
28-
2. Add code and explainers to help users get started with using your package in this vignette;
29-
30-
3. Remember to add and link references if needed.
21+
This vignette is a work in progress, please see the [vignette on plotting and preparing data for plotting](plotting_and_plotting_prep.html) instead.
3122

3223
## References

0 commit comments

Comments
 (0)