use d3 to map data to the DOM and only update the parts that change