This commit is contained in:
nlitkowski 2021-05-26 17:11:31 +02:00
parent 16ee9f201b
commit 76257ec14b

View File

@ -82,14 +82,18 @@ plot_ly(
) )
# World - deaths by country ----------------------------------------------- # World - deaths by country -----------------------------------------------
cov_d <- cov
cov_d[["new_vaccinations"]][is.na(cov_d[["new_vaccinations"]])] <- 0
cov_d[["new_deaths"]][is.na(cov_d[["new_deaths"]])] <- 0
cov_d <- cov_d %>% group_by(location)
plot_ly( plot_ly(
cov, cov_d,
x = cov$date, x = cov_d$date,
y = cov$new_deaths, y = cov_d$new_deaths_smoothed,
name = "New deaths", name = cov_d$location,
type = "scatter", type = "scatter",
mode = "lines", mode = "lines",
connect_gaps = TRUE, color = cov_d$location
color = cov$location
) )