I am trying to make the D3.js Sankey visualization filter set the dataset according to categories.
I use the d3.csv method to enter data, as shown in this example - http://bl.ocks.org/timelyportfolio/5052095

I would like, however, to load a dataset with four columns -
source, purpose, value, category
My goal is to have visualization with the ability to switch between categories. Thus, each Sankey visualization will represent only one specific category. Then the user can switch from the drop-down list to another.
Is this possible using the current d3.csv input method?
source share