.csv versionThis post describes how to build a button that changes the input dataset of a barplot. It is almost the same as this post, but using a .csv file as input.
buttons in the html part. When you click the button, a  function called update() is triggered..csv input format.