table = {
var our_parseInt = x => x == "" ? 0/0 : parseInt(x);
var n_prefix = commute_group == 'work' ? '' : 's';
var t = our_pop_data.map(x => ({
dep_score: parseInt(x.dep_score),
dep: our_parseInt(x.dep),
population: parseInt(x.population),
share: x[mode_to_display.key] * 1.0 / x[n_prefix + 'n'],
n:parseInt(x[n_prefix + 'n']),
n_share:our_parseInt(x[mode_to_display.key]),
name: x.name
}));
t = t.filter(x => !isNaN(x.dep_score) && !isNaN(x.n_share))
t = t.sort((x, y) => (x.dep_score - y.dep_score));
var c_pop = 0;
var c_n = 0;
var c_n_share = 0;
t.forEach(function(x)
{
x.c_pop = c_pop; c_pop += x.population;
x.c_n = c_n; c_n += (+x.n || 0);
x.c_n_share = c_n_share; c_n_share += (+x.n_share || 0);
});
return t;
}