How to find data

Can I ask how to find variables with the same country name, correspond total death, cases and plot it on the graph which in a huge data set like this

4 Commenti

David Hill
David Hill il 19 Mag 2022
Do you want to sum the total deaths for each of the countries and then plot countries vs. total deaths?
Jan
Jan il 19 Mag 2022
This is a CSV file. What do you call "variables"? Did you import the file already? If so, to which kind of variable? How should the graph look like? 75847 rows are too many to be processed by a human, but for Matlab this is not huge.
John fredson
John fredson il 19 Mag 2022
@David Hillyes please
John fredson
John fredson il 19 Mag 2022
@Jan yes the graph should look like number of lines represent the relationship of countries and corresponding accumulated cases and deaths

Accedi per commentare.

Risposte (1)

David Hill
David Hill il 19 Mag 2022

0 voti

t=readtable('owid-covid-data_2020-21.csv');
u=unique(t.Location);
s=zeros(1,length(u));
for k=1:length(u)
s(k)=sum(t.TotalDeaths(ismember(t.Location,u(k))));
end
bar(1:length(u),s)

Categorie

Tag

Richiesto:

il 19 Mag 2022

Commentato:

il 19 Mag 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by