const distribution = total => {
const result = Array(10).fill(0);
while (total--) result[Math.floor((Math.random() * 99) / 10)]++;
return result;
}
distribution(100000) // [ 10293, 10053, 10155, 10087, 10191, 10059, 10054, 9976, 10134, 8998 ]
distribution(3) // [ 0, 0, 1, 2, 0, 0, 0, 0, 0, 0 ]
data
и есть объект. Вместо этого вам нужны три строкиcountry, region_with_type, city_with_type
Что-то вроде