tabplot
tabplot copied to clipboard
Support for pre-binned data
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)