nlesc-sherlock / chicago

This repository visualizes the City of Chicago police data set using web-based tools such as JavaScript, TypeScript, Gulp and Node.js.
Apache License 2.0
0 stars 0 forks source link

construct the histogram more efficiently #72

Closed jspaaks closed 8 years ago

jspaaks commented 8 years ago

as long as you know that the results are ordered by time, you can probably construct the histogram more efficiently

jspaaks commented 8 years ago

something like

var facts = crossfilter();
facts.add(thedatafromxhr);
var dim = {};
dim.byDate = facts.dimension(function(fact){return fact.date});
dim.byTimeOfDay = facts.dimension(function(fact){return fact.tod // or something});

see here for a useful example.

jspaaks commented 8 years ago

Might not actually be a problem...there's a different (currently unknown) factor that is much more of a performance bottleneck