knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
CovidYe package is created by Chengzhi Ye, which is followed strictly by the package-instructions. It contains one Shiny App, one data set and three functions. The main purpose of CovidYe package is to provide the basic information about COVID-19 of the countries with most confirmed cases and some functions to create the interactive plots and tables which are contains in the Shiny App.
The development version can be installed from my GitHub with:
# install.packages("devtools") devtools::install_github("etc5523-2020/r-package-assessment-Year-97")
After installing CovidYe package, you can type launch_app() in the console to run the Covid-19 Shiny App.
library(CovidYe) library(tibble) library(dplyr) library(tidyr) library(plotly) library(ggplot2)
as_tibble(coronavirus)
coronavirus %>% select(date, country, type, cases) %>% group_by(type, date) %>% summarise(total_cases = sum(cases)) %>% pivot_wider(names_from = type, values_from = total_cases) %>% arrange(date) %>% mutate(totalconfirmed = cumsum(confirmed), totalrecovered = cumsum(recovered), totaldeath = cumsum(death)) %>% head(10) %>% kableExtra::kable()
coronavirus %>% select(date, country, type, cases) %>% filter(country %in% c("US", "India", "Brazil", "Russia", "Peru")) %>% filter(type == "confirmed") %>% ggplot(aes(x = date, y = cases, color = country, lable = country)) + geom_line() + theme_bw()
The complete information and instruction can be seen in my pkgdown website.
Also there is a distill blog which is also designed by me. You can learn more information about my Shiny App and the COVID-19 basic situation in that site. Therefore, you are welcome to have a look.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.