moved d3 to js folder

moved js code from index.html to main.js