covidExplorer contains a Shiny app with summaries, analytics and news related to COVID-19. Download the package and launch the Shiny app to interactively browse data and news regarding the spread of COVID-19 in various countries. The app also enables the user to scrape data from Twitter. Refer to section Twitter Tab for more info.
You can install the current version from GitHub with:
# install.packages("devtools")
devtools::install_github("etc5523-2020/r-package-assessment-petestylianos")
The app is also accessible from https://petestylianos.shinyapps.io/covid-explorer/
To launch the app:
library(covidExplorer)
covidExplorer::launch_app()
To be able to search Twitter on your RSudio you need to be able to run the following commands:
api_key \<- ‘YOUR API KEY’
api_secret \<- ‘YOUR API SECRET’
access_token \<- ‘YOUR ACCESS TOKEN’
access_token_secret \<- ‘YOUR ACCESS TOKEN SECRET’
setup_twitter_oauth(api_key,api_secret)
To obtain this tokens and keys you need to log in to Twitter with your account, or create one if necessary. Then you need to setup an application: click on “My Applications” and then click on “Create new application”. Almost thre, fill in the blank boxes and a new screen will appear with your private keys and token. The final step is to install twitteR from GitHub using the devtools package and run the first 5 commands at the beginning of the section. For further instruction refer to: Twitter Authentication with R, Authenticate.twitter and Twitter Authentication with R.
In order for all tabs of the app to work properly you need to have the following packages installed:
library(classInt)
library(coronavirus)
library(COVID19)
library(DT)
library(leaflet)
library(ggthemes)
library(glue)
library(htmlwidgets)
library(maps)
library(patchwork)
library(plotly)
library(RColorBrewer)
library(scales)
library(shiny)
library(shinycssloaders)
library(shinydashboard)
library(shinydashboardPlus)
library(shinythemes)
library(shinyWidgets)
library(stringr)
library(tidycovid19)
library(tidytext)
library(dplyr)
library(tidyr)
library(twitteR)
my_theme()
Use it to add the custom theme found in the app’s figures
library(tibble)
library(ggplot2)
df <- tibble(x = 1:10,
y = log(x))
fig <- ggplot(df, aes(x, y)) +
geom_line()
covidExplorer::my_theme(fig)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.