tabplot icon indicating copy to clipboard operation
tabplot copied to clipboard

Support for pre-binned data

Open zachmayer opened this issue 10 years ago • 0 comments

I have a huge dataset I want to visualize in tabplot. The dataset currently resides in a redshift server, and I can pre-aggregate a lot of the bins before I pass them to tableplot.

It would be nice if tabplot supported a weight argument.

e.g.:

library('tabplot')
library('data.table')
library('ggplot2')
data(diamonds)
dat <- data.table(diamonds)
dat <- dat[,list(n=.N), by=c('carat', 'cut', 'color', 'clarity')]

#Identical to tableplot(diamonds, select_string=c('carat', 'cut', 'color', 'clarity'))
#But 1/4 of the data size
tableplot(dat, weight='n') 
nrow(dat)/nrow(diamonds)

zachmayer avatar Feb 12 '15 18:02 zachmayer