COVID-19 Tracker Using Python

0

COVID-19 Tracker Using Python

  • Around the world, the Corona virus Pandemic is affecting people and their communities. It might impact different areas in varying ways, but the virus causing the COVID-19 disease has reached a level of global pervasiveness. The situation is constantly evolving so it can be hard to keep track of.
  • If you are in the any country, there is a COVID-19 Tracking Project which provides up-to-date statistics for the nation as a whole world on the number of tests administered, positive cases, and the death toll. The project also provides this data in the form of an API.  

Need to Install:

Source Code:

from covid import Covid
import matplotlib.pyplot as pyplot

country = input("Enter Your Country Name: ")

covid = Covid()
data = covid.get_status_by_country_name(country)
cadr = {
    key: data[key]
    for key in data.keys() & {"confirmed", "active", "deaths", "recovered"}
    }
n = list(cadr.keys())
v = list(cadr.values())
print(cadr)

pyplot.title(country)
pyplot.bar(range(len(cadr)), v, tick_label=n)
pyplot.show() 

Output:

  • COVID-19 CORONA VIRUS : Top Twenty Most-Affected Countries.
1. US (United States)


Graph
2. Spain

Graph
3. Italy

Graph
4. Germany

Graph
5. UK(United Kingdom)

Graph
6. France

Graph
7. Turkey

Graph
8. Iran

Graph
9. Russia

Graph
10. China

Graph
11. Brazil

Graph
12. Canada

 Graph
13. Belgium

Graph
14. Netherlands

Graph
15. Switzerland

Graph
16. India

Graph
17. Peru

Graph
18. Portugal

Graph
19. Ecuador

Graph
20. Ireland

Graph

 

 

 

 

 

 

 

Post a Comment

0Comments
Post a Comment (0)