Implements a class to make working with the data structure expected by D3js graph layouts easier.