demographicsDataNiceKeys = {
let array = Array.from(demographicsData[2018]).map(d => {
let o = { ... d[1]}
selectedFields.forEach(key => {
let k = niceLabel(key)
o[k] = o[key]
delete o[key]
if(k == "gini index of income inequality: gini index" && o[k] < 0) o[k] = 0
})
return o
})
let bounds = {}
demoKeys.forEach(key => {
bounds[key] = -1
})
incomeKeys.forEach(key => {
bounds[key] = 600000
})
bounds[incomeKeys[0]] = 1
array.push(bounds)
return array
}