Transform data to desired input for D3. Filewrite NYI