indexStats = function (response) {
const arr = Object.entries(response.dimension.geo.category.index)
.map(([key, val]) => ({
id: key,
value: response.value[val] || null,
name: response.dimension.geo.category.label[key]
}));
return arr
.sort((a, b) => (a.value > b.value ? -1 : b.value > a.value ? 1 : 0))
.filter((v) => v.value !== null)
.reduce((acc, item) => {
acc[item.id] = item.value;
return acc;
}, {});
}