Breakdown of the Data - Dive:

Set-up:

# Load the typical libs
library(dplyr)
## Warning: package 'dplyr' was built under R version 4.2.3
## 
## 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(tidyverse) 
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✔ ggplot2 3.3.6     ✔ purrr   0.3.4
## ✔ tibble  3.2.1     ✔ stringr 1.4.0
## ✔ tidyr   1.2.0     ✔ forcats 0.5.1
## ✔ readr   2.1.2
## Warning: package 'tibble' was built under R version 4.2.3
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(ggplot2) 

Init the link to the dataset:

# Re-instance the COVID data set: 
COVID = read_delim("../data/COVID_country.csv",delim = ",")
## New names:
## Rows: 6208 Columns: 11
## ── Column specification
## ──────────────────────────────────────────────────────── Delimiter: "," chr
## (5): country, iso3, sex, age_group, type dbl (5): year, pop, expected.mean,
## acm.mean, excess.mean* lgl (1): ...11
## ℹ Use `spec()` to retrieve the full column specification for this data. ℹ
## Specify the column types or set `show_col_types = FALSE` to quiet this message.
## • `` -> `...11`
# Alias the COVID data set name :D 
data <- COVID 
summary(data)
##    country              iso3                year          sex           
##  Length:6208        Length:6208        Min.   :2020   Length:6208       
##  Class :character   Class :character   1st Qu.:2020   Class :character  
##  Mode  :character   Mode  :character   Median :2020   Mode  :character  
##                                        Mean   :2020                     
##                                        3rd Qu.:2021                     
##                                        Max.   :2021                     
##   age_group              pop                type           expected.mean      
##  Length:6208        Min.   :        0   Length:6208        Min.   :      0.0  
##  Class :character   1st Qu.:    35177   Class :character   1st Qu.:    370.8  
##  Mode  :character   Median :   267600   Mode  :character   Median :   2438.0  
##                     Mean   :  2520267                      Mean   :  17998.0  
##                     3rd Qu.:  1194828                      3rd Qu.:   9056.5  
##                     Max.   :324033981                      Max.   :1578937.0  
##     acm.mean        excess.mean*        ...11        
##  Min.   :      0   Min.   :-100092.0   Mode:logical  
##  1st Qu.:    411   1st Qu.:      0.0   NA's:6208     
##  Median :   2720   Median :     84.0                 
##  Mean   :  20403   Mean   :   2394.2                 
##  3rd Qu.:  10440   3rd Qu.:    799.2                 
##  Max.   :1733563   Max.   : 588931.0

Part 1: 3 Attributes (columns) in the Data which are Unclear until I have Read the Documentation.

I’ll be concentrating on the country, sex, and type attributes (columns). Before a user can comprehend these three columns, they must first read the documentation. Although the encoding options were made to maintain data consistency, failure to consult the documentation may result in misconceptions and errors in data analysis and interpretation. As a result, it is critical to for the user/reader to read the documentation in order to completely appreciate and understand these attributes.

Column: country

Column: sex

Column: type

Part 2: One Element From the Data that is Unclear after Reading the Documentation.

The “Niue” element, which I identified in the week 3 data dive, is the part of the data that is still unclear even after reading the documentation.

What is unclear about “Niue” in the data even after reading the documentation?

Is there anything about the data that your documentation does not explain?

True, the documentation for “Niue” does not provide enough information on the data sources and collection process. Furthermore, no information regarding external factors or background data that could have influenced the data patterns seen for “Niue” is provided in the documentation.

Conclusion:

Although “Niue” is identified as an anomaly in the dataset during the week 3 data dive due to its small population and lack of excess mortality, the official documentation does not fully explain why “Niue” is unique or provide insights into the underlying factors influencing its distinct status in the data. More study and context will be required to fully appreciate the features of “Niue” in the COVID dataset.

Part 3: Visualization - Findings

Visualization of The “Niue” Element and the “Population” Attribute:

Because “Niue” has such a tiny population in comparison to the other nations, the population column would be one of the columns impacted by the “Niue” problem. It is important to note that this graphic just compares Niue to other countries; it does not include the entire dataset. It’s also important to understand that “Niue” is designed to stand out as an anomaly or outlier in this image.

Visual:

# Do random seed for country samples.
set.seed(123)
# Grab "Niue" as one of the countries
sample_countries <- data.frame(
  country = c("Niue", sample(data$country, 11)),
  population = c(3884, sample(data$pop, 11))
)
# Display the sample countries.
sample_countries
##                             country population
## 1                              Niue       3884
## 2                           Hungary       2475
## 3                             India       2377
## 4                            Greece    3999948
## 5                          Bulgaria    3477102
## 6                              Oman     288877
## 7             Saint Kitts and Nevis     567716
## 8                           Finland     454658
## 9  Democratic Republic of the Congo    5384158
## 10                           Latvia    5735433
## 11             Syrian Arab Republic    3179265
## 12             Syrian Arab Republic    4179387
# ggplot has already been loaded. So, make the visual. 
ggplot(sample_countries, aes(x = country, y = population, fill = country))+
  geom_bar(stat="identity")+
  labs(title="Population Comparison Between Niue and 11 Random Countries",
       x = "Country",
       y = "Population")+
  theme_minimal()+
  theme(axis.text.x = element_text(angle = 45, hjust = 1))+
  geom_text(aes(label = ifelse(country == "Niue", "Unclear", ""), vjust = -0.5))

Unclear Aspects:

Significant Risks:

The fundamental worry is that, if properly considered, “Niue” may skew the data analysis technique or models. As a result, as I mentioned in my week 3 data dive, its singularity may introduce bias or irregularities into statistical analyses. As a result, the approach I may employ to reduce this risk is as follows:

  1. Conduct a thorough examination of the “Niue”-specific data sources and data quality.

  2. Consider whether “Niue” should be treated differently in data processing, maybe by employing statistical techniques to deal with outliers or irregularities.

  3. Look for more publications or studies that examine the COVID dataset and “Niue” in depth. This might assist us in understanding Niue’s unique situation and any potential data issues.

Overall, this visualization highlights the issue with “Niue” in the collection of my data, particularly its population outlier status, and underscores the need for more research and careful handling of this unique occurrence in data analysis.