Processing covid-19 test results. DIGICOMPHOTO/SCIENCE PHOTO LIBRARY Rights Managed
Introduction
The “COVID-19 Coronavirus data - daily (up to 14 December 2020)” dataset was collected by the European Centre for Disease Prevention and Control (ECDC). Their goal was to provide maximum transparency of the Covid-19 pandemic globally.
This project analyzes the intuitive and statistical significance of population, location, and the number of cases correlated to Covid-19 deaths.
There are 10 variables, 3 being categorical and 7 being quantitative. In this project I used the following key variables:
“Data.Population”
“Location.Continent”
“Data.Cases”
“Data.Death”
“Data.Rate”
Loading the Libraries and Dataset
library(ggplot2)library(dplyr)
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
library(dslabs)library(highcharter)
Registered S3 method overwritten by 'quantmod':
method from
as.zoo.data.frame zoo
Attaching package: 'highcharter'
The following object is masked from 'package:dslabs':
stars
`summarise()` has regrouped the output.
ℹ Summaries were computed grouped by dateyear and locationcontinent.
ℹ Output is grouped by dateyear.
ℹ Use `summarise(.groups = "drop_last")` to silence this message.
ℹ Use `summarise(.by = c(dateyear, locationcontinent))` for per-operation
grouping (`?dplyr::dplyr_by`) instead.
`summarise()` has regrouped the output.
ℹ Summaries were computed grouped by dateyear and locationcontinent.
ℹ Output is grouped by dateyear.
ℹ Use `summarise(.groups = "drop_last")` to silence this message.
ℹ Use `summarise(.by = c(dateyear, locationcontinent))` for per-operation
grouping (`?dplyr::dplyr_by`) instead.
P-values: There is a very significance correlation between population and deaths from Covid-19 as shown by the significant code (7.537e-09). Furthermore, the number of cases has a highly significant correlation with Covid-19 deaths (1.793e-02***)
Adjusted R-squared: The adjusted R-squared is 0.5294, meaning that approximately 53% of the variation in Covid-19 deaths is represented by the regression model. The other 47% is caused by factors that may not be represented by this dataset.
Diagnostic Plots: The Residuals vs Fitted plot shows that relating population, data rate, and cases to Covid-19 deaths is appropriate. The Q-Q Residuals plot indicates that the distribution of observations is realtively normal. The Scale-Location plot demonstrates that few observations are are skewing the variance distribution. Additionally, the Residuals vs Leverage plot identifies a few influential observations.
Overall, this model is statistically significant as as the p-value = 2.2e-16.
Conclusion
Cleaning the data
The variables of this dataset had uppercase letters and periods. In order to clean the variable names I used tolower() to convert all names to lowercase. Then I used gsub() to remove the periods in the variable names. This allowed for better reading and handling in exploring the data.
Visualization
The main visualizations explored the covid dataset, identifying the continents with the most Covid-19 cases and resulting deaths. This was achieved using an area chart and bar chart, respectively. Both charts were made to be interactive using the highcharter library.
Technical challenges and Future Studies
While making visualizations, my challenges revolved around the lack of variety in quantitative variables. The majority of the quantitative variables were correlated pertaining to date and time. This would become a restriction in deciding what chart or graph to use. As the covid dataset only has information from 2019 until December 2020, it was a challenge making my graph not appear skewed due to a lack of data. If I were to continue this project, I would like to expand on the unaccounted 47% variation of factors impacting Covid-19 deaths.
Encyclopædia Britannica. (n.d.). Processing covid-19 test results. [Photograph]. Britannica ImageQuest. Retrieved November 10, 2026, from https://quest.eb.com/images/132_9118868
RStudio. (2023, February 25). RPubs - correlation, scatterplots, regression, and interactivity in R. Rpubs.Com. https://rpubs.com/rsaidi/1007730
RStudio. (2025, March 5). RPubs - Exploration of Continuous Variables. Rpubs.Com. https://rpubs.com/rsaidi/cont_var