Move d3 data utils into separate file