Peer-graded Assignment: R Markdown Presentation & Plotly

EPriske

23 11 2021

Objectives

Create a web page presentation using R Markdown that features a plot created with Plotly. Host your webpage on either GitHub Pages, RPubs, or NeoCities. Your webpage must contain the date that you created the document, and it must contain a plot created with Plotly. We would love to see you show off your creativity!

Review Criteria

The rubric contains the following two questions:

  1. Does the web page feature a date and is this date less than two months before the date that you’re grading this assignment?
## [1] "2021-11-23 09:53:17 UTC"
## [1] "2021-11-23"
  1. Is the web page a presentation and does it feature an interactive plot that appears to have been created with Plotly?

First we will start by loading the required libraries.

## Loading required package: ggplot2
## 
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
## 
##     last_plot
## The following object is masked from 'package:stats':
## 
##     filter
## The following object is masked from 'package:graphics':
## 
##     layout

We will do a plot with data from COVID cases around the world and the total amount of deaths caused by COVID. The data comes from “COVID-19 Open Data” and it is from “BigQuery Public Datasets Program”. Here is a small description of the dataset:

“This repository contains the largest COVID-19 epidemiological database available in addition to a powerful set of expansive covariates. It includes open sourced data with a permissive license (enabling commercial use) relating to vaccinations, epidemiology, hospitalizations, demographics, economy, geography, health, mobility, government response, weather, and more. Moreover, the data merges daily time-series from hundreds of data sources at a fine spatial resolution, containing over 20,000 locations and using a consistent set of region keys.” The SQL code used to get the data was the next:

SELECT country_name, cumulative_confirmed, cumulative_deceased FROM bigquery-public-data.covid19_open_data.covid19_open_data

Link to acces the datasert: https://console.cloud.google.com/marketplace/product/bigquery-public-datasets/covid19-open-data?_ga=2.171800480.-1216389741.1637654717&project=courseralearning-311312

The dataset was summarized by Country, confirmed cases of Covid and confirmed number of deceased by Covid. The dataset was saved localy and then uploaded to Rstudio. We do some data exploration.

##     C_Code            Country          cumulative_confirmed cumulative_deceased
##  Length:194         Length:194         Min.   :1.818e+03    Min.   :      26   
##  Class :character   Class :character   1st Qu.:4.852e+04    1st Qu.:     660   
##  Mode  :character   Mode  :character   Median :3.329e+05    Median :    5306   
##                                        Mean   :2.518e+07    Mean   :  646111   
##                                        3rd Qu.:1.679e+06    3rd Qu.:   31738   
##                                        Max.   :1.190e+09    Max.   :31044530
##   C_Code     Country cumulative_confirmed cumulative_deceased
## 1    AFG Afghanistan               747338               32038
## 2    ALB     Albania               116349                2401
## 3    DZA     Algeria               685373               20023
## 4    AND     Andorra                45279                 438
## 5    AGO      Angola               219024                5339
## 6    ARG   Argentina            219359666             5179525

Now we will do a plot using Plotly