This project provides a Shiny dashboard to explore COVID-19 deaths by condition, age group, and state using cleaned national and state-level datasets. It includes preprocessing scripts to handle large raw datasets efficiently.
- Explore COVID-19 deaths by condition, age group, and state
- Clean and preprocess large datasets (~500 MB)
- Generate national and state-level datasets for analysis
- Interactive Shiny dashboard for visualization and exploration
CovidDashboard/
│
├── data/
│ ├── covid_cleaned.csv # Cleaned full dataset
│ ├── national_data.csv # Cleaned national-level dataset
│ └── state_data.csv # Cleaned state-level dataset
│
├── DB_code.R # Script in R for cleaning CSV and saving cleaned data
│
├── LICENSE
│
├── app(1).R # UI file for R shiny Dashboard
│
├── README.md
│
└── .gitignore
git clone https://github.com/yourusername/ff-covid.git
cd ff-covidsetwd("path_to_project/ff-covid")install.packages(c(
"tidyverse",
"janitor",
"skimr",
"lubridate",
"naniar",
"shiny",
"shinydashboard",
"plotly",
"DT",
"scales",
"arules"
))source("DB_code.R")This script will:
-
Load
covid.csv -
Inspect and clean the dataset
-
Remove rows with missing or zero deaths
-
Create derived variables like
mention_ratioandage_category -
Save the cleaned datasets in the
data/folder:covid_cleaned.csv(all cleaned data)national_data.csv(national-level data only)state_data.csv(state-level data only)
After cleaning the data, run the Shiny app:
shiny::runApp("app")- Explore COVID-19 deaths by condition
- Visualize deaths by age group
- Compare deaths across states
- Interactive charts and tables using Plotly and DT
-
The data cleaning script must be run first to generate cleaned datasets.
-
All datasets and outputs are stored in the
data/folder. -
Large CSV files (~500 MB) are processed efficiently (~3-5 minutes depending on system).
-
Age groups are categorized as:
- Young (0-34)
- Middle-aged (35-64)
- Elderly (65+)
-
R (version >= 4.0 recommended)
-
Packages:
tidyversejanitorskimrlubridatenaniarshinyshinydashboardplotlyDTscalesarules
MIT License