CORONA VIRUS CASES

Introduction

covid 19 commonly known as corona virus is a respiratory desease caused by a new strain of corona virus that causes illness in humanss.The first infection was discovered in wuhan china in an infection from SARS-COV 2.The most common symptoms include fever,cough,tiredness loss of taste or smell.Other minor symptoms include sorethroat,headache etc.The disease spreads from person to person through infected air droplets that are projected during sneezing or coughing.It can also be transmitted through infected surfaces that contain the virus and touch their nose,hands or mouth with the contaminated hands.for more information click here []

Aim

To analyze covid 19 data and give an overview of the same.

In [1]:
import numpy as np 
import pandas as pd 
import matplotlib.pyplot as plt
In [2]:
# reading the dataset
covid_19=pd.read_csv('covid_19 (2).xls')
covid_19.head()
Out[2]:
Countries Total_cases New cases Total_deaths New_death Total_recovered New_recovered Active_cases Serious/Critical Total_cases/1M Total_deaths/1M Total_tests Test/1M Popultion Continent
0 USA 80697924 41899.0 977402 1451.0 53730805 230543.0 25989717 7522 241447.0 2924.0 951544688 2847010 334225917 North America
1 India 42938599 7554.0 514246 192.0 42338673 14123.0 85680 8944 30615.0 367.0 768382993 547854 1402532051 Asia
2 Brazil 28811165 23545.0 649717 274.0 26506005 169632.0 1655443 8318 133963.0 3021.0 63776166 296539 215068475 South America
3 France 22782609 79794.0 138576 209.0 21080886 179382.0 1563147 2484 347755.0 2115.0 246629975 3764574 65513384 Europe
4 UK 18985568 24158.0 161630 15.0 17537214 87564.0 1286724 289 277250.0 2360.0 480341745 7014519 68478212 Europe

from the above data set we can pick values that helps in our analysis of

DATA ANALYSIS

2.1.1 Countries most affected by covid 19

In [3]:
# sorting values from the total cases column from the data 
mostcases_covid=covid_19.sort_values('Total_cases',ascending=False)
mostcases_covid[['Countries','Total_cases','Continent']].head(10)
Out[3]:
Countries Total_cases Continent
0 USA 80697924 North America
1 India 42938599 Asia
2 Brazil 28811165 South America
3 France 22782609 Europe
4 UK 18985568 Europe
5 Russia 16495369 Europe
6 Germany 14974713 Europe
7 Turkey 14149341 Asia
8 Italy 12829972 Europe
9 Spain 11036085 Europe

North America

North america a continent in the nothern hemisphere and also described as nothern subcontinent of a single,America.It is boardered to the north by arctic ocean and to the east by atlantic ocean.It covers an area of about 27,709,000sq km(9,540,000 miles).Its poppulation is estimated to be about 579million people in its 23 independent states,or about 7.5% of the worlds population.

1.1 Most affected countries by covid 19

In [4]:
north_am=covid_19[covid_19['Countries']=='North America']
#Top ten countries with most cases in North America
top_north=north_am.sort_values('Total_cases').head(10)
top_north[['Countries','Total_cases']]
Out[4]:
Countries Total_cases
In [5]:
top_north['Total_cases'].sum()
Out[5]:
0
In [4]:
plt.bar(top_north['Countries'],top_north['Total_cases'])
plt.xticks(rotation=90)
plt.title('NORTH AMERICA TOTAL CASES')
plt.xlabel('Countries')
plt.ylabel('Total cases(in ten millions')
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_232/1425450908.py in <module>
----> 1 plt.bar(top_north['Countries'],top_north['Total_cases'])
      2 plt.xticks(rotation=90)
      3 plt.title('NORTH AMERICA TOTAL CASES')
      4 plt.xlabel('Countries')
      5 plt.ylabel('Total cases(in ten millions')

NameError: name 'plt' is not defined

from the data above we clearly see that the most affected countries in north america are Usa,canada and mexico.Total cases recorded in the continent is 94063168

1.2 countries with least covid 19 cases

In [7]:
north_am=covid_19[covid_19['Continent']=='North America']
#Top ten countries with the least cases in North America 
least_north=north_am.sort_values('Total_cases',ascending=False)
#least_north[['Countries','Total_cases']]
In [8]:
least_north
Out[8]:
Countries Total_cases New cases Total_deaths New_death Total_recovered New_recovered Active_cases Serious/Critical Total_cases/1M Total_deaths/1M Total_tests Test/1M Popultion Continent
0 USA 80697924 41899.0 977402 1451.0 53730805 230543.0 25989717 7522 241447.0 2924.0 951544688 2847010 334225917 North America
16 Mexico 5508629 2524.0 318149 63.0 4781564 8433.0 408916 4798 41992.0 2425.0 15089355 115026 131181893 North America
27 Canada 3296549 3569.0 36638 36.0 3148232 2359.0 111679 666 86091.0 957.0 58238581 1520922 38291630 North America
53 Cuba 1070258 396.0 8495 1.0 1059246 606.0 2517 34 94586.0 751.0 12920253 1141856 11315134 North America
64 Costa Rica 809131 2203.0 8047 10.0 673294 5736.0 127790 116 156464.0 1556.0 3712867 717968 5171357 North America
66 Guatemala 780815 3145.0 17010 33.0 723682 4167.0 40123 5 42285.0 921.0 3922624 212429 18465569 North America
67 Panama 755853 355.0 8093 10.0 742772 916.0 4988 26 170717.0 1828.0 5523302 1247496 4427510 North America
77 Dominican Republic 574912 356.0 4369 1.0 568804 482.0 1739 31 52130.0 396.0 3119841 282888 11028532 North America
87 Honduras 412733 1521.0 10778 58.0 127988 325.0 273967 105 40599.0 1060.0 1263329 124269 10166085 North America
112 El Salvador 156364 -1.0 4074 3.0 132410 -1.0 19880 153 23907.0 623.0 1758939 268928 6540555 North America
117 Trinidad and Tobago 128145 378.0 3632 4.0 102736 422.0 21777 18 91076.0 2581.0 634632 451049 1407014 North America
118 Jamaica 128053 67.0 2814 1.0 76987 -1.0 48252 25 42933.0 943.0 852560 285842 2982631 North America
119 Guadeloupe 126642 -1.0 837 -1.0 2250 -1.0 123555 19 316417.0 2091.0 938039 2343703 400238 North America
122 Martinique 115951 3050.0 895 19.0 104 -1.0 114952 10 309383.0 2388.0 707420 1887551 374782 North America
140 Belize 56773 79.0 650 -1.0 54853 112.0 1270 6 138603.0 1587.0 502962 1227911 409608 North America
142 Barbados 55385 220.0 316 -1.0 53424 560.0 1645 -1 192336.0 1097.0 586840 2037929 287959 North America
149 CuraƧao 38960 16.0 261 -1.0 38413 27.0 286 3 235825.0 1580.0 492475 2980957 165207 North America
156 Aruba 33684 -1.0 211 -1.0 33418 -1.0 55 6 313284.0 1962.0 177885 1654452 107519 North America
158 Bahamas 33146 11.0 771 -1.0 26229 8.0 6146 9 82972.0 1930.0 220353 551595 399483 North America
162 Haiti 30342 -1.0 820 -1.0 25219 -1.0 4303 -1 2608.0 70.0 132422 11383 11633302 North America
167 Saint Lucia 22712 18.0 358 -1.0 22246 66.0 108 4 122754.0 1935.0 135918 734609 185021 North America
171 Cayman Islands 19373 -1.0 17 -1.0 8553 -1.0 10803 2 289136.0 254.0 222773 3324821 67003 North America
172 Nicaragua 18105 101.0 221 1.0 4225 -1.0 13659 -1 2680.0 33.0 -1 -1 6755407 North America
180 Grenada 13690 -1.0 216 -1.0 13336 -1.0 138 4 120735.0 1905.0 136411 1203036 113389 North America
185 Greenland 11747 32.0 19 1.0 2761 -1.0 8967 7 206327.0 334.0 164926 2896793 56934 North America
186 Bermuda 11561 -1.0 123 -1.0 11271 -1.0 167 -1 186781.0 1987.0 800448 12932144 61896 North America
187 Dominica 11108 -1.0 57 -1.0 10712 -1.0 339 -1 153674.0 789.0 167204 2313186 72283 North America
188 Saint Martin 9877 -1.0 63 -1.0 1399 -1.0 8415 7 248415.0 1585.0 78366 1970976 39760 North America
190 Sint Maarten 9569 8.0 85 -1.0 9433 3.0 51 10 219050.0 1946.0 62056 1420566 43684 North America
196 Caribbean Netherlands 7593 18.0 31 -1.0 7545 63.0 17 -1 285151.0 1164.0 30126 1131365 26628 North America
197 Antigua and Barbuda 7447 10.0 135 -1.0 7276 23.0 36 1 75014.0 1360.0 18901 190390 99275 North America
201 St. Vincent Grenadines 6740 -1.0 106 -1.0 6604 -1.0 30 -1 60435.0 950.0 98236 880843 111525 North America
202 British Virgin Islands 6085 -1.0 62 -1.0 0 0.0 0 6 199084.0 2028.0 99936 3269622 30565 North America
204 Turks and Caicos 5867 -1.0 36 -1.0 5787 -1.0 44 4 148205.0 909.0 419792 10604289 39587 North America
205 Saint Kitts and Nevis 5530 -1.0 42 -1.0 5483 3.0 5 1 102742.0 780.0 65141 1210259 53824 North America
207 St. Barth 3758 -1.0 6 -1.0 0 0.0 0 -1 378564.0 604.0 56491 5690642 9927 North America
209 Anguilla 2555 -1.0 9 -1.0 2528 -1.0 18 4 167816.0 591.0 51382 3374844 15225 North America
210 Saint Pierre Miquelon 1087 17.0 1 -1.0 1065 16.0 21 1 189142.0 174.0 17358 3020358 5747 North America
213 Montserrat 164 -1.0 2 -1.0 161 -1.0 1 -1 32820.0 400.0 8359 1672804 4997 North America

Most Death cases

In [11]:
north_am=covid_19[covid_19['Continent']=='North America']
#top 10 countries with most death cases in north america
top_north=north_am.sort_values('Total_deaths',ascending=False).head(10)
top_north[['Countries','Total_deaths']]
                                                                
Out[11]:
Countries Total_deaths
0 USA 977402
16 Mexico 318149
27 Canada 36638
66 Guatemala 17010
87 Honduras 10778
53 Cuba 8495
67 Panama 8093
64 Costa Rica 8047
77 Dominican Republic 4369
112 El Salvador 4074
In [14]:
plt.bar(top_north['Countries'],top_north['Total_deaths'])
plt.xticks(rotation=90)
plt.title('NORTH AMERICA TOTAL DEATHS')
plt.xlabel('countries')
plt.ylabel('total cases (in ten millions)')
Out[14]:
Text(0, 0.5, 'total cases (in ten millions)')

we clearly see that USA is the country with most deaths followed by mexico and canada respectively.

1.4 Least death cases

In [18]:
north_am=covid_19[covid_19['Continent']=='North America']
#top ten countries with the most deaths in North America
top_north=north_am.sort_values('Total_deaths',ascending=False).head(10)
top_north[['Countries','Total_deaths']]

                                                                
Out[18]:
Countries Total_deaths
0 USA 977402
16 Mexico 318149
27 Canada 36638
66 Guatemala 17010
87 Honduras 10778
53 Cuba 8495
67 Panama 8093
64 Costa Rica 8047
77 Dominican Republic 4369
112 El Salvador 4074
In [19]:
plt.bar(top_north['Countries'],top_north['Total_deaths'])
plt.xticks(rotation=90)
plt.title('Countries')
plt.ylabel("Total cases(in ten millions)")
Out[19]:
Text(0, 0.5, 'Total cases(in ten millions)')

from the data above it is evident that the country with the least death cases is El Salvador,Dominican Republic,Costa Rica,Panama,Cuba,Honduras and Guetamala.

ASIA

Asia the largest continent on Earth,coveres 9% of the earth surface (44.58 million sq km) and a total population of 4.561 bn . It is bounded to the east by pacific ocean,on the south by Indian ocean and on the north by the Arctic ocean.

In [6]:
asia_covid=covid_19[cvd_19['Continent']=='Asia']
#top ten countries with most cases in Asia
top.asia.sort_values('Total_cases',ascending=False).head(10)
top.asia.[['Countries','Total_cases']]
  File "C:\Users\user\AppData\Local\Temp/ipykernel_232/3334011597.py", line 3
    top.asia.sort_values('Total_cases',ascending=False).head(10)
    ^
SyntaxError: invalid syntax

conclusion

We tried analysing data on corona case, and we find that most counties got affected after avoiding to follow health guidlines . Due to this , most countries ended up recording high number of deaths. Also we find that, USA is the leading country with corona virus cases in the world.

In [ ]: