COVID-19 Data Dynamic Visualiztion
This post is about creating an animation graph for a COVID-19 dataset and present it in a way viewers can easily digest the information in the given data. The animation clearly shows how the virus is spreading across the globe, it is interesting to see how once the most COVID affected countries became the least and the least ones currently became the leading.
By the end of this blog, you will be able to display a raw COVID-19 dataset in a visually appealing way.
- Import the dataset and rename the columns with descriptive names
2. Sort the data in the data descending order.
3. Let’s check the order is correct, by sorting the data based on the number of confirmed cases for the date of “September 13, 2020”
4. Let’s plot the top-10 countries with the most COVID-19 confirmed cases.
5. Let's make it more interesting by representing the countries with a different color for each country.
7. Now let’s display the name of the country with the number of cases at the tip of the bars. Also, display the date and number of confirmed cases at the side of the graph.
8. It’s time to do the animation. The animation can easily be generated by plotting separate graphs as discussed above for each date, then sequentially display them one after the other. The following code generates a separate graph for each date.
9. By using the Matplotlib animation library, the generated graph can be animated smoothly.
Once I finish cleaning and finalizing the combined code, I will make it available here.