D3 project not working! please help!

I’m still learning d3 and I was trying out this project. Its still unfinished but I should see the bars displayed but the code doesn’t seem to be working.Please help and tell me what I am doing wrong.

This is the link to my code:

@megha_m,
you can check this first, what are you doing with this
svg.selectAll("bar")
?

i changed it to svg.selectAll(“rect”)… still not working