joachim-gassen / tidycovid19

{tidycovid19}: An R Package to Download, Tidy and Visualize Covid-19 Related Data
https://joachim-gassen.github.io/tidycovid19/
Other
146 stars 44 forks source link

When using per_capita=TRUE, some countries are not highlighted #11

Closed AndreaPi closed 4 years ago

AndreaPi commented 4 years ago

I ask plot_covid19_spread to highlight both Sweden and Norway, but only Sweden is highlighted. The ISO3c codes for both countries are correct, as it can be verified here. Reprex:

remotes::install_github("joachim-gassen/tidycovid19")
#> Skipping install of 'tidycovid19' from a github remote, the SHA1 (93f1ceab) has not changed since last install.
#>   Use `force = TRUE` to force installation

if (!require("pacman")) install.packages("pacman")
#> Carico il pacchetto richiesto: pacman
pacman::p_load(dplyr,
               tidycovid19)

# Download latest data
updates <- download_merged_data(cached = TRUE)
#> Downloading cached version of merged data...
#> done. Timestamp is 2020-04-19 07:28:36
# Countries to highlight
countries <- c("SWE", "NOR")
print(plot_covid19_spread(updates,
                    highlight = countries,
                    per_capita = TRUE))#

                    # per_capita_x_axis = TRUE)

Created on 2020-04-20 by the reprex package (v0.3.0)

AndreaPi commented 4 years ago

Sorry, my bad. The solution was trivial - just set min_cases to something other than the default. I would delete the issue if I could...