Data interpretation and visualization of COVID-19 cases using R programming

Data interpretation and visualization of COVID-19 cases using R programming
Like

Share this post

Choose a social network to share with, or copy the URL to share elsewhere

This is a representation of how your post may appear on social media. The actual post will vary between social networks

Background:
Data analysis and visualization are critical tools for exploring and communicating findings in medical research, particularly during the COVID-19 pandemic. These tools enable researchers and policymakers to better understand the spread and impact of the virus, especially when working with large-scale datasets.

Methodology

COVID-19 data records were updated within 24 hours following the official declaration of the pandemic. This study emphasizes the interactive visualization of such data. Key data sources include DataHub [25] and the MDPI open-access article [26]. The research involves generating graphical outputs from raw open-source datasets, along with organizing and managing the data to produce effective visual presentations. After loading various R libraries—including leaflet, tidyverse, ggmap, htmltools, leaflet.extras, maps, ggplot2, mapproj, mapdata, and spData—a dataset of world cities containing 15,493 records across 11 variables was imported into the R environment. The dataset was then transformed into a tidier format using the tbl_df() function. Notably, the modern R package readr offers efficient functions such as read_delim(), read_tsv(), and read_csv(), which significantly outperform base R functions in terms of speed, importing data directly as tbl objects.

Results:
Data on COVID-19 confirmed cases and related deaths since December 2019 were automatically collected from multiple reputable sources, including Statista, Datahub.io, and the Multidisciplinary Digital Publishing Institute (MDPI). We developed an interactive application using R programming to visualize and analyze multiple indicators of the SARS-CoV-2 epidemic. This application utilizes data from highly populated countries such as the United States, Japan, and India.

Conclusions:
The COVID19-World online web application provides daily, up-to-date, country-specific visualizations and analysis of the global COVID-19 pandemic. This tool aims to facilitate better understanding of SARS-CoV-2 trends across various nations and assist researchers and public health officials in tracking the epidemic's progression.


1. Introduction

The first reported COVID-19 case was identified in Wuhan, China, between December 29, 2019, and January 3, 2020, when approximately fifty individuals developed pneumonia-like symptoms [1,2]. Wuhan, being a major transport hub—especially before the Chinese New Year—experienced rapid transmission of the virus [3,4]. This surge in infections led the World Health Organization (WHO) to declare COVID-19 a global epidemic [5].

Although only 43% of hospitalized patients initially exhibited fever, over 80% eventually showed such symptoms in hospitals or quarantine facilities. However, relying solely on symptoms can lead to undetected cases [6,7]. COVID-19 primarily presents with diarrhea, coughing, and shortness of breath [9]. Notably, a lack of fever does not rule out infection. Early gastrointestinal symptoms like diarrhea can occur in 3%–5% of patients [8].

Patients with mild symptoms are advised to self-isolate for at least 14 days from the onset of symptoms. Those experiencing respiratory distress or chest infections should seek immediate medical attention [10]. During treatment, medical professionals often recommend rest and immune system support through quarantining [11].

Approximately 5% of patients develop Acute Respiratory Distress Syndrome (ARDS), wherein the virus infiltrates the lung's air sacs, impeding oxygen exchange and red blood cell purification [12]. In severe cases, extracorporeal oxygenation—filtering the blood externally before returning it to the body—may be required [13]. Patients with pre-existing conditions such as heart disease, kidney disease, diabetes, or those on long-term medication tend to experience more severe symptoms [14].

Efforts to "flatten the curve" aim to slow the infection rate, ensuring healthcare systems are not overwhelmed, unlike early panic scenarios (e.g., the toilet paper shortages in some countries) [15,16].