Computational code for ggvis