32 lines
1.3 KiB
Scilab
32 lines
1.3 KiB
Scilab
|
data = csvRead("resources/data/data.csv");
|
||
|
|
||
|
surfaceAfrique = sum(data(1:57, 2)* 1000);
|
||
|
populationAfrique = sum(data(1:57, 3)* 1000000);
|
||
|
|
||
|
surfaceAmeriqueDuNord = sum(data(58:86, 2)* 1000);
|
||
|
populationAmeriqueDuNord = sum(data(58:86, 3)* 1000000);
|
||
|
|
||
|
surfaceAmeriqueDuSud = sum(data(87:99, 2)* 1000);
|
||
|
populationAmeriqueDuSud = sum(data(87:99, 3)* 1000000);
|
||
|
|
||
|
surfaceAsie = sum(data(100:150, 2)* 1000);
|
||
|
populationAsie = sum(data(100:150, 3)* 1000000);
|
||
|
|
||
|
surfaceEurope = sum(data(151:193, 2)* 1000);
|
||
|
populationEurope = sum(data(151:193, 3)* 1000000);
|
||
|
|
||
|
surfaceOceanie = sum(data(194:207, 2)* 1000);
|
||
|
populationOceanie = sum(data(194:207, 3)* 1000000);
|
||
|
|
||
|
pie([surfaceAfrique, surfaceAmeriqueDuNord, surfaceAmeriqueDuSud, surfaceAsie, surfaceEurope, surfaceOceanie]);
|
||
|
title("Répartition de la surface terrestre");
|
||
|
legend(["Afrique", "Amérique du Nord", "Amérique du Sud", "Asie", "Europe", "Océanie"], 'out_upper_right');
|
||
|
xs2png(0,"resources/img/ex1-4-1.png");
|
||
|
|
||
|
clf();
|
||
|
|
||
|
pie([populationAfrique, populationAmeriqueDuNord, populationAmeriqueDuSud, populationAsie, populationEurope, populationOceanie]);
|
||
|
title("Répartition de la population mondiale");
|
||
|
legend(["Afrique", "Amérique du Nord", "Amérique du Sud", "Asie", "Europe", "Océanie"], 'out_upper_right');
|
||
|
xs2png(0,"resources/img/ex1-4-2.png");
|