COVID-19 Data Visualization

COVID-19 Data Visualization

Visualizing daily cases to raise awareness and promote safety

Visualizing daily cases to raise awareness and promote safety


Python, matplotlib, MS Excel

My Role

Solo Programmer


Mapping the Spread of COVID-19

The COVID-19 pandemic has brought the world to its knees, causing widespread fear and uncertainty. The virus was first discovered in the city of Wuhan, China and is believed to have originated from animals before making its way to humans.

To provide much-needed clarity and insight, this visualization project presents a dynamic representation of the daily confirmed cases, deaths, and active cases of COVID-19 through line charts. With a focus on accessibility and relatable information, the aim is to educate and raise awareness about the crucial importance of personal hygiene and self-protection in preventing the spread of the virus.

The problem

This project was created in response to the rapid growth of Covid-19 cases in the United States in April. At the time, the only available tool for tracking cases was the Johns Hopkins website, considered the source of truth for Covid-19 data. However, the existing tools for visualizing this data were limited, only showing the number of confirmed cases by state using a heat map, which was not a direct way to keep trace the trendency.

In order to provide a more comprehensive view of the situation, this project aims to create a better data visualization that can map the number of deaths, recoveries, and confirmed cases, allowing users to see the overall trend of the Covid-19 situation. By combining these different metrics, users can get a more complete picture of the spread of the virus in different states.

The project is divided into three parts.
1.class FileHandler #Extract data

2.class Visualization #Draw charts

  1. class covid_19_us #Main program

Working with Code

class FileHandler

class Visualization

class covid_19_us

The final part is the main program, which allows users to input a state and see a visualization of Covid-19 cases, deaths, and recoveries in that state.

print("Welcome to COVID-19 data visualization for United States")

from visualization import Visualization

def main():
    v = Visualization()
    while True:
        state = input("Please enter a state ( US state / N ): ")
        if state == 'N':

if __name__ == '__main__':

Sample Results

Sorted Data generated by FileHandler

Sorted Data generated by covid_19_us


Looking back at the project, there are two potential improvements that could be made.

The first is to expand the range of visualization options, including the use of bar charts to show the distribution of cases by age and gender. This could provide valuable insights for medical professionals to study this virus.

The second is to use an automated tool, such as Tyson, to more easily and quickly download data from Johns Hopkins and keep the data up-to-date. This would save time and ensure that the tool remains current.