4 ms·
This is an outstanding overview of how to build fast programs in JavaScript. I really appreciate the fact that Felix took the time to write it. I learned a lo
by eric_bullington 14y ago
This is an outstanding overview of how to build fast programs in JavaScript. I really appreciate the fact that Felix took the time to write it. I learned a lot, and will definitely integrate this into my work whenever performance-critical code is involved. Particularly since I enjoy dataviz so much.
I'm a little surprised that someone so into JavaScript is using R and ggplot2 to visualize his data, and not d3 along with CoffeeScript for munging data (or Python if you can't stand CoffeeScript). Don't get me wrong, R is a powerful tool, but with d3 you can skip the whole ImageMagick/Skitch step since you're making visualizations directly for the web. Plus, once you've grasped d3's declarative approach (took me a while), it's so easy to quickly make powerful visualizations with it. In fact, it was partially inspired by ggplot2, if I'm not mistaken.
And to quickly munge/clean data, I've found CoffeeScript does very well here, similar to how easy it is to use Python for this task. I wouldn't want to write out JavaScript when rapidly trying to get data in the right format for visualizations, but with CoffeeScript and a functionally-oriented library like underscore, it's pretty easy.
That said, I'm sure once you've mastered such an intricate tool as R, it's hard to give up that power. But if you're a node devotee and you're looking for a good tool in JavaScript to visualize data, you can't get much better than d3. I know a lot of dataviz folks are learning JavaScript just so they can have access to d3.
- rgbrgb 14y agoReally the nice thing about ggplot2 is that each of those figures were probably like 1 line of code. Having a DSL designed for your data analysis is awesome.
- Myrmornis 14y agoI like d3 (and coffeescript). But... df <- read.delim("benchmark.tsv") boxplot(df$timing ~ df$implementation) Versus...hmm. How many hours / LOC would that take you in d3 and coffeescript? It will be great when it happens (nvd3 looks promising) but I don't think d3 is an exploratory data analysis tool yet.