Improved d3 data prep for new visuals