s);
      })

      var latest = datasets[0][datasets[0].length - 1];
      //delete latest["datetime"];

      //get latest data for every country/city
      var top = {},
        ustop = {},
        cntop = {};
      top["china"] = 0;
      //this fucntion read the latest data from virus.csv and write the country name and it's latest active confirmed value into dictionary
      Object.keys(latest).forEach(function(d) {
        value = tc(datasets[0][datasets[0].length - 1][d]) - tr(datasets[0][datasets[0]