Automatically visualizing data in d3