Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

MATLAB COVID-19 Data Analysis Challenge

Namaste!!

This live script / report contains the complete Data Analysis for Covid-19. The analysis can be used as a
quantitive analysis towards Novel Corona Virus.

In the analysis carried out, the data is accessed from the COVID-19 Data Repository by the Center for Systems
Science and Engineering (CSSE) at Johns Hopkins University.

Table of Contents
1. Import................................................................................................................................................................... 1
2. Filter the Data......................................................................................................................................................1
3. Plot the Filtered Data on a Map..........................................................................................................................9
4. Aggregate the Data........................................................................................................................................... 11
5. Data Analysis and Visualization........................................................................................................................ 15
Conclusions............................................................................................................................................................ 19

1. Import
The data is imported from Git repository of Johns Hopkins University. The datastore is created and new data
(future data) can be directly pulled into MABLAB through the Livescript.

% Create a datastore with parameters set by import function "importCOVIDfile" -- Expect to see
% The wildcard operator (*) allows you to select all of the .csv files in the directory
covidDatastore = datastore("csse_covid_19_data\csse_covid_19_daily_reports\*.csv","Type","file"

Warning: Unable to convert one or more variables to datetime. Specify the correct InputFormat and
DatetimeLocale properties in the DatetimeVariableImportOptions.

% Removed data from before April 07, 2020 (first 76 files) (irregularly formatted data)
covidDatastore.Files = covidDatastore.Files(77:end);
% Read data from Datastore into Workspace
dataRaw = readall(covidDatastore);

2. Filter the Data


This will let you to see the overall comparison of the corona cases globally. Enter the Date and Time in 'yyyy-
MM-dd hh:mm::ss' format. desired_date is the date on which the data needs to be extracted.

desired_date="2020-08-15 00:00:00";

desired_date=datetime(desired_date,"InputFormat","yyyy-MM-dd HH:mm:ss","Format","yyyy-MM-dd HH:


desired_date=desired_date+minutes(1440);
s2=desired_date+minutes(1440);
dataFiltered1=dataRaw(dataRaw.Last_Update >= desired_date & dataRaw.Last_Update < s2,:)

dataFiltered1 = 3942×14 table

1
FIPS Admin2 Province_State Country_Region Last_Update Lat

1 NaN "" <undefined> Afghanistan 2020-08-16 0... 33.9391


2 NaN "" <undefined> Albania 2020-08-16 0... 41.1533
3 NaN "" <undefined> Algeria 2020-08-16 0... 28.0339
4 NaN "" <undefined> Andorra 2020-08-16 0... 42.5063
5 NaN "" <undefined> Angola 2020-08-16 0... -11.2027
6 NaN "" <undefined> Antigua and Barbuda 2020-08-16 0... 17.0608
7 NaN "" <undefined> Argentina 2020-08-16 0... -38.4161
8 NaN "" <undefined> Armenia 2020-08-16 0... 40.0691
9 NaN "" Australian Capital T... Australia 2020-08-16 0... -35.4735
10 NaN "" New South Wales Australia 2020-08-16 0... -33.8688
11 NaN "" Northern Territory Australia 2020-08-16 0... -12.4634
12 NaN "" Queensland Australia 2020-08-16 0... -27.4698
13 NaN "" South Australia Australia 2020-08-16 0... -34.9285
14 NaN "" Tasmania Australia 2020-08-16 0... -42.8821
15 NaN "" Victoria Australia 2020-08-16 0... -37.8136
16 NaN "" Western Australia Australia 2020-08-16 0... -31.9505
17 NaN "" <undefined> Austria 2020-08-16 0... 47.5162
18 NaN "" <undefined> Azerbaijan 2020-08-16 0... 40.1431
19 NaN "" <undefined> Bahamas 2020-08-16 0... 25.0259
20 NaN "" <undefined> Bahrain 2020-08-16 0... 26.0275
21 NaN "" <undefined> Bangladesh 2020-08-16 0... 23.6850
22 NaN "" <undefined> Barbados 2020-08-16 0... 13.1939
23 NaN "" <undefined> Belarus 2020-08-16 0... 53.7098
24 NaN "" <undefined> Belgium 2020-08-16 0... 50.8333
25 NaN "" <undefined> Belize 2020-08-16 0... 17.1899
26 NaN "" <undefined> Benin 2020-08-16 0... 9.3077
27 NaN "" <undefined> Bhutan 2020-08-16 0... 27.5142
28 NaN "" <undefined> Bolivia 2020-08-16 0... -16.2902
29 NaN "" <undefined> Bosnia and Herzegovina 2020-08-16 0... 43.9159
30 NaN "" <undefined> Botswana 2020-08-16 0... -22.3285
31 NaN "" Acre Brazil 2020-08-16 0... -9.0238
32 NaN "" Alagoas Brazil 2020-08-16 0... -9.5713
33 NaN "" Amapa Brazil 2020-08-16 0... 0.9020
34 NaN "" Amazonas Brazil 2020-08-16 0... -3.4168

2
FIPS Admin2 Province_State Country_Region Last_Update Lat

35 NaN "" Bahia Brazil 2020-08-16 0... -12.5797


36 NaN "" Ceara Brazil 2020-08-16 0... -5.4984
37 NaN "" Distrito Federal Brazil 2020-08-16 0... -15.7998
38 NaN "" Espirito Santo Brazil 2020-08-16 0... -19.1834
39 NaN "" Goias Brazil 2020-08-16 0... -15.8270
40 NaN "" Maranhao Brazil 2020-08-16 0... -4.9609
41 NaN "" Mato Grosso Brazil 2020-08-16 0... -12.6819
42 NaN "" Mato Grosso do Sul Brazil 2020-08-16 0... -20.7722
43 NaN "" Minas Gerais Brazil 2020-08-16 0... -18.5122
44 NaN "" Para Brazil 2020-08-16 0... -1.9981
45 NaN "" Paraiba Brazil 2020-08-16 0... -7.2400
46 NaN "" Parana Brazil 2020-08-16 0... -25.2521
47 NaN "" Pernambuco Brazil 2020-08-16 0... -8.8137
48 NaN "" Piaui Brazil 2020-08-16 0... -7.7183
49 NaN "" Rio Grande do Norte Brazil 2020-08-16 0... -5.4026
50 NaN "" Rio Grande do Sul Brazil 2020-08-16 0... -30.0346
51 NaN "" Rio de Janeiro Brazil 2020-08-16 0... -22.9068
52 NaN "" Rondonia Brazil 2020-08-16 0... -11.5057
53 NaN "" Roraima Brazil 2020-08-16 0... -2.7376
54 NaN "" Santa Catarina Brazil 2020-08-16 0... -27.2423
55 NaN "" Sao Paulo Brazil 2020-08-16 0... -23.5505
56 NaN "" Sergipe Brazil 2020-08-16 0... -10.5741
57 NaN "" Tocantins Brazil 2020-08-16 0... -10.1753
58 NaN "" <undefined> Brunei 2020-08-16 0... 4.5353
59 NaN "" <undefined> Bulgaria 2020-08-16 0... 42.7339
60 NaN "" <undefined> Burkina Faso 2020-08-16 0... 12.2383
61 NaN "" <undefined> Burma 2020-08-16 0... 21.9162
62 NaN "" <undefined> Burundi 2020-08-16 0... -3.3731
63 NaN "" <undefined> Cabo Verde 2020-08-16 0... 16.5388
64 NaN "" <undefined> Cambodia 2020-08-16 0... 11.5500
65 NaN "" <undefined> Cameroon 2020-08-16 0... 3.8480
66 NaN "" Alberta Canada 2020-08-16 0... 53.9333
67 NaN "" British Columbia Canada 2020-08-16 0... 53.7267
68 NaN "" Diamond Princess Canada 2020-08-16 0... NaN

3
FIPS Admin2 Province_State Country_Region Last_Update Lat

69 NaN "" Grand Princess Canada 2020-08-16 0... NaN


70 NaN "" Manitoba Canada 2020-08-16 0... 53.7609
71 NaN "" New Brunswick Canada 2020-08-16 0... 46.5653
72 NaN "" Newfoundland and Lab... Canada 2020-08-16 0... 53.1355
73 NaN "" Northwest Territories Canada 2020-08-16 0... 64.8255
74 NaN "" Nova Scotia Canada 2020-08-16 0... 44.6820
75 NaN "" Ontario Canada 2020-08-16 0... 51.2538
76 NaN "" Prince Edward Island Canada 2020-08-16 0... 46.5107
77 NaN "" Quebec Canada 2020-08-16 0... 52.9399
78 NaN "" Saskatchewan Canada 2020-08-16 0... 52.9399
79 NaN "" Yukon Canada 2020-08-16 0... 64.2823
80 NaN "" <undefined> Central African Repu... 2020-08-16 0... 6.6111
81 NaN "" <undefined> Chad 2020-08-16 0... 15.4542
82 NaN "" Antofagasta Chile 2020-08-16 0... -23.6509
83 NaN "" Araucania Chile 2020-08-16 0... -38.9489
84 NaN "" Arica y Parinacota Chile 2020-08-16 0... -18.5940
85 NaN "" Atacama Chile 2020-08-16 0... -27.5661
86 NaN "" Aysen Chile 2020-08-16 0... -45.9864
87 NaN "" Biobio Chile 2020-08-16 0... -37.4464
88 NaN "" Coquimbo Chile 2020-08-16 0... -29.9590
89 NaN "" Los Lagos Chile 2020-08-16 0... -41.9198
90 NaN "" Los Rios Chile 2020-08-16 0... -40.2310
91 NaN "" Magallanes Chile 2020-08-16 0... -52.3680
92 NaN "" Maule Chile 2020-08-16 0... -35.5183
93 NaN "" Metropolitana Chile 2020-08-16 0... -33.4376
94 NaN "" Nuble Chile 2020-08-16 0... -36.7226
95 NaN "" OHiggins Chile 2020-08-16 0... -34.5755
96 NaN "" Tarapaca Chile 2020-08-16 0... -19.9232
97 NaN "" Unknown Chile 2020-08-16 0... NaN
98 NaN "" Valparaiso Chile 2020-08-16 0... -33.0472
99 NaN "" Anhui China 2020-08-16 0... 31.8257
100 NaN "" Beijing China 2020-08-16 0... 40.1824

4
dataFiltered1 = sortrows(dataFiltered1,'Confirmed','descend')

dataFiltered1 = 3942×14 table

FIPS Admin2 Province_State Country_Region Last_Update Lat

1 NaN "" Sao Paulo Brazil 2020-08-16 0... -23.5505


2 NaN "" Maharashtra India 2020-08-16 0... 19.4498
3 NaN "" <undefined> South Africa 2020-08-16 0... -30.5595
4 NaN "" <undefined> Iran 2020-08-16 0... 32.4279
5 NaN "" Tamil Nadu India 2020-08-16 0... 11.0061
6 NaN "" <undefined> Saudi Arabia 2020-08-16 0... 23.8859
7 NaN "" <undefined> Argentina 2020-08-16 0... -38.4161
8 NaN "" Andhra Pradesh India 2020-08-16 0... 15.9129
9 NaN "" <undefined> Bangladesh 2020-08-16 0... 23.6850
10 NaN "" England United Kingdom 2020-08-16 0... 52.3555
11 NaN "" Metropolitana Chile 2020-08-16 0... -33.4376
12 NaN "" Lima Peru 2020-08-16 0... -11.7665
13 NaN "" Moscow Russia 2020-08-16 0... 55.7504
14 NaN "" <undefined> Turkey 2020-08-16 0... 38.9637
15 NaN "" <undefined> France 2020-08-16 0... 46.2276
16 36061 "New York City"New York US 2020-08-16 0... 40.7673
17 6037 "Los Angeles" California US 2020-08-16 0... 34.3083
18 NaN "" Karnataka India 2020-08-16 0... 14.7052
19 NaN "" Bahia Brazil 2020-08-16 0... -12.5797
20 NaN "" Ceara Brazil 2020-08-16 0... -5.4984
21 NaN "" Rio de Janeiro Brazil 2020-08-16 0... -22.9068
22 NaN "" Para Brazil 2020-08-16 0... -1.9981
23 NaN "" <undefined> Iraq 2020-08-16 0... 33.2232
24 NaN "" Minas Gerais Brazil 2020-08-16 0... -18.5122
25 NaN "" Capital District Colombia 2020-08-16 0... 4.7110
26 NaN "" <undefined> Philippines 2020-08-16 0... 12.8797
27 NaN "" Delhi India 2020-08-16 0... 28.6465
28 NaN "" Uttar Pradesh India 2020-08-16 0... 26.9254
29 12086 "Miami-Dade" Florida US 2020-08-16 0... 25.6112
30 NaN "" <undefined> Indonesia 2020-08-16 0... -0.7893
31 NaN "" Maranhao Brazil 2020-08-16 0... -4.9609

5
FIPS Admin2 Province_State Country_Region Last_Update Lat

32 NaN "" Distrito Federal Brazil 2020-08-16 0... -15.7998


33 4013 "Maricopa" Arizona US 2020-08-16 0... 33.3484
34 NaN "" Sindh Pakistan 2020-08-16 0... 26.0094
35 NaN "" Santa Catarina Brazil 2020-08-16 0... -27.2423
36 17031 "Cook" Illinois US 2020-08-16 0... 41.8414
37 NaN "" <undefined> Qatar 2020-08-16 0... 25.3548
38 NaN "" West Bengal India 2020-08-16 0... 23.8141
39 NaN "" Pernambuco Brazil 2020-08-16 0... -8.8137
40 NaN "" Amazonas Brazil 2020-08-16 0... -3.4168
41 NaN "" Parana Brazil 2020-08-16 0... -25.2521
42 NaN "" <undefined> Kazakhstan 2020-08-16 0... 48.0196
43 NaN "" Bihar India 2020-08-16 0... 25.6797
44 NaN "" Goias Brazil 2020-08-16 0... -15.8270
45 NaN "" <undefined> Ecuador 2020-08-16 0... -1.8312
46 NaN "" <undefined> Bolivia 2020-08-16 0... -16.2902
47 NaN "" Espirito Santo Brazil 2020-08-16 0... -19.1834
48 NaN "" Rio Grande do Sul Brazil 2020-08-16 0... -30.0346
49 NaN "" Lombardia Italy 2020-08-16 0... 45.4668
50 NaN "" <undefined> Egypt 2020-08-16 0... 26.8206
51 NaN "" Paraiba Brazil 2020-08-16 0... -7.2400
52 NaN "" Punjab Pakistan 2020-08-16 0... 30.8113
53 NaN "" <undefined> Israel 2020-08-16 0... 31.0461
54 NaN "" Catalonia Spain 2020-08-16 0... 41.5912
55 48201 "Harris" Texas US 2020-08-16 0... 29.8586
56 NaN "" Telangana India 2020-08-16 0... 18.1124
57 NaN "" Madrid Spain 2020-08-16 0... 40.4168
58 NaN "" Ciudad de Mexico Mexico 2020-08-16 0... 19.4326
59 NaN "" <undefined> Dominican Republic 2020-08-16 0... 18.7357
60 NaN "" <undefined> Oman 2020-08-16 0... 21.5126
61 NaN "" <undefined> Panama 2020-08-16 0... 8.5380
62 NaN "" <undefined> Belgium 2020-08-16 0... 50.8333
63 NaN "" Gujarat India 2020-08-16 0... 22.6949
64 NaN "" <undefined> Kuwait 2020-08-16 0... 29.3117
65 NaN "" Assam India 2020-08-16 0... 26.3571

6
FIPS Admin2 Province_State Country_Region Last_Update Lat

66 NaN "" Mato Grosso Brazil 2020-08-16 0... -12.6819


67 NaN "" Alagoas Brazil 2020-08-16 0... -9.5713
68 NaN "" <undefined> Romania 2020-08-16 0... 45.9432
69 NaN "" <undefined> Belarus 2020-08-16 0... 53.7098
70 NaN "" Hubei China 2020-08-16 0... 30.9756
71 NaN "" Sergipe Brazil 2020-08-16 0... -10.5741
72 12011 "Broward" Florida US 2020-08-16 0... 26.1518
73 NaN "" Moscow Oblast Russia 2020-08-16 0... 55.5043
74 NaN "" Piaui Brazil 2020-08-16 0... -7.7183
75 NaN "" <undefined> United Arab Emirates 2020-08-16 0... 23.4241
76 NaN "" <undefined> Guatemala 2020-08-16 0... 15.7835
77 NaN "" Quebec Canada 2020-08-16 0... 52.9399
78 NaN "" Mexico Mexico 2020-08-16 0... 19.4969
79 NaN "" Antioquia Colombia 2020-08-16 0... 7.1986
80 NaN "" Atlantico Colombia 2020-08-16 0... 10.6966
81 NaN "" Rajasthan India 2020-08-16 0... 26.5834
82 48113 "Dallas" Texas US 2020-08-16 0... 32.7667
83 NaN "" Rio Grande do Norte Brazil 2020-08-16 0... -5.4026
84 NaN "" Odisha India 2020-08-16 0... 20.5054
85 NaN "" <undefined> Poland 2020-08-16 0... 51.9194
86 NaN "" <undefined> Singapore 2020-08-16 0... 1.2833
87 NaN "" Nordrhein-Westfalen Germany 2020-08-16 0... 51.4332
88 NaN "" <undefined> Portugal 2020-08-16 0... 39.3999
89 NaN "" Bayern Germany 2020-08-16 0... 48.7904
90 32003 "Clark" Nevada US 2020-08-16 0... 36.2146
91 NaN "" <undefined> Honduras 2020-08-16 0... 15.2000
92 NaN "" <undefined> Nigeria 2020-08-16 0... 9.0820
93 NaN "" Rondonia Brazil 2020-08-16 0... -11.5057
94 NaN "" <undefined> Bahrain 2020-08-16 0... 26.0275
95 NaN "" Haryana India 2020-08-16 0... 29.2000
96 6065 "Riverside" California US 2020-08-16 0... 33.7431
97 NaN "" Madhya Pradesh India 2020-08-16 0... 23.5415
98 36103 "Suffolk" New York US 2020-08-16 0... 40.8832
99 48029 "Bexar" Texas US 2020-08-16 0... 29.4493

7
FIPS Admin2 Province_State Country_Region Last_Update Lat

100 36059 "Nassau" New York US 2020-08-16 0... 40.7407

Enter the country whose data needs to be analysed.

country= "India";

dataFiltered2 = dataFiltered1(dataFiltered1.Country_Region == country,:);


dataFiltered2 = sortrows(dataFiltered2,'Confirmed','descend')

dataFiltered2 = 37×14 table

FIPS Admin2 Province_State Country_Region Last_Update Lat

1 NaN "" Maharashtra India 2020-08-16 0... 19.4498


2 NaN "" Tamil Nadu India 2020-08-16 0... 11.0061
3 NaN "" Andhra Pradesh India 2020-08-16 0... 15.9129
4 NaN "" Karnataka India 2020-08-16 0... 14.7052
5 NaN "" Delhi India 2020-08-16 0... 28.6465
6 NaN "" Uttar Pradesh India 2020-08-16 0... 26.9254
7 NaN "" West Bengal India 2020-08-16 0... 23.8141
8 NaN "" Bihar India 2020-08-16 0... 25.6797
9 NaN "" Telangana India 2020-08-16 0... 18.1124
10 NaN "" Gujarat India 2020-08-16 0... 22.6949
11 NaN "" Assam India 2020-08-16 0... 26.3571
12 NaN "" Rajasthan India 2020-08-16 0... 26.5834
13 NaN "" Odisha India 2020-08-16 0... 20.5054
14 NaN "" Haryana India 2020-08-16 0... 29.2000
15 NaN "" Madhya Pradesh India 2020-08-16 0... 23.5415
16 NaN "" Kerala India 2020-08-16 0... 10.4509
17 NaN "" Punjab India 2020-08-16 0... 30.8415
18 NaN "" Jammu and Kashmir India 2020-08-16 0... 33.7594
19 NaN "" Jharkhand India 2020-08-16 0... 23.6545
20 NaN "" Chhattisgarh India 2020-08-16 0... 21.2647
21 NaN "" Uttarakhand India 2020-08-16 0... 30.1564
22 NaN "" Goa India 2020-08-16 0... 15.3597
23 NaN "" Puducherry India 2020-08-16 0... 11.8827
24 NaN "" Tripura India 2020-08-16 0... 23.7468

8
FIPS Admin2 Province_State Country_Region Last_Update Lat

25 NaN "" Manipur India 2020-08-16 0... 24.7390


26 NaN "" Himachal Pradesh India 2020-08-16 0... 31.9272
27 NaN "" Nagaland India 2020-08-16 0... 26.0670
28 NaN "" Arunachal Pradesh India 2020-08-16 0... 27.7685
29 NaN "" Andaman and Nicobar ... India 2020-08-16 0... 11.2260
30 NaN "" Chandigarh India 2020-08-16 0... 30.7338
31 NaN "" Ladakh India 2020-08-16 0... 34.1526
32 NaN "" Dadra and Nagar Have... India 2020-08-16 0... 20.1947
33 NaN "" Meghalaya India 2020-08-16 0... 25.5369
34 NaN "" Sikkim India 2020-08-16 0... 27.5717
35 NaN "" Mizoram India 2020-08-16 0... 23.3094
36 NaN "" Unknown India 2020-08-16 0... NaN
37 NaN "" Lakshadweep India 2020-08-16 0... 13.7000

3. Plot the Filtered Data on a Map


Now plot some of the filtered data on a map. First, make a geobubble plot with data from dataFiltered1. Set
the "SizeVariable" to "Confirmed" in order to see the confirmed cases.

geobubble(dataFiltered1,"Lat","Long_","SizeVariable","Confirmed")
title('Global Distribution of Confirmed cases for given date')

9
geobubble(dataFiltered2,"Lat","Long_","SizeVariable","Confirmed")
title('Country Level Distribution on specified date')

10
4. Aggregate the Data
A group analysis of the Contries and their States is shown. It shows the average recoveries, average deaths
and many more.

detail=groupsummary(dataFiltered1,["Country_Region","Last_Update"],["sum","mean"],["Confirmed",
detail = sortrows(detail,'sum_Confirmed','descend')

detail = 188×13 table

Country_Region Last_Update GroupCount sum_Confirmed mean_Confirmed

1 US 2020-08-16 0... 3258 5361013 1.6455e+03


2 Brazil 2020-08-16 0... 27 3317096 1.2286e+05
3 India 2020-08-16 0... 37 2589952 6.9999e+04
4 Russia 2020-08-16 0... 83 915808 1.1034e+04
5 South Africa 2020-08-16 0... 1 583653 583653
6 Mexico 2020-08-16 0... 32 517714 1.6179e+04
7 Peru 2020-08-16 0... 26 516296 1.9858e+04
8 Colombia 2020-08-16 0... 33 456689 1.3839e+04
9 Chile 2020-08-16 0... 17 383902 2.2582e+04
10 Spain 2020-08-16 0... 20 342813 1.7141e+04
11 Iran 2020-08-16 0... 1 341070 341070
12 United Kingdom 2020-08-16 0... 15 319232 2.1282e+04
13 Saudi Arabia 2020-08-16 0... 1 297315 297315
14 Argentina 2020-08-16 0... 1 289100 289100
15 Pakistan 2020-08-16 0... 7 288047 4.1150e+04
16 Bangladesh 2020-08-16 0... 1 274525 274525
17 Italy 2020-08-16 0... 21 253438 1.2068e+04
18 France 2020-08-16 0... 11 252965 2.2997e+04
19 Turkey 2020-08-16 0... 1 248117 248117
20 Germany 2020-08-16 0... 17 224488 1.3205e+04
21 Iraq 2020-08-16 0... 1 172583 172583
22 Philippines 2020-08-16 0... 1 157918 157918
23 Indonesia 2020-08-16 0... 1 137468 137468
24 Canada 2020-08-16 0... 14 123825 8.8446e+03
25 Qatar 2020-08-16 0... 1 114809 114809
26 Kazakhstan 2020-08-16 0... 1 102696 102696

11
Country_Region Last_Update GroupCount sum_Confirmed mean_Confirmed

27 Ecuador 2020-08-16 0... 1 100688 100688


28 Bolivia 2020-08-16 0... 1 99146 99146
29 Egypt 2020-08-16 0... 1 96336 96336
30 Israel 2020-08-16 0... 1 92233 92233
31 Ukraine 2020-08-16 0... 27 91795 3.3998e+03
32 China 2020-08-16 0... 33 89279 2.7054e+03
33 Dominican Republic 2020-08-16 0... 1 85545 85545
34 Sweden 2020-08-16 0... 21 84294 4014
35 Oman 2020-08-16 0... 1 82924 82924
36 Panama 2020-08-16 0... 1 80665 80665
37 Belgium 2020-08-16 0... 1 77869 77869
38 Kuwait 2020-08-16 0... 1 75697 75697
39 Romania 2020-08-16 0... 1 69374 69374
40 Belarus 2020-08-16 0... 1 69308 69308
41 United Arab Emirates 2020-08-16 0... 1 64102 64102
42 Netherlands 2020-08-16 0... 17 63889 3.7582e+03
43 Guatemala 2020-08-16 0... 1 62313 62313
44 Poland 2020-08-16 0... 1 56090 56090
45 Singapore 2020-08-16 0... 1 55661 55661
46 Japan 2020-08-16 0... 49 55051 1.1235e+03
47 Portugal 2020-08-16 0... 1 53981 53981
48 Honduras 2020-08-16 0... 1 49979 49979
49 Nigeria 2020-08-16 0... 1 48770 48770
50 Bahrain 2020-08-16 0... 1 46430 46430
51 Ghana 2020-08-16 0... 1 42210 42210
52 Kyrgyzstan 2020-08-16 0... 1 41645 41645
53 Armenia 2020-08-16 0... 1 41495 41495
54 Morocco 2020-08-16 0... 1 41017 41017
55 Algeria 2020-08-16 0... 1 38133 38133
56 Switzerland 2020-08-16 0... 1 37924 37924
57 Afghanistan 2020-08-16 0... 1 37551 37551
58 Uzbekistan 2020-08-16 0... 1 34528 34528
59 Azerbaijan 2020-08-16 0... 1 34107 34107
60 Venezuela 2020-08-16 0... 1 32607 32607

12
Country_Region Last_Update GroupCount sum_Confirmed mean_Confirmed

61 Moldova 2020-08-16 0... 1 29905 29905


62 Kenya 2020-08-16 0... 1 29849 29849
63 Serbia 2020-08-16 0... 1 29471 29471
64 Ethiopia 2020-08-16 0... 1 28894 28894
65 Costa Rica 2020-08-16 0... 1 27737 27737
66 Ireland 2020-08-16 0... 1 27191 27191
67 Nepal 2020-08-16 0... 1 26019 26019
68 Australia 2020-08-16 0... 8 23287 2.9109e+03
69 Austria 2020-08-16 0... 1 23179 23179
70 El Salvador 2020-08-16 0... 1 22619 22619
71 Czechia 2020-08-16 0... 1 19891 19891
72 Cameroon 2020-08-16 0... 1 18469 18469
73 Cote d'Ivoire 2020-08-16 0... 1 16993 16993
74 West Bank and Gaza 2020-08-16 0... 1 16153 16153
75 Denmark 2020-08-16 0... 3 15867 5289
76 Bosnia and Herzegovina 2020-08-16 0... 1 15801 15801
77 Korea, South 2020-08-16 0... 1 15318 15318
78 Bulgaria 2020-08-16 0... 1 14333 14333
79 Madagascar 2020-08-16 0... 1 13724 13724
80 North Macedonia 2020-08-16 0... 1 12653 12653
81 Sudan 2020-08-16 0... 1 12211 12211
82 Senegal 2020-08-16 0... 1 12032 12032
83 Kosovo 2020-08-16 0... 1 11275 11275
84 Norway 2020-08-16 0... 1 9965 9965
85 Congo (Kinshasa) 2020-08-16 0... 1 9638 9638
86 Paraguay 2020-08-16 0... 1 9381 9381
87 Zambia 2020-08-16 0... 1 9186 9186
88 Malaysia 2020-08-16 0... 1 9175 9175
89 Lebanon 2020-08-16 0... 1 8442 8442
90 Guinea 2020-08-16 0... 1 8343 8343
91 Gabon 2020-08-16 0... 1 8225 8225
92 Tajikistan 2020-08-16 0... 1 8029 8029
93 Haiti 2020-08-16 0... 1 7831 7831
94 Libya 2020-08-16 0... 1 7738 7738

13
Country_Region Last_Update GroupCount sum_Confirmed mean_Confirmed

95 Finland 2020-08-16 0... 1 7720 7720


96 Luxembourg 2020-08-16 0... 1 7439 7439
97 Albania 2020-08-16 0... 1 7260 7260
98 Greece 2020-08-16 0... 1 6858 6858
99 Mauritania 2020-08-16 0... 1 6693 6693
100 Croatia 2020-08-16 0... 1 6420 6420

detail2=groupsummary(dataFiltered2,["Province_State","Last_Update"],["sum","mean"],["Confirmed"
detail2 = sortrows(detail2,'sum_Confirmed','descend')

detail2 = 37×13 table

Province_State Last_Update GroupCount sum_Confirmed mean_Confirmed

1 Maharashtra 2020-08-16 0... 1 584754 584754


2 Tamil Nadu 2020-08-16 0... 1 332105 332105
3 Andhra Pradesh 2020-08-16 0... 1 281817 281817
4 Karnataka 2020-08-16 0... 1 219926 219926
5 Delhi 2020-08-16 0... 1 151928 151928
6 Uttar Pradesh 2020-08-16 0... 1 150061 150061
7 West Bengal 2020-08-16 0... 1 113432 113432
8 Bihar 2020-08-16 0... 1 101551 101551
9 Telangana 2020-08-16 0... 1 91361 91361
10 Gujarat 2020-08-16 0... 1 77559 77559
11 Assam 2020-08-16 0... 1 75558 75558
12 Rajasthan 2020-08-16 0... 1 59979 59979
13 Odisha 2020-08-16 0... 1 57126 57126
14 Haryana 2020-08-16 0... 1 46410 46410
15 Madhya Pradesh 2020-08-16 0... 1 44433 44433
16 Kerala 2020-08-16 0... 1 42885 42885
17 Punjab 2020-08-16 0... 1 30041 30041
18 Jammu and Kashmir 2020-08-16 0... 1 28021 28021
19 Jharkhand 2020-08-16 0... 1 22389 22389
20 Chhattisgarh 2020-08-16 0... 1 14987 14987
21 Uttarakhand 2020-08-16 0... 1 11940 11940
22 Goa 2020-08-16 0... 1 11339 11339

14
Province_State Last_Update GroupCount sum_Confirmed mean_Confirmed

23 Puducherry 2020-08-16 0... 1 7354 7354


24 Tripura 2020-08-16 0... 1 7061 7061
25 Manipur 2020-08-16 0... 1 4390 4390
26 Himachal Pradesh 2020-08-16 0... 1 3993 3993
27 Nagaland 2020-08-16 0... 1 3340 3340
28 Arunachal Pradesh 2020-08-16 0... 1 2658 2658
29 Andaman and Nicobar ... 2020-08-16 0... 1 2306 2306
30 Chandigarh 2020-08-16 0... 1 2009 2009
31 Ladakh 2020-08-16 0... 1 1909 1909
32 Dadra and Nagar Have... 2020-08-16 0... 1 1843 1843
33 Meghalaya 2020-08-16 0... 1 1292 1292
34 Sikkim 2020-08-16 0... 1 1148 1148
35 Mizoram 2020-08-16 0... 1 777 777
36 Unknown 2020-08-16 0... 1 270 270
37 Lakshadweep 2020-08-16 0... 1 0 0

5. Data Analysis and Visualization


Various Visualizations had been created to check the regular trends.

stackedplot(dataRaw.Last_Update,dataRaw.Confirmed)
title('Trend of total Confirmed cases globally')

15
Newfilter = dataRaw(dataRaw.Country_Region == country,:);
stackedplot(Newfilter.Last_Update,Newfilter.Confirmed)
title('Trend of Confirmed cases for selected country')

16
scatter3(Newfilter.Province_State,Newfilter.Last_Update,Newfilter.Confirmed)
title('Date wise State vs confirmed cases distribution')

17
scatterhist(detail.sum_Confirmed,detail.sum_Recovered,'group',detail.Country_Region);figure(gcf
title('Countrywise Confirmed vs Recovered cases')

scatterhist(detail2.sum_Confirmed,detail2.sum_Recovered,'group',detail2.Province_State);figure(
title('Statewise Confirmed vs Recovered cases')

18
Conclusions
From the above trends its evident that the number of covid cases in increasing exponentially. Although the
recovery rates also remained increasing. Some countries performed very well in combating the number of
cases but they got an unexpected second wave. Also, some countries were very efficient in controlling the
pandemic in initial stages but the later conditions were drastic. So, we undoubtedly need a vaccine to control
the pandemic and until then we need to take all the preventive measures at our on level.

19

You might also like