Description Usage Arguments Value Examples
Plot time series of a country's cases
1 2 3 4 5 6 7 |
x |
a datafram with "countryEnglishName", "date", "confirmed", "cured", "dead" columns |
area |
name of an selected area |
area_col |
the column name of the area in x |
date_col |
the column name of the date in x |
ts_col |
the column names of the time series in x |
a figure
1 2 3 4 5 6 7 8 9 | ncov_raw <- get_ncov()
ncov_raw$area$date <- as.Date(ncovr:::conv_time(ncov_raw$area$updateTime))
x <- ncov_raw$area[, c("countryEnglishName", "countryName", "date", "confirmedCount",
"curedCount", "deadCount")] %>% roup_by(countryEnglishName, date) %>%
summarise(confirmed = sum(confirmedCount), cured = sum(curedCount),
dead = sum(deadCount)) %>% ungroup()
x <- x[!is.na(x$countryEnglishName) & !x$countryEnglishName == "China",
]
plot_ts(x, area = "Korea")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.