Contents
Covid-19 Data
WHO Coronavirus (COVID-19) Dashboard https://covid19.who.int/info/
Daily cases and deaths by date reported to WHO Download link: https://covid19.who.int/WHO-COVID-19-global-data.csv
Short field name |
Type |
Description |
Date_reported |
Date |
Date of reporting to WHO |
Country_code |
String |
ISO Alpha-2 country code |
Country |
String |
Country, territory, area |
WHO_region |
String |
WHO regional offices: WHO Member States are grouped into six WHO
regions -- Regional Office for Africa (AFRO), Regional Office for the
Americas (AMRO), Regional Office for South-East Asia (SEARO), Regional
Office for Europe (EURO), Regional Office for the Eastern Mediterranean
(EMRO), and Regional Office for the Western Pacific (WPRO). |
New_cases |
Integer |
New confirmed cases. Calculated by subtracting previous cumulative
case count from current cumulative cases count.* |
Cumulative_cases |
Integer |
Cumulative confirmed cases reported to WHO to date. |
New_deaths |
Integer |
New confirmed deaths. Calculated by subtracting previous cumulative
deaths from current cumulative deaths.* |
Cumulative_deaths |
Integer |
Cumulative confirmed deaths reported to WHO to date. |
*Users should note that, in addition to capturing new cases and deaths reported on any given day, updates are made retrospectively to correct counts on previous days as needed based on subsequent information received. See "Daily aggregate case and death count data" above for further details on the calculation of new cases/deaths.
clear;close all;clc;
Load Data
covid19=webread('https://covid19.who.int/WHO-COVID-19-global-data.csv');
covid19=table2cell(covid19);
Get data
cc='SA';
ind=find(ismember(covid19(:,2),cc));
ind=find(strcmp(covid19(:,2),cc));
t=[covid19{ind,1}]';
cases_new=[covid19{ind,5}]';
cases_cum=[covid19{ind,6}]';
deaths_new=[covid19{ind,7}]';
deaths_cum=[covid19{ind,8}]';
Plot cases data
[cases_max,cind_max]=max(cases_new);
cases_7d_avg=smooth(cases_new,7);
subplot(2,1,1);grid on;
yyaxis left;
plot(t,cases_new,'g-',t(cind_max),cases_max,'ko',t,cases_7d_avg,'b-');
ylabel('New Cases');
yyaxis right;
plot(t,cases_cum);
ylabel('Cumulative Cases');
ax=gca;ax.YAxis(2).Exponent=0;
lgd_max=['Maximum Cases ',num2str(cases_max),' on ',datestr(t(cind_max))];
lgd_cum=['Cumulative Cases ',num2str(cases_cum(end))];
lgd={'New Cases',lgd_max,'New Cases 7-day moving avg',lgd_cum};
legend(lgd);
legend('boxoff');
legend('location','nw');
title([cc,' Covid-19 Cases New and Cumulative until ',datestr(t(end))]);
xlabel('Date');
Plot death data
[deaths_max,dind_max]=max(deaths_new);
deaths_7d_avg=smooth(deaths_new,7);
subplot(2,1,2);grid on;
yyaxis left;
plot(t,deaths_new,'g-',t(dind_max),deaths_max,'ko',t,deaths_7d_avg,'b-');
ylabel('New Deaths');
yyaxis right;
plot(t,deaths_cum);
ylabel('Cumulative Deaths');
ax=gca;ax.YAxis(2).Exponent=0;
lgd_max=['Maximum Deaths ',num2str(deaths_max),' on ',datestr(t(dind_max))];
lgd_cum=['Cumulative Deaths ',num2str(deaths_cum(end))];
lgd={'New Deaths',lgd_max,'New Deaths 7-day moving avg',lgd_cum};
legend(lgd);
legend('boxoff');
legend('location','nw');
title([cc,' Covid-19 Deaths New and Cumulative until ',datestr(t(end))]);
xlabel('Date');
