In this article, we will collect latest updated information about the coronavirus cases across the world and in a particular country. We will plot graphs to visualise the growth of total number of cases and the total deaths for the last 20 days. The latest data is fetched from Our World in Data.
Python modules required
The requests library is used for making HTTP requests in Python.
pip install requests
matplotlib is a comprehensive library for creating various types of graphs and interactive visualisations in Python.
pip install matplotlib
The data scraped from the website(using requests), is converted to the csv-like format. Then this data is filtered to get the required statistics for the last 20 days and the visualizations are plotted(using matplotlib).
Below is the implementation.
Enter country name... India
Enter country name... Italy
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course