Authors

Inspiration

It's often hard to keep track of the COVID-19 pandemic due to misinformation, fake news, and the overwhelming amount of media attention only certain parts of the world get. I wanted to build a simple and fast application that displays the rates of COVID-19 across the world so I do not have to sift through the internet to find the facts that I want while also going through the struggle of determining if the information is credible.

What it does

COVID-19 Tracker takes in a max of 5 countries and a specified time range to display a graph of the COVID-19 cases in all of those countries. It color codes each of the countries in the graph, allowing the user to easily compare the rates of COVID-19 throughout the world. This works for any time range that the user inputs. The user also has the option to display a world map of the COVID-19 rates after the graph is created, allowing the data on COVID-19 to be visualized in an appealing and intuitive way that is user-friendly. Each of the countries in the world map is colored to the extent of its COVID-19 rates, allowing the user to easily see which countries need to take action and which ones do not.

How I built it

I used Python's tkinter library to create the GUI part of this application, which includes the buttons, entries, and labels. To get the data on COVID-19, I used the NovelCOVID API. I parsed through the data and used the matplotlib library to visualize this data in the form of a graph. To create the world map, I used the pygal library, and passed in the data used to create the graph, allowing the user to visualize data on COVID-19 in two unique ways. To display the world map, I used the webbrowser module to open the world map image in Google Chrome, as pygal creates visualizations in the form of scalable vector graphics (svg) files.

Challenges I ran into

The hardest part of this project was parsing through the data given by the API. This is because the data was structured in a way that divided each country into its respective provinces. This made the API call return multiple nested dictionaries that had data on each of a country's provinces, but not the whole country itself. Along with this, the API call scattered the provinces of several countries throughout the API call, making the process of parsing through the data very difficult. To get the COVID-19 data of a whole country, I had to parse through the entire API call and individually add up each of the separate provinces of a specified country, which was especially challenging given that some countries were scattered throughout the API call.

Accomplishments that I'm proud of

I am proud of figuring out how to create a world map visualization of the COVID-19 data, as I had never done this before. I am also proud of being able to parse through the data given by this API because the data was structured in a way that I had not seen before.

What I learned

As a beginner, I learned that not all APIs return data in a convenient way and that I have to be prepared to parse through data that can be inconvenient for the purposes of my project.

What's next for COVID-19 Tracker

I plan on adding a "dormant" feature to this application which will make it run in the background and display windows notifications every hour on the latest updates on COVID-19 throughout the world. This will solve the issue of having to navigate through the web for COVID-19 information and the process of determining if sources are credible or not.

Try It out

Hackathons

Technologies

difflib, matplotlib, novelcovidapi, pycountry, pygal, python, tkinter, webbrowser

Devpost Software Identifier

256004