Help with Heat map rects

I’ve made both scales and can’t figure out how to “center” rects on their proper axises. Some rects are missing, even though i iterate through out whole dataset. It jumps 10 years on the rects. Also first column of rects is out of place, how and why, i don’t know and in that column rects are overlapping(what’s up with that?).

Here is my pen.

Here is link that used to model my HeatMap.

Here is a link to challenge.

I also tried using scaleTime() for y axis but then ticks are 20 years apart on axis itself.

Thanks for any guidance and help in advance.