Closed achafetz closed 1 year ago
Improve the UX by suppressing the unnecessary messages.
Update the line below to with the new parameter to silence the file creation message https://github.com/USAID-OHA-SI/mindthegap/blob/93ab563bd68fd8dcee48d7cce4f2628e647ae02f/R/pull_unaids.R#L20 temp_folder <- glamr::temp_folder(quiet = TRUE)
temp_folder <- glamr::temp_folder(quiet = TRUE)
Add the show_progress param to pb_download to suppress message https://github.com/USAID-OHA-SI/mindthegap/blob/93ab563bd68fd8dcee48d7cce4f2628e647ae02f/R/pull_unaids.R#L30-L33
show_progress
pb_download
piggyback::pb_download(file = filename, repo = "USAID-OHA-SI/mindthegap", tag = version_tag, dest = temp_folder, show_progress = FALSE)
Specify the column types on read csv https://github.com/USAID-OHA-SI/mindthegap/blob/93ab563bd68fd8dcee48d7cce4f2628e647ae02f/R/pull_unaids.R#L35-L38
df <- temp_folder %>% glamr::return_latest(quiet = TRUE) %>% readr::read_csv( col_types = list( year = "d", estimate = "d", lower_bound = "d", upper_bound = "d", pepfar = "l", `Achieved 95s with PLHIV base in 2022` = "l", `Achieved 95s with relative base in 2022` = "l", epi_control = "l", .default = "c") ) %>% dplyr::filter(sheet == data_type)
Improve the UX by suppressing the unnecessary messages.
Update the line below to with the new parameter to silence the file creation message https://github.com/USAID-OHA-SI/mindthegap/blob/93ab563bd68fd8dcee48d7cce4f2628e647ae02f/R/pull_unaids.R#L20
temp_folder <- glamr::temp_folder(quiet = TRUE)
Add the
show_progress
param topb_download
to suppress message https://github.com/USAID-OHA-SI/mindthegap/blob/93ab563bd68fd8dcee48d7cce4f2628e647ae02f/R/pull_unaids.R#L30-L33Specify the column types on read csv https://github.com/USAID-OHA-SI/mindthegap/blob/93ab563bd68fd8dcee48d7cce4f2628e647ae02f/R/pull_unaids.R#L35-L38