(5 versioni intermedie di uno stesso utente non sono mostrate)
Riga 132: Riga 132:
 
             currallMortiTi.push(parseInt(allTi[i])+parseInt(allMorti[i]));
 
             currallMortiTi.push(parseInt(allTi[i])+parseInt(allMorti[i]));
 
             currallMortiOsp.push(parseInt(allTo[i])+parseInt(allMorti[i]));
 
             currallMortiOsp.push(parseInt(allTo[i])+parseInt(allMorti[i]));
             currNewMorti.push(get_diff(currallMorti));
+
             currNewMorti = get_diff(currallMorti);
 
         }
 
         }
 
     }
 
     }
Riga 146: Riga 146:
 
         visible: 'legendonly',
 
         visible: 'legendonly',
 
         x: currentYear,
 
         x: currentYear,
         //y: currallRicoverati,
+
         y: currallRicoverati,
        y: currNewMorti,
+
 
       
 
 
         name: 'Ricoverati con sintomi',
 
         name: 'Ricoverati con sintomi',
 
         mode: 'markers',
 
         mode: 'markers',
Riga 363: Riga 362:
 
             width: 2
 
             width: 2
 
         }
 
         }
     };      
+
     };  
 +
   
 +
    var trace17 = {
 +
        x: currentYear,
 +
        y: currNewMorti,
 +
        mode: 'markers',
 +
        name: 'Incremento morti',
 +
        marker: {
 +
            size: 6,
 +
            opacity: 1,
 +
            symbol: 'cross'
 +
        }
 +
    }; 
  
 
     var data = [trace8,  
 
     var data = [trace8,  
Riga 377: Riga 388:
 
                 trace6,
 
                 trace6,
 
                 trace10,
 
                 trace10,
                 trace13, trace14, trace15, trace16,];
+
                 trace13, trace14, trace15, trace16,trace17];
  
 
     var updatemenus=[
 
     var updatemenus=[
Riga 389: Riga 400:
 
                 },
 
                 },
 
                 {
 
                 {
                     args: [{'yaxis.type':'log',
+
                     args: [{'yaxis.type':'log'}],
                            'yaxis.dtick':1}],
 
 
                     label:'SemiLog',
 
                     label:'SemiLog',
 
                     method:'relayout'
 
                     method:'relayout'
Riga 555: Riga 565:
  
 
<script>
 
<script>
 +
    function get_diff(vect){
 +
        var vdiff = [];
 +
        vdiff.push(0);
 +
        for (var i=1;i<vect.length;i++){
 +
            vdiff.push(vect[i]-vect[i-1]);
 +
        }
 +
       
 +
        return vdiff;
 +
    }
 
     // ITA
 
     // ITA
 
     Plotly.d3.csv('https://raw.githubusercontent.com/pcm-dpc/COVID-19/master/dati-andamento-nazionale/dpc-covid19-ita-andamento-nazionale.csv', function(err, rows){
 
     Plotly.d3.csv('https://raw.githubusercontent.com/pcm-dpc/COVID-19/master/dati-andamento-nazionale/dpc-covid19-ita-andamento-nazionale.csv', function(err, rows){
Riga 593: Riga 612:
 
         currallMortiTi = [];
 
         currallMortiTi = [];
 
         currallMortiOsp = [];
 
         currallMortiOsp = [];
 +
        currNewMorti = [];
 
         //allDay = allDay.split(' ')[0];
 
         //allDay = allDay.split(' ')[0];
  
Riga 617: Riga 637:
 
         currallMortiTi = [];
 
         currallMortiTi = [];
 
         currallMortiOsp = [];
 
         currallMortiOsp = [];
 +
        currNewMorti = [];
  
 
         for (var i = 0 ; i < allRegionNames.length ; i++){
 
         for (var i = 0 ; i < allRegionNames.length ; i++){
Riga 634: Riga 655:
 
                 currallMortiTi.push(parseInt(allTi[i])+parseInt(allMorti[i]));
 
                 currallMortiTi.push(parseInt(allTi[i])+parseInt(allMorti[i]));
 
                 currallMortiOsp.push(parseInt(allTo[i])+parseInt(allMorti[i]));
 
                 currallMortiOsp.push(parseInt(allTo[i])+parseInt(allMorti[i]));
 +
                currNewMorti = get_diff(currallMorti);
 
             }
 
             }
 
         }
 
         }
Riga 863: Riga 885:
 
             }
 
             }
 
         };
 
         };
 +
 +
        var trace17 = {
 +
            x: currentYear,
 +
            y: currNewMorti,
 +
            mode: 'markers',
 +
            name: 'Incremento morti',
 +
            marker: {
 +
                size: 6,
 +
                opacity: 1,
 +
                symbol: 'cross'
 +
            }
 +
        }; 
  
 
         var data = [trace8,  
 
         var data = [trace8,  
Riga 876: Riga 910:
 
                     trace6,
 
                     trace6,
 
                     trace10,
 
                     trace10,
                     trace13, trace14, trace15, trace16];
+
                     trace13, trace14, trace15, trace16, trace17];
  
 
         var updatemenus=[
 
         var updatemenus=[
Riga 888: Riga 922:
 
                     },
 
                     },
 
                     {
 
                     {
                         args: [{'yaxis.type':'log',
+
                         args: [{'yaxis.type':'log'}],
                                'yaxis.dtick':1}],
 
 
                         label:'SemiLog',
 
                         label:'SemiLog',
 
                         method:'relayout'
 
                         method:'relayout'
Riga 1 079: Riga 1 112:
 
                     },
 
                     },
 
                     {
 
                     {
                         args: [{'yaxis.type':'log',
+
                         args: [{'yaxis.type':'log'}],
                                'yaxis.dtick':1}],
 
 
                         label:'SemiLog',
 
                         label:'SemiLog',
 
                         method:'relayout'
 
                         method:'relayout'

Versione attuale delle 23:01, 2 Nov 2020

COVID19 - Monitoraggio ed Analisi della situazione italiana

Andamento nazionale

Andamenti regionali

Regione:

Andamenti Provinciali

Provincia:

Disclaimer

Dati forniti dal Ministero della Salute, elaborazione e gestione dati a cura del Dipartimento della Protezione Civile: https://github.com/pcm-dpc/COVID-19 Rielaborazione a cura del Control of Dynamic System Lab, Politecnico di Bari

COVID19 - Monitoraggio ed Analisi della situazione italiana

Andamento nazionale

Andamenti regionali

Regione:

Andamenti Provinciali

Provincia:

Disclaimer

Dati forniti dal Ministero della Salute, elaborazione e gestione dati a cura del Dipartimento della Protezione Civile: https://github.com/pcm-dpc/COVID-19 Rielaborazione a cura del Control of Dynamic System Lab, Politecnico di Bari