epiforecasts / covidregionaldata

An interface to subnational and national level COVID-19 data. For all countries supported, this includes a daily time-series of cases. Wherever available we also provide data on deaths, hospitalisations, and tests. National level data is also supported using a range of data sources as well as linelist data and links to intervention data sets.
https://epiforecasts.io/covidregionaldata/
Other
37 stars 18 forks source link

artefacts from downloading appearing in RStudio console #275

Closed TimTaylor closed 3 years ago

TimTaylor commented 3 years ago

This is a little odd and potentially an rstudio thing but when using get_regional_data() I get some artefacts on the screen which I assume are timings. They don't appear when using R in the terminal or when generating a reprex with rmarkdown :man_shrugging:

rstudio Screenshot from 2021-04-13 22-02-55

rmarkdown

library(covidregionaldata)  
dat <- get_regional_data("uk", level = 2)
#> Downloading UK data.
#> Cleaning data
#> Processing data
dat <- get_regional_data("uk")
#> Downloading UK data.
#> Cleaning data
#> Processing data
dat <- get_regional_data("uk", verbose = FALSE)
TimTaylor commented 3 years ago

... so it's the vroom progress bar and can be suppressed with Sys.setenv("VROOM_SHOW_PROGRESS"="false") and I guess possibly within the vroom call itself (not checked).

seabbs commented 3 years ago

So it looks like this can be turned off manually. I guess there is a question of whether we should or leave it up to the user (a little like progressr this seems to be implemented in a way that implies packages shouldn't decide for users?

(also thanks for flagging and investigating Tim).

joseph-palmer commented 3 years ago

I will push a PR to wrap this shortly

TimTaylor commented 3 years ago

From a user perspective my main confusion was not knowing why I was getting 4/5 different progress bar remnants coming up. There seemed to be a disconnect from what the user thinks is happening versus what was going on behind the scenes (i.e. the user implements 1 operation but behind the scenes this is multiple things and the remnants reflect that). My inclination would be to try to combine the progess on these or, if tricky, just hide it.

seabbs commented 3 years ago

That sounds so hard! Squashing time.....

On a serious note all good points and I agree we should hide if not able to do something better.