Combined D3 with Fundamentals doesn't work

Tried this code to figure out how to create many SVG using the same attributes among other features to combine forms and text, but this code doesn’t work! It combines D3 SVG and JavaScript and should be of great help if it worked correctly. Something must be missing, but I don’t know what. Can you help me riddle this?