knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The main purpose of archncov
is to visualize the data of confirmed cases with spiral curves.
archncov
is not on CRAN yet, you can install it from github:
## install.packages("devtools") if(!require(ggvwline)) { devtools::install_github("houyunhuang/ggvwline") } if(!require(nCov2019)) { devtools::install_github("GuangchuangYu/nCov2019") } devtools::install_github("houyunhuang/archncov")
library(archncov) library(nCov2019) library(ggplot2) get_nCov2019()[] %>% tidy_arch_ncov(max.width = 50, max.size = 8, min.size = 0.5) %>% plot(xlim = c(-1.5, 1.0)) get_nCov2019()["Sichuan", ] %>% tidy_arch_ncov(max.width = 50, max.size = 8, min.size = 0.5) %>% plot(use.shadowtext = TRUE, xlim = c(-1.5, 1.0))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.