Added method to export the data for d3js