knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) options(rmarkdown.html_vignette.check_title = FALSE) library(uscovid)
The uscovid package is an R package which encloses a shiny web application. The web application showcases an overview of the data on COVID-19 on a global scale and also explores the test results as well as different dimensions of the effect of the pandemic in the United States of America. The package makes it possible for a user to launch the app locally which would aid the user in reproducing the web application.
You can install the development version from Github using:
devtools::install_github("etc5523-2020/r-package-assessment-aarathybabu97")
The primary purpose of the uscovid package is to launch the enclosed web application locally.
The functions choosevar() and sinput() are relative to the shiny app enclosed in the package,therefore not available for user interaction.
The datasets include,
The web application can be launched in the following way,
#load the package library(uscovid) #use function launch_app() launch_app()
The function,launch_app() from the package, launches the web application COVID-19 in United States. The app aims to display the figures on confirmed cases, deaths and recoveries around the World with a focus on United States, which is one of the worst affected countries in the world. It also showcases the testing rate over the months in each state of US as well as the demographic trends of COVID-19 positive cases in US.
selectin("world",monthlist) selectin("usa",statelist)
The function deploys a shiny app which the user can interact with. The parameters required for the function to display the global COVID-19 cases for each month is "world" along with monthlist where as parameters "usa" along with statelist displays the testing rates over the months in each state of US.
sinput("monthname","select a month",monthlist) printext("text to be printed") choosevar(codes,Afghanistan,Code)
The function sinput() returns a drop down menu with values in "monthlist" as options and "select a month" as its label compatible with shiny r package where as printext() prints "text to be printed". In the above example, choosevar() returns the code of Afghanistan.
There are three main topic the web application aims to showcase,The confirmed cases, deaths and recoveries because of COVID-19 on a global scale,the testing streak as well as its results in the states of United States over the months. It always shows how different groups of population in the US are affected by the pandemic.
An interactive table is employed to showcase the repercussions of COVID-19. The table represents the worldwide COVID-19 cases,deaths and recoveries each month and allows the user to search for the country and month of their choice as well as arrange them in the order using the parameters of their choice. For example, Confirmed Cases. User can also view some information like life expectancy, population density etc on the countries by selecting them.
COVID-19 cases in the US is explored by an interactive map showcases the total number of positive cases in each state of United States by hovering over each state where as the point graph depicts the COVID-19 tests conducted in each state during a month.The user can see testing streak of each state and the percentage of positive cases in that state and during a particular month by clicking on its corresponding point in a scatterplot figure.
A chart representing the gender,racial identity as well as the age group under which the COVID-19 positive patients fall is employed to highlight the trends in COVID positive cases. The user is allowed to explore the demographic trends in the COVID-19 positive cases by choosing a parameter.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.